By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,213 Members | 1,105 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,213 IT Pros & Developers. It's quick & easy.

cursor error must declare scalar variable

P: 1
when the following SELECT is executed via A cursor to SQL 2005 it works

SELECT * FROM LCTRY
WHERE LANGUAGE = 'EN' AND CTRY_CODE = :CTRY

BUT

SELECT * FROM LCTRY
WHERE CTRY_CODE = :CTRY AND LANGUAGE = 'EN'

PRODUCES AN ERROR 000137 MUST DECALRE SCALAR VARIABLE
'@P1AND'

The application works with MySQL.
Oct 6 '06 #1
Share this Question
Share on Google+
1 Reply


P: 18
Hi,

It could be that you are missing single quotes around one of your parameters.

Cheers
C
Oct 10 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.