I have a table TICKET and SEGMENTS, in the table TICKET there is a column dop_zbor_naprav where I add a number. In the SEGMENTS table there is a column BASICFARE where to have the desired data (GC10) to update the column dop_zbor_naprav in the table TICKET. I want if in the SEGMENTS table in the BASICFARE column there was a given "GC10" updated the TICKET table in the dop_zbor_naprav column with the number I needed. Guys help with the request very much I ask.
Like this request, I know that this request does not work!
update TICKET set dop_zbor_naprav='300' where = (select from SEGMENTS where BASICFARE like '%GC10%')
where = ( ...)and what exactly is equal from the first table to the value that the subquery returns? to the left of the equal sign, there must be something to stand ... Andselect from SEGMENTScannot be, between the words select and from it must be indicated what exactly you want to get from the table. - Mikeupdate TICKET set dop_zbor_naprav='300' where BSONUM IN (select BSONUM from SEGMENTS where BASICFARE like '%GC10%'). The main thing is to first formulate the task correctly ... - Mike