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 |
cipriani1984
Constraint Violating Yak Guru
304 Posts |
Posted - 2011-02-02 : 11:04:46
|
Hi,I have the following queryif not exists (select a.periodfrom a inner join bon a.period = b.period or a.period = b.period2thing is the value in a.period is either aug or 1 and table b has lookup for all months and their values.but when i run this query it says'Conversion failed when converting the varchar value 'Aug' to data type int.'Any help? thanks |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2011-02-02 : 11:24:57
|
...on CASE WHEN a.period = 'Jan' then 1 WHEN a.period = 'Feb' then 2...END = b.periodORCASE WHEN a.period = 'Jan' then 1 WHEN a.period = 'Feb' then 2...END = b.period2 No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
|
|