on 10-25-2007 2:04 PM
Is it possible to hav query like this?
Select a1, b1, c1, a1 from Tabl1
Union all
Select a2, b2, c2, ('a1-a2') from tabl2
ie i need a column value of second query in such a way it takes a value of previous query for any operations.
Meera.
Meera,
It has be more like
Select a1, b1, c1, a1 from Tabl1
Union all
Select a2, b2, c2, (Select a1 from Tabl1)-a2 from tabl2
Please note a1 in the sub select should return only one value, otherwise SQL will return error.
Suda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.