Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
reacha
Starting Member
49 Posts |
Posted - 2010-10-08 : 16:20:45
|
| SELECT @Result= (select top(1) AUDIT.Auditstamp, userid from audit where AUDIT.Audittype =5and AUDIT.PKGID = @pkgidorder by AUDIT.Auditstamp desc)The parameter for the procedure is pkgid and i need to capture two column values in one variable how can do thisI need to call this procedure in another procedureand after than i need to split result to get individual valuesPlease help me out!!Thanks,reacha |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
reacha
Starting Member
49 Posts |
Posted - 2010-10-08 : 16:34:37
|
| if i use thisSELECT @Result= (select top(1) AUDIT.Auditstamp+userid from audit where AUDIT.Audittype =5and AUDIT.PKGID = @pkgidorder by AUDIT.Auditstamp desc)I was getting some value like this 2011-11-14 16:13:52.273Thanks,reacha |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
jeffw8713
Aged Yak Warrior
819 Posts |
Posted - 2010-10-09 : 13:09:11
|
| Why do you need to 'capture' two values into a single variable? Wouldn't it be better to use two variables?SELECT TOP 1 @auditStamp = a.Auditstamp ,@userId = a.userid FROM Audit a WHERE a.Audittype = 5 AND a.PKGID = @pkgid ORDER BY a.Auditstamp desc;Jeff |
 |
|
|
|
|
|