Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Insert with Select statement in Eazytrieve

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
gayathrinag

New User


Joined: 16 Oct 2008
Posts: 37
Location: chennai

PostPosted: Tue Oct 12, 2010 9:44 am    Post subject: Insert with Select statement in Eazytrieve
Reply with quote

Hi

Can you please tell me how to write Insert with select statement in eazytrieve pgm?

Example:

Insert into S.STUDENT (Roll No,Mark1) select Roll No, Mark1 from M.MARK where Roll No in (1,2,3).

Thanks
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Oct 12, 2010 9:53 am    Post subject:
Reply with quote

Hello,

SQL syntax is the same in Easytrieve as it is elsewhere.

Have you tried something that works in cobol or spufi that doesnot work with Easytrieve?
Back to top
View user's profile Send private message
gayathrinag

New User


Joined: 16 Oct 2008
Posts: 37
Location: chennai

PostPosted: Tue Oct 12, 2010 9:57 am    Post subject:
Reply with quote

Hi Dick,

I tried as given below.

INSERT INTO S.STUDENT (Roll No, MARK1) +
SELECT ROLL,MARK1 from M.MARK +
WHERE ROLL NO IN (1,2,3)
Pls correct me if im wrong
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Oct 12, 2010 9:59 am    Post subject:
Reply with quote

Hello,

What happened?
Back to top
View user's profile Send private message
gayathrinag

New User


Joined: 16 Oct 2008
Posts: 37
Location: chennai

PostPosted: Tue Oct 12, 2010 10:06 am    Post subject: Reply to: Insert with Select statement in Eazytrieve
Reply with quote

Sorry Dick, I missed "+" in my sql , now i fixed it and its working fine....thanks for your time....Have a good day.!!!
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Oct 12, 2010 8:13 pm    Post subject: Reply to: Insert with Select statement in Eazytrieve
Reply with quote

You're welcome - thanks for letting us know it is working icon_smile.gif

d
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 -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm
No new posts VALIDATE NULL VALUE IN DB2 CASE STATE... useit DB2 5 Thu Feb 09, 2017 4:34 pm
No new posts -913/-911 Deadlock during UPDATE stat... NoSleep319 DB2 5 Fri Nov 18, 2016 12:37 am
No new posts Two Selects in a single select query Rohit Umarjikar DB2 1 Fri Nov 04, 2016 8:46 pm
No new posts COBOL DB2 - CALL statement - high CPU... TS70363 DB2 15 Sun Sep 11, 2016 6:07 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us