View previous topic :: View next topic
|
Author |
Message |
akodakka
New User
Joined: 20 May 2010 Posts: 75 Location: India
|
|
|
|
Hi , this may be a weird thinking ..just want to know tbough...
Select x
Into y
Where x = y
Is this query will work in a sequential manner. Where value of y changes every time
Basically my question is for a table as below
Date amt
1 100
2 100
3 200
4 400
5 400
If I execute
Move 100 to ww-amt
Select amt
Into ww-amt
Where amt = ww-amt
And date > 1
Will this give me Sqlerrd as 4 |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
No replies yet, which means your question was not understood.
Please rephrase, give a better example (1,2,3,4,5 in a date column doesn't look good), give interesting info (ever heard of SQLCODE?) and use code formatting. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Quote: |
Will this give me Sqlerrd as 4 |
Why do you think it would? What happened when you tried it? Why would you even want to do this? You might as well say
(PL/1, Rexx, C etc) or
Code: |
MOVE WW-AMT TO WW-AMT |
(COBOL - if it allows it) |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
Quote: |
Will this give me Sqlerrd as 4 |
SQLERRD is an array, so you need to specify the occurance or explain the terminology. However give a try and see what comes out.
Code: |
Select amt
Into ww-amt
Where amt = ww-amt
And date > 1 |
What is the concern with this query? you would still expect for 100? |
|
Back to top |
|
|
|