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 |
sunny_10
Yak Posting Veteran
72 Posts |
Posted - 2012-12-19 : 05:54:55
|
Hiselect t0.name 'Name' , t1.u_amount 'Amount' from [@temp] t0 left join [@temp1] t1 on t0.code = t1.u_al_code where t1.u_id = @idI want all records to be displayed from [@temp] whether corresponding records exist in [@temp1] table or not. Currenlt it is displaying only those records which exist in both tables.Thanks |
|
bandi
Master Smack Fu Yak Hacker
2242 Posts |
Posted - 2012-12-19 : 06:42:47
|
t0.code = t1.u_al_code AND t1.u_id = @id--Chandu |
|
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2012-12-19 : 06:43:17
|
select t0.name 'Name' , t1.u_amount 'Amount' from [@temp] t0 left join [@temp1] t1 on t0.code = t1.u_al_code and t1.u_id = @idNot sure that is what you want though.==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
sunny_10
Yak Posting Veteran
72 Posts |
Posted - 2012-12-19 : 09:55:02
|
Dear All Thanks |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-12-19 : 09:56:30
|
welcome------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|