Hi all,
I am getting an error when I test a select statement in query Analyzer.
The statement is:
select accocode, acconame from acco where accocode in(61003,61005,61007,61011)
The Error is:
Server: Msg 245, Level 16, State 1, Line 1
Syntax error converting the varchar value 'ACCDEP' to a column of data type int.
If I put Single Quotes around the accounts like...
...in('61003','61005','61007','61011')
Then it works fine... However, I am inherting these accounts from something else and cannot put the single quotes...
Is there a way to get the results without the Single quotes??
Any help is greatly appreciated..
regards,
MIke
I am getting an error when I test a select statement in query Analyzer.
The statement is:
select accocode, acconame from acco where accocode in(61003,61005,61007,61011)
The Error is:
Server: Msg 245, Level 16, State 1, Line 1
Syntax error converting the varchar value 'ACCDEP' to a column of data type int.
If I put Single Quotes around the accounts like...
...in('61003','61005','61007','61011')
Then it works fine... However, I am inherting these accounts from something else and cannot put the single quotes...
Is there a way to get the results without the Single quotes??
Any help is greatly appreciated..
regards,
MIke