Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Can we use array in where clause of select statement?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
kalais

New User


Joined: 18 Apr 2006
Posts: 22

PostPosted: Tue Dec 11, 2007 4:14 pm    Post subject: Can we use array in where clause of select statement?
Reply with quote

I want to know is it possible to use array (an integer array) in the
where clause like,

SELECT
......
INTO
....
FROM
...
WHERE
...
TABLE.COL_NAME IN :WS-INT-ARRAY


If yes how to code it.
Back to top
View user's profile Send private message

vijayakumar.yellala

New User


Joined: 19 Apr 2006
Posts: 63
Location: Chennai

PostPosted: Tue Dec 11, 2007 4:25 pm    Post subject:
Reply with quote

you can use....

but not like, table.column name

directly u can use column name inthe Where clause
Back to top
View user's profile Send private message
dr_te_z

New User


Joined: 08 Jun 2007
Posts: 71
Location: Zoetermeer, the Netherlands

PostPosted: Tue Dec 11, 2007 4:32 pm    Post subject:
Reply with quote

No. You must redefine. BUT! That's where session tables come in.
Code:

where colonm_a in (select a from session.temp_tab)
So, instead of a cobol array you drop/create/populate a session tempory table. Very powerfull.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to select record x+7 or x+2 based... JoAnn Kulcyk SYNCSORT 6 Tue Jan 16, 2018 10:49 pm
No new posts Date in where clause - Windows Karthikeyan Subbarayan DB2 9 Wed Nov 15, 2017 9:07 pm
No new posts COBOL - EXIT statement weird behavior anthony.pangestu COBOL Programming 0 Fri Oct 27, 2017 9:57 am
No new posts WER268A OUTREC STATEMENT : SYNTAX E... frozenblood87 SYNCSORT 12 Sat Aug 26, 2017 9:45 pm
No new posts Can we limit length in concatenation ... balaji81_k DB2 7 Tue Aug 22, 2017 2:50 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us