Run command not insert/not working

Hi averyone!!
I have a issue with a run command
in my project I do divers INSERT, DELETE and UPDATE, previously all run commands worked but in March only one insert with inner join stopped working. No error appears in the robot, it just doesn’t do the insert.
I checked the sql directly in the database manager, but it works, even if I only run the sequence where that insert is located it also does
The sequence where I have the run commands is something like this
image

The properties for that insert are these
image

The output of that section when I run the entire robot
image
as can see it is inserting 0 records, when should insert 245 records
image

and as I mentioned before, if I run only the sequences where all the run commands are located, it does the insert correctly
image

I already tried with a run query, adding waiting time between each run commnad and using a connection string for each run command but I still can’t find a solution
Anyone else had this problem? help me please

@jessica.romero

Is it not throwing error also?

Ans are you using any variables in the auery…may be some variable is making it to not insert…as it is working if we run on sequence mostly it might be a data issue

Cheers

No, does not throw error, I also did not activate the option to continue if there is an error and I don’t use variable or parameter

@jessica.romero

  1. Try increasing timeout…
  2. show the query here

cheers

Hi,

this is the query

INSERT INTO DT3
SELECT DISTINCT (SELECT YEAR_PRC FROM DT2) AS YR,(SELECT MONTH_PRC FROM DT2) AS MTNH, N.POL, N.N_INV_ISS, N.TAXB, 0 AS BEN_APP
,ST_DATE, F.DOCN, N.DOCN AS NUM_NC,0,0
FROM
(
SELECT POL, DOCN , N_INV_ISS, TAXB, ST_DATE
FROM DT1
WHERE DOC_ST LIKE ‘STATUS 1’
) F
INNER JOIN (
SELECT POL,DOCN , N_INV_ISS, TAXB
FROM DT1
WHERE YEAR(ST_DATE)=(SELECT YEAR_PRC FROM DT2)
AND MONTH(ST_DATE)=(SELECT MES_PRC FROM DT2)
AND DOC_TY LIKE ‘TYPE 2’
) N ON F.POL=N.POL AND F.N_INV_ISS=N.N_INV_ISS
WHERE N.DOCN NOT IN (SELECT DISTINCT NUM_NC FROM DT3)

@jessica.romero pls do below steps

  • Check if the data used in the inner join exists and is valid

  • Check Select Query is working

  • You need to check the access rigts for login user

  • Check you are using server authatication for connection ( if you are using the window athantication then you might get this error)
    *Try to do this manaul and note the time taken by system and based on that you increase the time out

  • Print the Query in logs and then check manaul* so know you are using right query