FlowHeater - The Data Import / Export Specialist
See also the existing examples of using the MySQL Adapter Adapter, which may answer your question: CSV text file import , data migrating , exporting only new records

Update using lookup field

  • Francis
  • Topic Author
  • Offline
  • New Member
  • New Member
12 years 3 months ago #2067 by Francis
Update using lookup field was created by Francis
Hi M. Robert !

I'm getting another problem these days with mysql table as writer set to 'Update Data' only.

My problem is that I need to update all records related to the lookup field found ! It only update the first one as unfortunatly

It is a Part -> Items relation. I create items first, so then system don't create parts that has no items ( The lookup fail, so its ok! ). After I need to put information related to these items(Their part information) that are in another DB. But My lookup only update 1 record :S

I tried secondly using Group out Heater. Create part rows first, then do a Count(ID) lookup on my field to create as many rows as items related to part. The problem is that I must parse an excel to know this row number to create ( It is the column 1 named ID ).

So by now I did an ugly update .net script that grabs all fields that I need to update Items.
Then if the filter is good : AdapteWrite.Exec .. ( Update tblParts Set field 1 =... Field 2 =... field 3 =, field 4.. where pieceid = MYLOOKUPED_ID ! ).

Is there any other ways doing this ??.

Please Log in or Create an account to join the conversation.

12 years 3 months ago #2068 by FlowHeater-Team
Replied by FlowHeater-Team on topic Re:Update using lookup field
Hi Francis,

I don't know what you mean :unsure: Could you post example data, please?

Only your last case let me know what you want. If this runs you can switch the primary key information only to the "pieceid" field. FlowHeater generates then the SQL WHERE update statements like you in the .NET Script Heater .

Go on the MySQL Adapter configurator for the WRITE side and click on the "Fields / Data types" tab. Here you can switch the primary key fields. Click on the field and enable/disable the primary key checkbox.

NOTE: This doesn’t change the primary key on the database table. By these fields FlowHeater just generates the SQL WHERE statement for updates.

Warning: If you change the primary key information by yourself FlowHeater can update more than one record per each row.

Best wishes
Robert Stark

Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.

Please Log in or Create an account to join the conversation.

Time to create page: 0.292 seconds

other Languages


FlowHeater Home

de en


Privacy Statement

Copyright © 2009-2023 by FlowHeater GmbH.
All rights reserved.

Follow us on

twitter  facebook


 de en