|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
IF and SELECT count(*) |
« View previous topic :: View next topic » |
Author |
Message
|
paustin_ours |
Posted: Thu Aug 19, 2004 8:40 am Post subject: IF and SELECT count(*) |
|
|
Yatiri
Joined: 19 May 2004 Posts: 667 Location: columbus,oh
|
This is what am trying to do,
i am trying to see if a row exists, so i said
IF((SELECT COUNT(*) FROM Database.EMP AS T WHERE
T.AGE = Environment.Variable.Age) = 0) THEN
INSERT....
T.AGE doesn't seem to get the value of Environment.Variable.Age, I even tried another variable which i declared as INTEGER and it doesn't seem to help either. Is there something wrong with my construct? |
|
Back to top |
|
 |
TDS_tds_tds |
Posted: Thu Aug 19, 2004 9:02 am Post subject: |
|
|
 Novice
Joined: 31 Jul 2003 Posts: 16
|
try this
Code: |
IF((SELECT COUNT(*) FROM Database.EMP AS T, Environment.Variable[] AS E WHERE
T.AGE = E.Age) = 0) THEN |
|
|
Back to top |
|
 |
kirani |
Posted: Sat Aug 21, 2004 12:03 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
You can also think of using EXISTS operator. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|