FlowHeater Demo Video
 
FlowHeater - The Data Import / Export Specialist
 
Welcome, Guest
Username: Password: Remember me
Take a look at the available general examples, your question may already be answered here: Hello World 1 / 2 / 3 , format numbers as character strings , simple If-Then-Else , complex If-Then-ElseIf , filtering and grouping data , consolidate grouped values
  • Page:
  • 1

TOPIC: SQL Update statement

SQL Update statement 8 years 1 month ago #2089

  • FlowHeater-Team
  • FlowHeater-Team's Avatar Topic Author
  • Offline
  • Posts: 317
Translated submission in the German forum. You can read the original entry here .

Hello,

I want to update a field of an SQL database, in this case overwriting a value of 9 to 0 (the record is to be cleared).

Should I place the SQL Adapter on both READ and WRITE sides with the relevant database table?
Is the field then updated using a Replace Heater?

I have experimented with it this way and obtain the following SQL statement:

update [VEIS_INVOICE] set [ENTITYSTATE] = 0 where [PK_VEIS_INVOICE] = null

But it doesn’t work.
What am I doing wrong?

Best wishes
Martin

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.

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.

Re:SQL Update statement 8 years 1 month ago #2090

  • FlowHeater-Team
  • FlowHeater-Team's Avatar Topic Author
  • Offline
  • Posts: 317
Hallo Martin,

Your approach of using the same table twice (once for READ, once for WRITE) is correct.

In order that an SQL Update statement is (correctly) generated, the Primary Key fields of the READ/WRITE sides must be connected together.

All of the Heaters connected are always executed and this also applies to an UPDATE.

Please make certain that in the Configurator for the SQL Server Adapter on the WRITE side that the option UPDATE is checked! Then everything should work.

WARNING: If on the READ side you do not define a WHERE clause restriction, then all records in the table are updated.

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.

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.
  • Page:
  • 1

other Languages

de

FlowHeater Home

de en

Imprint/Contact

Privacy Statement

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

Follow us on

twitter  facebook

YouTube

 de en