Newbie alert: SQL Server 2000: How do I UPDATE data already loaded
- From: Ed B <EdB@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 29 Jan 2008 13:55:00 -0800
Hi everyone,
I am working to learn DTS as a method to pull data from legacy Access
database(s) into a new SQL Server 2000 data structure, rather than using
Access to push the data there.
I have a table of lookup values (used in combo box [cbo] drop-down lists)
that includes fields:
ListDataID (long key; the data actually stored in the target tables)
ListName (varchar; used to group like list items--e.g. 'Country',
'UserStatus', etc.)
ListLabel (varchar; The individual plain-text values for each ListName that
the users choose--e.g. 'USA','Canada'; 'Active', 'Inactive', etc.)
ListOrder (int; The order in which ListLabels are displayed in the drop-down
cbos)
The data structures are similar enough that I've been able to successfully
load/transform the data from the Access table to the SQL Server table using
DTS.
Here's the problem: I have another table that maps ListLabel to
ListOrder_new, which I want to use to Update the existing ListOrder values
for only those records with ListName='Country'. IOW, what I'm trying to do
is to, after loading the data, reorder the Country values so that USA and
Canada will show up first and second (they are the most common choices in the
data set) in the cbos, then the rest in order as defined in the reordering
table.
I haven't been able to figure out how I might use the Lookup function to do
this during the initial transformation/load, because I'm only trying to
modify the List Order values for a subset (ListName = 'Country') of the whole
table, while leaving the List Order values for the other ListNames unchanged.
I've tried using the Data-driven Query Task, but either this is
inappropriate or I do not understand how it is supposed to work; what I've
tried to do is have the same connnection and table be the source (to get
ListLabel where ListName = 'Country') and destination to update 'ListOrder'
via the Lookup (using a connection to my map table), but I get a message
"source and dest can't be the same"
I have the feeling that, in an abudance of newbieness, I'm missing something
obvious (like how to do a conditional Lookup on-the-fly during the initial
transformation/load or some other post-load Update method or ???) and I know
all y'all will be able to tell me what the solution is. If the answer is
"get a new job," then so be it ;-)
Thanks in advance for the help.
Regards,
Ed
.
- Prev by Date: RE: transfering data between two servers
- Next by Date: Re: ssis in evaluation version
- Previous by thread: ssis, sql job and windows authentication - how to impersonate
- Index(es):
Relevant Pages
|