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 |
|
ynaina
Starting Member
9 Posts |
Posted - 2010-09-27 : 07:32:30
|
| I have table tbl_A and tbl_B with following dataseqno amt1 amt2 amt3 total1 10 10 20 402 20 10 20 403 30 10 20 40tbl_Bseqno calculation4 1+2-3Now i want to insert a row into tbl_A with seqno 4 and row1+row2-row3(1+2-3). tbl_A is temporary table which creates columns dynamically, so we don't have fixed number of colums in tbl_A.Please help me.Thanks in advance |
|
|
kashyap.2000
Starting Member
22 Posts |
Posted - 2010-09-27 : 07:54:33
|
quote: Originally posted by ynaina I have table tbl_A and tbl_B with following dataseqno amt1 amt2 amt3 total1 10 10 20 402 20 10 20 403 30 10 20 40tbl_Bseqno calculation4 1+2-3Now i want to insert a row into tbl_A with seqno 4 and row1+row2-row3(1+2-3). tbl_A is temporary table which creates columns dynamically, so we don't have fixed number of colums in tbl_A.Please help me.Thanks in advance
Do you want to insert only 2 column values into table A? if not what will be the valuees for amt1 amt2 amt3 ?Failures will either break you or will make you a better perosn.... |
 |
|
|
ynaina
Starting Member
9 Posts |
Posted - 2010-09-27 : 08:32:00
|
I want to insert seqno 4, amt1, amt2, ... total with its calculationquote: Originally posted by kashyap.2000
quote: Originally posted by ynaina I have table tbl_A and tbl_B with following dataseqno amt1 amt2 amt3 total1 10 10 20 402 20 10 20 403 30 10 20 40tbl_Bseqno calculation4 1+2-3Now i want to insert a row into tbl_A with seqno 4 and row1+row2-row3(1+2-3). tbl_A is temporary table which creates columns dynamically, so we don't have fixed number of colums in tbl_A.Please help me.Thanks in advance
Do you want to insert only 2 column values into table A? if not what will be the valuees for amt1 amt2 amt3 ?Failures will either break you or will make you a better perosn....
|
 |
|
|
|
|
|