Click here to Skip to main content
15,897,704 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi,

Please help me..

I have 2 SP's. P1 and P2.
P2 is called from P1
P1 also sends an XML variable to P2.
But when I am display the value of XML (which has 5 records), it is just showing the last records..
please tell why. I am gonna loose my job.Frown Frown Frown

here is the code.
alter proc p1
declare @myxml XML
as
begin
select @myxml= firstname from table1
exec p2 @myxml
end


proc 2 goes here :

alter proc p2(@xx XML)
as
begin
select @xx
end
Posted
Updated 15-Dec-10 17:31pm
v2
Comments
Sandeep Mewara 16-Dec-10 0:48am    
I really doubt loosing job would be so easy!

1 solution

Yes!! It will show only the last records. If the query returns multiple rows then the select will assign the last record into the variable.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900