Hello!
solaris 8, DB2 V8.1, embedded SQL.
One table has a field holiday_date with a value '2003-01-01'
The table used in the queries in JOIN
1) Query is -
EXEC SQL DECLARE cur4 CURSOR FOR
select ... from ...
where
holiday_date = date(:connect_time) or holiday_date = date('2003-01-01')
result is SQL0303N on the FETCH
2) use null_date host variable with the same value '2003-01-01' -
EXEC SQL DECLARE cur4 CURSOR FOR
select ... from ...
where
holiday_date = date(:connect_time) or holiday_date = date(:null_date)
result is SQL0303N on the FETCH
3) but it works from the command line, db2 "select ... from ... where
holiday_date = date(:connect_time) or holiday_date = date(:null_date)"
If I use in the query other date, which does not exists in the table, like
'2002-01-01', the result is correct.
All queries are "for read only"
Could someone point me, what I did wrong ?
Gregory G. V.
---------------
Any opinions in this posting are my own and not those of my present
or previous employers.
According Isham Research's Devil's IT Dictionary mainframe is:
"an obsolete device still used by thousands of obsolete companies
serving billions of obsolete customers and making huge obsolete profits
for their obsolete shareholders.
And this year's run twice as fast as last year's."
-
::: When replying to the list, please use 'Reply-All' and make sure
::: a copy goes to the list ([EMAIL PROTECTED]).
*** To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED]
*** For more information, check http://www.db2eug.uni.cc