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 |
Swati Jain
Posting Yak Master
139 Posts |
Posted - 2007-10-09 : 03:05:20
|
Hello All,I want to generate Cross tab sql query output with following info1)select @AssetID =----> this value will be selected from tlb2)select fixedAssets from tlb1 where AssetID=@AssetID 3)select cost from tlb2 where fixedAssets ----> fixed asset selected in above queryThis query will be executed in cursor for every record in tlb Now queries output wil be like Fixed Asset1 Fixed Fixed Asset2 ...........FixedAsset..n (till nth row in tlb2) CostDate1.... ....Date2-------------------------------------------------------------------------------------------------------------------------------------Total Cost- Cost1 Cost2 .............................................Costn =Sum(Cost1+Cost2......Costn) |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-10-10 : 02:36:59
|
quote: Originally posted by Peso Maybe you should concentrate on finishing previous tasks first?See http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=90653 E 12°55'05.25"N 56°04'39.16"
It is really sad that Swati Jain doesnt follow up her threads usually. There are lot of such threadsMadhivananFailing to plan is Planning to fail |
|
|
|
|
|