Issue with Host Variable Usage in Pro*C [message #418278] |
Thu, 13 August 2009 16:20 |
saumyab
Messages: 1 Registered: August 2009
|
Junior Member |
|
|
I have a program in PRO*C which is done in C++.
So I declare the HOST Variable under the DECLARE section e.g.
EXEC SQL BEGIN DECLARE SECTION;
int daysToCheck;
EXEC SQL BEGIN END SECTION;
Then my code based on the login assigns certain value to it
daysToCheck=5
This query doesnt give me right result in my code
update XYZ set fresh_ind='YES' where creation_time > (sysdate -:daysToCheck)
But If I hardcode the value the query runs properly
update XYZ set fresh_ind='YES' where creation_time > (sysdate -5)
Can you you help as my logic cannot afford to have a hardcoded entry.
|
|
|
|