Skip to Content

invalid datatype: LOB type in distinct select clause: line 47 col 20 (at pos 1376)


SELECT distinct
T0."DocNum" as "BPR DOCNUM",
t0."DocEntry",
t0."U_UNE_BTNO" AS "BPR BATCHNUM",
t0."RlsDate",T0."ItemCode",
T4."ItemName",
t4."FrgnName" as "Genric Name",
t4."U_UNE_SLIF" AS "Shelf Life",
t4."U_UNE_DGL1" AS "DL NO",
t4."U_UNE_PKST" AS "Pack Style",
t4."U_UNE_APPC" AS "Appearance",
T4."U_UNE_STRG" AS "Storage Condition",
T4."U_UNE_THCT" AS "Therpeutic Category",
t4."U_UNE_MFRN" AS "MFR",
t4."U_UNE_BMRN" AS "BMR",
t4."U_UNE_ITTP" AS "ItemType",
t13."U_Une_EDate" as "Effective Date",
t13."U_UNE_SPSD" as "Supersedes",
CASE
WHEN t4."U_UNE_MRKT" = 'D' THEN 'Domestic'
WHEN t4."U_UNE_MRKT" = 'E' THEN 'Export'
ELSE 'NA'
END AS "Market",
t0."U_UNE_MFGD" AS "MFG Date",
t0."U_UNE_EXPD" AS "EXP Date",
t0."U_UNE_SFG_DOC",
t14."DocEntry",
t14."U_UNE_BTNO",
T4."U_UNE_CNTRY",
T0."PlannedQty" as "B. Size Taken",
T0."CmpltQty",t4."U_UNE_PKSZ" ,
T1."VisOrder",
T1."ItemCode" AS "PM Code",
T5."ItemName" AS "PN NAME",
t1."PlannedQty" as "Quantity Batch size taken",
t1."U_UNE_STDQ" AS "Standered Qty",
t5."InvntryUom" as "UOM",
t16."U_PD_SN" AS "SR NO",
t16."U_PD_TITLE" AS "Title",
t16."U_PD_PGN" AS "Page No.",
t16."U_PD_RK" AS "Remark.",

---General instruction
t17."U_PD_FRFN" AS "Formatting for No.",
t17."U_PD_NSL" AS "No.Style for Level",
t17."U_PD_TTL" AS "Title",
t17."U_PD_CNTS" AS "Contents",
t17."U_PD_CNTP" AS "Content Type"

FROM OWOR T0
INNER JOIN WOR1 T1 ON T0."DocEntry" = T1."DocEntry"
inner JOIN OITM T4 ON T0."ItemCode" = T4."ItemCode"
inner JOIN OITM T5 ON T1."ItemCode" = T5."ItemCode"
INNER JOIN OITT T13 ON T1."ItemCode" = T13."Code"
left outer join owor t14 on t0."U_UNE_SFG_DOC"=t14."DocEntry"
left outer join "@UNE_PDRECD" t15 on t13."U_UNE_PRDT"=T15."Code"
left outer JOIN "@UNE_LOC" t16 on t15."Code"= T16."Code"
left outer JOIN "@UNE_GNINS" t17 on t15."Code"= T17."Code"
LEFT OUTER JOIN (select STRING_AGG(T23."U_UNE_COMP",',') AS "U_UNE_COMP",T22."U_UNE_ITCD"
From "@UNE_COMPOSITIONH" T22
INNER JOIN "@UNE_COMPOSITIONDET" T23 ON T22."DocEntry"=t23."DocEntry"
GROUP BY T22."U_UNE_ITCD") T24 ON T24."U_UNE_ITCD"=T0."ItemCode"
WHERE (T0."Status" ='R' OR T0."Status" ='L') and t0."U_UNE_BTNO" not like '%%R%%'

ORDER BY T1."VisOrder"

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers