Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 lower() in Where Clause

Author  Topic 

sphilip
Starting Member

8 Posts

Posted - 2009-03-02 : 15:35:47
I am trying to put together a select statement to pull data from a field where the data is lower case.

select itemnumber,
comm
from mas90..IM1_InventoryMasterFile
where comm = lower(comm)


In the example below, I wish to have my result sets contain the 2 rows which have the lower case 'n', but not the uppercase 'N'.

Just records 3 and 6 or '16RIBU-150FSSM3' and '16RIBU150FSWSM3'



Thanks for reading and any assistance you can lend.

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-03-02 : 16:13:07
select itemnumber,
comm
from mas90..IM1_InventoryMasterFile
where cast(comm as binary(1)) = cast(lower(comm) as binary(1))



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

sphilip
Starting Member

8 Posts

Posted - 2009-03-02 : 16:19:13
Thank you good sir. Worked as expected. :)
Go to Top of Page
   

- Advertisement -