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
 what function should i use?

Author  Topic 

smorty44
Yak Posting Veteran

93 Posts

Posted - 2007-08-17 : 22:20:42
I need a query that returns a string for the following:
If field voucher has less than 3 characters then account field
+ date field else voucher.

I was thinking I should use a Case When statement, however, I'm not sure which function to use to determine the voucher field having less than 3 characters.

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-08-17 : 22:31:54
case when len(voucher) < 3


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

smorty44
Yak Posting Veteran

93 Posts

Posted - 2007-08-17 : 22:56:17
That worked perfectly, thank you so much for your help!
Go to Top of Page
   

- Advertisement -