Re: DTS Data Driven Query - Update column only if source not NULL?
- From: ralekel@xxxxxxxxxxx
- Date: 4 May 2006 10:59:41 -0700
Allan,
Thanks. I don't know what T-SQL is. I was looking it up a bit. Would
this mean I could make SQL statements with a check before updating the
column?
Can I execute T-SQL statements within a SQL Query task?
To elaborate on my problem...
Table movies
Title(PK) Rating Ranking
--------- ------ -------
Spiderman PG 4 Stars
LotR PG 5 Stars
Matrix I R 2 Stars
Table movies_override
Title(PK) Rating Ranking
--------- ------ -------
Matrix I <NULL> 4 Stars
After I populate the movies table, I want to have another DTS Task
update any values according to what is in the movies_override table. In
this case, I don't want to override the Matrix's Rating with a NULL,
just its ranking. I only want to update from my override table with
column values that are not NULL. I had originally planned on doing this
with a Data Driven Query Task. It sounds like there's a better way with
T-SQL?
Thanks
-Rob
Allan Mitchell wrote:
Hello ralekel@xxxxxxxxxxx,
If both these datasets are in tables why not use TSQL? It will be far easier
and quicker.
If this cannot be achieved then can you explain a little bit more about your
situation?
Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com
I'm trying to use a data driven query to update a destination table
with overrides imposed by another table. This override table contains
some records where only certain columns are overriden. Columns I do
not
wish to override for a particular record are left NULL.
Is there a simple way I can use a DDQT to write a single update that
will only update the destination column if the source column is not
NULL?
Thanks
.
- Prev by Date: Sql Server 2005 Import Wizard (Integration Services) Hangs on Import
- Next by Date: Re: SSIS as part of scheduled job fails
- Previous by thread: Sql Server 2005 Import Wizard (Integration Services) Hangs on Import
- Next by thread: Insert All Columns
- Index(es):