Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > SQL Language
|
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 25th, 2008, 01:03 AM
Authorized User
 
Join Date: Jun 2008
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Default lowercase problem

Hello,

I have a problem when I want to save into database, all the data that was inserted, automatically save in lowercase format in database. I use MS Access for my database server.

For example, I have several text field and user input data not only uppercase but also lowercase. But, I do not know to make all the data that has been inputted into the database, change become lowercase?

Thank You

 
Old June 25th, 2008, 02:10 PM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Access uses a version of SQL that is based on VBA, including the use of all VBA functions. So most of its functions are identical to those also used in VBScript.

In this case,
    LCASE( )
is the function you use to convert any text to lower case.

You could do it when you *retrieve* the data:
    SELECT LCASE(anyField) FROM table ...

Or you could do it when you add the data:
    INSERT INTO table (anyField) VALUES(LCASE('THIS IS UPPERCASE'))

Or you could change it in place, using UPDATE:
    UPDATE table SET anyField = LCASE( anyFIeld )





Similar Threads
Thread Thread Starter Forum Replies Last Post
uppercase and lowercase minhpx SQL Server 2000 1 January 25th, 2005 12:10 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.