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.
| Author |
Topic |
|
nickd
Starting Member
2 Posts |
Posted - 2002-04-15 : 06:39:21
|
| I have a character column 'dnis' in a table 'contact'. There are about 600,000 rows in the table. If I do a select I get all 600,000 rows back. If I do a simple sub string:substring(contact.dnis,1,2)I get all 600,000 rows. What I really want to do is apply a CASE statement to the sub string:CASE WHEN substring(contact.dnis,1,2) IN (43,47,49) THEN 'Agent' ELSE 'Not Agent' ENDThis query runs for about 100,000 rows - it varies slightly each time then gives me the message :[Microsoft][ODBC SQL Server Driver]Error in row0I should point out this is being done via Business Objects. However, I'm fairly confident this is not where the problem lies.cheers in advance,Nick |
|
|
nickd
Starting Member
2 Posts |
Posted - 2002-04-15 : 06:46:15
|
| All sorted. I just need quotes on the values in my IN clause. |
 |
|
|
sandesh_moghe
Constraint Violating Yak Guru
310 Posts |
Posted - 2002-04-15 : 07:49:47
|
| Try Double quotes---------------------------Sandesh - The Messanger |
 |
|
|
|
|
|