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
 General SQL Server Forums
 New to SQL Server Programming
 Small Query

Author  Topic 

bpgupta
Yak Posting Veteran

75 Posts

Posted - 2007-09-12 : 03:04:50
Hi,

I need to display only the char having start with 'ACCT -AMOUNT',Now problem is that some records having the lower case character like 'acct amount'.
But i want to display only the upper case char start with 'ACCT-AMOUNT'.

I have to used the 'like ' statement but it is showing all the row inculding the lower case also.

Please give me some clue reg. the issues.

Thanks,BPG

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-09-12 : 03:22:29
SELECT *
FROM Table1
WHERE Col1 COLLATE SQL_Latin1_General_CP1250_CS_AS LIKE 'ACCT-AMOUNT' COLLATE SQL_Latin1_General_CP1250_CS_AS



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

sunsanvin
Master Smack Fu Yak Hacker

1274 Posts

Posted - 2007-09-12 : 03:56:41
please let us know wether your need is fulfilled or not.....

Vinod
Even you learn 1%, Learn it with 100% confidence.
Go to Top of Page

bpgupta
Yak Posting Veteran

75 Posts

Posted - 2007-09-12 : 07:47:05
The query works with small corrections

SELECT *
FROM Table1
WHERE Col1 COLLATE SQL_Latin1_General_CP1250_CS_AS LIKE 'ACCT-AMOUNT'
Go to Top of Page
   

- Advertisement -