Showing posts with label lookup. Show all posts
Showing posts with label lookup. Show all posts

Friday, March 30, 2012

Inserted Rows count from SSIS not like table Rows Count

Hi all

i using lookup error output to insert rows into table

Rows count rows has been inserted on the table 59,123,019 mill

table rows count 6,878,110 mill ............................

any ideas

So from the error output you are getting 59 123 019 rows? How are you counting this?
What are you using to insert the rows?|||Mapping from values i get and columns on distination table|||How are you counting the rows inserted?|||

I figuer out the Reasone my lookup error output configure to ignore the error and the error was "can't insert duplicated key" i change the error output to insert duplicated rows in flat file but i don't test it yet , i will hint with updates , hope that's resolve the problem

wish me luck

Phil

I Count rows from distination table "Select Count "

|||

Hosam Abdel Wahab wrote:

Phil

I Count rows from distination table "Select Count "

I mean, how are you counting the rows inserted from within SSIS?

But, yes, it sounds like you are on the correct path to figuring out your problem.

Monday, March 12, 2012

insert statement

Hi

I am having a few problems writing an insert statement.

I have a customer table with lookup values inserted in some of the columns which reference another table

customer table

name address1 status

test high street 0

lookup table

code description

0 deleted

1 customer

--

I need to insert data from the customer table into another but not us the lookup table, the statement i have written is:

insert into export (name,address1,status)

select name, address1, ( select descritption from lookup inner join customer on lookup.code = customer.status) from customer

The problem is the subquery is showing all rows from the customer table which is giving me a an error due to inserting multi values which i would expect, the question is how can get round this? row by row inserts if possble but sure how to do this.

Hi

Try

select c.name, c.address1, lu.descritption

from customer c

inner join lookup lu

on lu.code = c.status

|||Thanks for your help worked a treat

Sunday, February 19, 2012

Insert or Update using DTS SERVER 2005

I am new to using DTS so forgive the newbie post.
I have CSV file that has records that lookup a value from a table in a
database and then write the record to the table with the lookup value.
This works for insert.
What I need is a way to check and see if the record already exists and
if so update.
It looks like a EXECUTE SQL transaction will do this but then how do
intercede the write to the actual table? I would like to use DTS.Hi
If you are using SQL 2005 you should be writing new packages in SSIS
(Integration Services). DTS was with SQL 2000. One way of doing this which
can be implemented in DTS and SSIS is to load the file into a staging table
and then update the existing data using the values in the staging table
(using a SQL Command Task) and then inserting rows from the staging table
into the live table that don't currently exist in the live table (using a SQL
Command Task).
This may give you some idea! http://www.sqlis.com/311.aspx
John
"axwack" wrote:
> I am new to using DTS so forgive the newbie post.
> I have CSV file that has records that lookup a value from a table in a
> database and then write the record to the table with the lookup value.
> This works for insert.
> What I need is a way to check and see if the record already exists and
> if so update.
> It looks like a EXECUTE SQL transaction will do this but then how do
> intercede the write to the actual table? I would like to use DTS.
>