How do I change a field name from vb code?

G

Guest

Hi.

I have a database with many tables which have field names including the
á,é,í,ó,ú or ñ characters (such as débito, año, crédito, etc). I´m moving to
MSSQL and this kind of field name is not accepted in stored procedures. I
need to change it to the correspondant vowel a,e,i,o,u or n (e.g. change
'Débito' to 'Debito'). I have more than 100 installations and it would be
very time-waste to change every one manually.

I'll appreciate if some one of you guys helps me in developing a procedure
to make these changes from code.

Thanks in advance, Carlos Ochoa
(e-mail address removed)
 
B

Brendan Reynolds

You could write a bunch of DAO code to do this, but there are some existing
utilities that will do much of the work for you - Rick Fisher's Find and
Replace (www.rickworld.com) or SpeedFerret (www.moshannon.com)

Are you sure you really need to do this, though, because the following
stored procedure works just fine for me using SQL Server 2000 ...

CREATE PROCEDURE [dbo].[TestProc] AS
UPDATE Categories SET débito = 'a test' WHERE débito IS NULL
GO
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top