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 |
|
hardcoded
Starting Member
1 Post |
Posted - 2009-07-30 : 16:48:01
|
| I have a mess on my hands. There are 3 tables that should've been linked (in an asp app) via primary key. Instead there was an issue and now that link is broken. I'm trying to find the best way to reconnect these tables and need some assistance. The issue is that the first table has 5 columns for data. For any that is filled in, that data is sent to table2 in a new entry. So if a user makes an entry in table1 with all 5 filled in, they will have 5 records in table2.Here is what they do have in common:Table1UserIDMonthYearInput1Input2Input3Input4Input5Table2UserIDMonthYearInput[1-5]Table3UserIDMonthYearInput[1-5]The problem is that there can be multiple entries in table1 for the month/year combination for one user, so I can't simply join on that criteria. |
|
|
winterh
Posting Yak Master
127 Posts |
Posted - 2009-09-16 : 07:11:33
|
| use temporary tablesI would use a temporary table for everything ever |
 |
|
|
Sachin.Nand
2937 Posts |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-09-16 : 12:49:51
|
| so what should be your result? all records in table1 as new records on table2/3? |
 |
|
|
|
|
|