Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to pass one query result to another query
Message
From
21/05/2011 07:44:54
Mazahir Naya
Kuwait United Co.
Kuwait, Kuwait
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
How to pass one query result to another query
Environment versions
SQL Server:
SQL Server 2005
Application:
Desktop
Miscellaneous
Thread ID:
01511345
Message ID:
01511345
Views:
106
Dear All UT Group members
hi to all after such a long time.
i would like to know how to pass one query result on 2nd query as a Paramtetr.
for example hear is the my Query.

1st Query :-
Select * from Employee_v as Emp
Note:- Bring all information from Employee Table

2nd Query :-
select TOCID from sab.dbo.propval AS B
where B.prop_id = 41 and str_val = emp.empid
Note:- Table call Propval query bring data only related to respected Employee

3rd Steps:-

Update sab.dbo.propval set str_val = emp.Title
WHERE TOCID = b.tocid AND prop_id=42
update the Propval table row as per the requierment.

so need a help is the my qery syntex is correct or requier to update.

Best Regards
Mazahir
Mazahir Naya
Next
Reply
Map
View

Click here to load this message in the networking platform