Forum Moderators: open

Message Too Old, No Replies

Make All Rows Lowercase ¦ Update Query

         

ukgimp

1:20 pm on Oct 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is there a way of apdating all the contents of a feild down multiple rows using a query.

Something like (psuedo code)

UPDATE [Table] SET field = replace(field,'*','toLowerCase (field)');

Cheers

macrost

2:20 pm on Oct 6, 2003 (gmt 0)

10+ Year Member



ukgimp,
If you want to have all lower case then you can use:

LCase(field)

Mac

P.S.
UCase will put it in all caps.

mattglet

2:56 pm on Oct 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



another answer to your question:

yes, that will affect every record in your table. queries only modify records that meet a WHERE clause. if none is present, then all records will be updated.

-Matt

duckhunter

2:38 am on Oct 7, 2003 (gmt 0)

10+ Year Member



I believe the SQL Server commands are LOWER and UPPER
LCASE and UCASE are the VBSCRIPT equivalents.

the SQL Update Statement would be:
UPDATE [Table] SET field = LOWER(field) [WHERE field2 = 'value']

mattglet

3:49 am on Oct 7, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



duckhunter-

that is correct... lower and upper are the keywords to use with SQL. lcase & ucase are strictly vbscript functions.

-Matt