If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Db2 If Loop

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-29-09, 05:10
donraja_ht donraja_ht is offline
Registered User
 
Join Date: Sep 2007
Posts: 56
Db2 If Loop

Hello,

i would like to know if this is correct or wrong my if loop condition is as follows
IF Student IS NULL AND is_error IS NULL THEN
where Student and is_error is char(20) Data type. the above condition is not true or is it true.

Thanks
Reply With Quote
  #2 (permalink)  
Old 04-29-09, 08:20
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
"IF" checks for a condition - it is not a loop. Maybe you want to have a loop, look at the FOR, WHILE, and LOOP statements.

Other than that, I don't understand your question. Syntactically, the condition is correct - you are only missing the code in the THEN branch and an END IF.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On