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 |
cardullo4321
Starting Member
40 Posts |
Posted - 2012-02-08 : 08:33:23
|
Every month, I download .csv files from one database and do multiple upload into to another database. However, I can accidently upload the .csv files multiple times for the same area. I want a primary key that will stop the upload if I downloaded the same report twice. A composite primary will not work since some rows are exactly the same in the same report. Unique data rows does not matter to me. I just do not want duplicate .csv files being uploaded because it will double the revenue for that area. Any one have any ideas whether it be a primary key or a constraint?Gregory Cardullo |
|
cardullo4321
Starting Member
40 Posts |
Posted - 2012-02-08 : 08:51:24
|
I think I have an idea. I am going to use a timestamp. So if I do a distinct query, by the timestamp, I at least see them seperatedGregory Cardullo |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2012-02-08 : 09:08:27
|
That, and then fix the condition that allows you to upload the same file multiple times. For example, I'll rename and move the file (dynamically) after it's uploaded. |
|
|
cardullo4321
Starting Member
40 Posts |
Posted - 2012-02-08 : 11:34:30
|
Thanks Russle. That was my goal. I am finished.Gregory Cardullo |
|
|
|
|
|