View previous topic :: View next topic
|
Author |
Message |
gayathrinag
New User
Joined: 16 Oct 2008 Posts: 37 Location: chennai
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
gayathrinag
New User
Joined: 16 Oct 2008 Posts: 37 Location: chennai
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
What happened? |
|
Back to top |
|
|
gayathrinag
New User
Joined: 16 Oct 2008 Posts: 37 Location: chennai
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome - thanks for letting us know it is working
d |
|
Back to top |
|
|
|