View previous topic :: View next topic
|
Author |
Message |
shchan
New User
Joined: 06 Jun 2007 Posts: 58 Location: Hyderabad
|
|
|
|
Hi,
I have written a DB2 query which is giving me the expected output but with some warnings in between.Can anybody tell me if there is any way to avoid DB2 warnings in a query? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
And what those warnings are...may be sharing them give us a clue to suggest something . . . |
|
Back to top |
|
|
shchan
New User
Joined: 06 Jun 2007 Posts: 58 Location: Hyderabad
|
|
|
|
Hi Anuj,
In my query iam trying to add years and days to a date field.Iam getting a warning 01506 when the record has 29th Feb and Iam tring to add years and days to it as it is a leap year.And this warning is displayed in my query output.Is there any way to avoid this?? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
it would be a good experience for You to look at the manual to
find out the meaning of the warning messages
and not expect us to do the reading for You
usually for each message there are the actions/suggestions
on how to proceed to get rid of the message |
|
Back to top |
|
|
shchan
New User
Joined: 06 Jun 2007 Posts: 58 Location: Hyderabad
|
|
|
|
Hi i tried to use TOLWARN parameter but as per my understanding this just tolerates the warnings and just allows the SQL statement to process even in case of warnings.But as per my requirement i do not want te warnings to be displayed in the middle of the output of my query .
Code: |
DSNT400I SQLCODE = 000, SUCCESSFUL EXECUTION
DSNT418I SQLSTATE = 01506 SQLSTATE RETURN CODE
DSNT415I SQLERRP = DSN SQL PROCEDURE DETECTING ERROR
DSNT416I SQLERRD = 0 0 0 -1 0 0 SQL DIAGNOSTIC INFORMATION
DSNT416I SQLERRD = X'00000000' X'00000000' X'00000000' X'FFFFFFFF'
X'00000000' X'00000000' SQL DIAGNOSTIC INFORMATION
DSNT417I SQLWARN0-5 = W,,,,, SQL WARNINGS
DSNT417I SQLWARN6-A = W,,,, SQL WARNINGS |
is there any way to suppress the above warnings in my output? |
|
Back to top |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
This article is regarding SQLWARNINGs. Just give it a read, might help.
Sushanth |
|
Back to top |
|
|
|