HI...
I need to do a simple task but it's difficult to a newbie on ssis..
i have two tables...
first one has an identity column and the second has fk to the first...
to each dataset row i need to do an insert on the first table, get the @.@.Identity and insert it on the second table !!
i'm trying to use ole db command but it's not working...it's showing the error "Insert Value list doest not match column list"
here is the script
INSERT INTO Address(
CepID,
Street,
Number,
Location,
Complement,
Reference)Values
(
?,
?,
?,
?,
?,
?
)
INSERT INTO CustomerAddress(
AddressID,
CustomerID,
AddressTypeID,
TypeDescription) VALUES(
@.@.Identity,
?,
?,
?
)
what's the problem ?
Is that a cut and paste of your query?There is a missing space between "Reference)" & "Values" in the first insert statement.|||Yes...it's a copy past....
I did what you ask and the problem remains the same|||Then you must not have all of the parameters mapped. Looks like 9 parameters.|||But i'm sure that is a problem....because sql is not mapping automatic !! and i can't do it manual to !! it doesn't work!|||
Alexandre Martins wrote:
But i'm sure that is a problem....because sql is not mapping automatic !! and i can't do it manual to !! it doesn't work!
When you click on the Column Mappings tab, you can't map the columns accordingly?|||
No! it's showing the warning "Insert Value list doest not match column list" and not mapping...
The funny thing is.....this way don't works
INSERT INTO Address(CepID,Street,Number,Location,Complement,Reference)
Values(?,?,?,?,?,?)
INSERT INTO CustomerAddress(AddressID,CustomerID,AddressTypeID,TypeDescription)
VALUES(@.@.Identity,?,?,?)
but this way
INSERT INTO Address(CepID,Street,Number,Location,Complement,Reference)
Values(?,?,?,?,?,?)
INSERT INTO CustomerAddress(AddressID)
VALUES(@.@.Identity)
works perfect.....but i need the other fields....
i changed the table too to test....and with one field works....two or more "Insert Value list doest not match column list" and not mapping"
i don't know what to do....
No comments:
Post a Comment