IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Insert with Select statement in Eazytrieve


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
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
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

Moderator Emeritus


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

PostPosted: Tue Oct 12, 2010 9:53 am
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
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

Moderator Emeritus


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

PostPosted: Tue Oct 12, 2010 9:59 am
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
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

Moderator Emeritus


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

PostPosted: Tue Oct 12, 2010 8:13 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Dynamically pass table name to a sele... DB2 2
No new posts Insert header record with record coun... DFSORT/ICETOOL 14
No new posts Insert system time/date (timestamp) u... DFSORT/ICETOOL 5
No new posts Identify Program Insert DB2 7
No new posts SELECT from data change table DB2 5
Search our Forums:

Back to Top