Ramco Ramco

Ramco Ramco

  • 437
  • 3.4k
  • 541.8k

Query Value to be stored in Variable

Dec 15 2024 2:49 PM

Hi

  Ihave below query and i want if no record exists then in a variable No value should gets stored else Yes

SELECT 'Invoice',T0."TransId" , T0."DocNum", T0."DocDate",T0."BPLName", T0."CardCode"
FROM OINV T0 
INNER JOIN CRD1 T3 ON T0."CardCode" = T3."CardCode"
INNER JOIN INV12 T5 ON T5."DocEntry" = T0."DocEntry"
LEFT JOIN "LIVE"."@EINV"  T4 ON T0."DocEntry" = T4."U_UTL_BaseEntry"

where T0."CardCode" = T3."CardCode" and T3."GSTRegnNo" <> ''
and T0."DocEntry" NOT IN (Select A4."U_UTL_BaseEntry" from "LIVE"."@EINV" A4 where A4."U_IST" <> 'F' )

Thanks


Answers (3)