on 03-14-2014 12:57 PM
I think you are trying to compare a table type in you where clause, which may be incompatible. Can you try using a scalar variable instead? See sample here.
varYear = VARCHAR(8);
BEGIN
SELECT YEAR(CURRENT_DATE)
INTO varYear
FROM DUMMY;
<REST OF LOGIC>
Regards,
Justin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks guys. Issue resolved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sammy,
You cannot compare with Table Variable in your WHERE Clause, instead you have to use SCALAR Variable
As Justin rightly mentioned you should SCALAR Variable.
DECLARE var1 INTEGER;
SELECT YEAR(CURRENT_DATE) INTO var1 FROM DUMMY;
YEAR1 = select "YEAR","HIKE" from HIKE_YEAR
WHERE YEAR = :var1;
Regards,
Krishna Tangudu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.