View previous topic :: View next topic
|
Author |
Message |
aavugari mayuri
New User
Joined: 15 Aug 2006 Posts: 10
|
|
|
|
hi all,
is this possible..
str='select * from tablename'
and
EXEC SQL
STR
END-EXEC.
instead of
EXEC SQL
SELECT * FROM TABLENAME
END-EXEC.
i'm new to mainframe world so may ask some weird qns..please bear with me..
mayuri |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
What is your host language?
O. |
|
Back to top |
|
|
aavugari mayuri
New User
Joined: 15 Aug 2006 Posts: 10
|
|
|
|
host language is COBOL only |
|
Back to top |
|
|
anamikak
New User
Joined: 10 May 2006 Posts: 64 Location: Singapore
|
|
|
|
If you want to construct a string to execute an SQL, you can do so using dynamic SQL. But to execute Fixed list dynamic SQL you will also need to declare a cursor the result set.Then prepare,fetch and close the cursor.
Anamika |
|
Back to top |
|
|
cj10
New User
Joined: 18 Sep 2006 Posts: 9
|
|
|
|
In embedded SQL, such declarations are not possible.
Executable SQL statements must be placed between the EXEC SQL ......END-EXEC statements.
Corrections welcome !!!!!!
Thanks,
CJ. |
|
Back to top |
|
|
DavidatK
Active Member
Joined: 22 Nov 2005 Posts: 700 Location: Troy, Michigan USA
|
|
Back to top |
|
|
aavugari mayuri
New User
Joined: 15 Aug 2006 Posts: 10
|
|
|
|
hi all..
thanx for the inputs..it helped.. |
|
Back to top |
|
|
|