PC SOFT

GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEVWEBDEV e WINDEV Mobile

Inicio → WINDEV 2024 → update query based on a joined table and a formule
update query based on a joined table and a formule
Iniciado por christine, jan., 27 2005 8:36 PM - 1 resposta
Publicado em janeiro, 27 2005 - 8:36 PM
I want to make an Update Query where the field in tcolli will be updated to TColli.coStatus + 100
Remarque : it is a query with a kind of join between to tables and where the important condition is in the joined table. The update has to be done in the first table (tcolli).
I composed already a select query where it gives me the correct record :
SELECT TColli.coColliRefsID AS coColliRefsID,
TColli.coStatus AS coStatus,
PTColliStatusDescriptions.ptscdReadyToGroup AS ptscdReadyToGroup
FROM PTColliStatusDescriptions, TColli
WHERE PTColliStatusDescriptions.ptscdStatusNummer = TColli.coStatus
AND TColli.coColliRefsID = '0831471'
AND PTColliStatusDescriptions.ptscdReadyToGroup = 0
But i want to make it an update query where the Tcolli.costatus will be replaced by a value which is calculated (tcolli.costatus + 100 ) .SO not just a value but a result of a calculation.
Is this possible in Windev ?
Thanks
Publicado em janeiro, 28 2005 - 12:44 PM
I think it is not supported by the graphical interface of Windev... So i tried the sql code .
UPDATE tcolli,ptcollistatusdescriptions SET tcolli.costatus=tcolli.costatus - 100 WHERE tcolli.coordersid={pOrderNummer} and tcolli.costatus = ptscdstatusnummer and ptscdReadytogroup=0