Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to pass one query result to another query
Message
De
21/05/2011 07:44:54
Mazahir Naya
Kuwait United Co.
Kuwait, Kuwait
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
How to pass one query result to another query
Versions des environnements
SQL Server:
SQL Server 2005
Application:
Desktop
Divers
Thread ID:
01511345
Message ID:
01511345
Vues:
107
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform