Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I'm tryring to store old data into mysqql database from csv files,
I have two tables mother and Daughter, both have auto_increment id:
table 1 : id, fname, lname .. etc
table 2 : id, id_table1
after storing a row in table1 I should store it's primary key in table2.
In the photo below table1 is "responsable" and table2 is "agent_suivi"
the method "Select Last_Insert_id()" didn't work for me because I don't have other attributes to store I have only the id of the table mother , so using the map directly requires at least one column to link between tmap and tmysqloutput.
How can I do it?
Hi
You have to use tmysqllastinsertid component to bring last inserted value for next step. I have attached component image also
hope it will help to resolve ur problem
I checked for mssql same kind of component worked fine.
Is this something what could work?
SELECT `AUTO_INCREMENT` FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'DatabaseName' AND TABLE_NAME = 'TableName';
I don't know how to use it.
Actually, I'm blocked between the "tMysqlOutput" of the table mother and the "tMysqlInput" of the other table in which I want insert the last inserted ID in the table mother
My question is how to link between these two components and store the id retrieved from the first one to the second?
Hi
You have to use tmysqllastinsertid component to bring last inserted value for next step. I have attached component image also
hope it will help to resolve ur problem
I checked for mssql same kind of component worked fine.
I used the "tMysqlLastInsertedId" and it worked
Thank you for your help.