View previous topic :: View next topic
|
Author |
Message |
cmsmoon
New User
Joined: 17 Jun 2010 Posts: 75 Location: Chennai
|
|
|
|
HI All,
I want to form query in cobol program .In that query I would like to pass the condition ( AND , OR ) thru some cobol variable..How to to pass the variable and how declare that variable
Example
Select R_NO, C_NAME,C_AGE from PERSONAL where
R_NO = '74' and C_NAME ='RAJA;
Select R_NO, C_NAME,C_AGE from PERSONAL where
R_NO = '74' WS-AND-OR C_NAME ='RAJA;
This WS-AND-OR variable value passed some 'AND" or 'OR' ..
CAn you please let me is possible to pass value for AND and OR operators |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
You can do that provided you are building a Dynamic Sql cobol program |
|
Back to top |
|
|
cmsmoon
New User
Joined: 17 Jun 2010 Posts: 75 Location: Chennai
|
|
|
|
premkrishnan wrote: |
You can do that provided you are building a Dynamic Sql cobol program |
Sorry!!! The program have not dynamic query!!!!
Without using Dynamic SQL |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Have two queries in two para if the variable is or execute the query with or else execute query with and |
|
Back to top |
|
|
|