on 01-08-2015 12:48 PM
if :Object_Type = '67' and (:Transaction_Type = 'U' or :Transaction_Type = 'A') THEN
begin
update "VISIONTEST"."OPDN" set "VISIONTEST"."OPDN"."U_GRNS" = 'Released'
from "VISIONTEST"."OPDN"
where OPDN."DocNum" = (Select Top 1 TO_NVARCHAR( OWTR."U_grn")
from "VISIONTEST"."OWTR" where OPDN."DocEntry"= To_Nvarchar(OWTR."U_grn") and OWTR."DocEntry"=:list_of_cols_val_tab_del);
end ;
END IF;
Hi,
Try this
if :Object_Type = '67' and (:Transaction_Type = 'U' or :Transaction_Type = 'A') THEN
begin
update "VISIONTEST"."OPDN" set "VISIONTEST"."OPDN"."U_GRNS" = 'Released'
where OPDN."DocNum" = (Select Top 1 TO_NVARCHAR( OWTR."U_grn")
from "VISIONTEST"."OWTR" WHERE OWTR."DocEntry"=:list_of_cols_val_tab_del) AND OPDN."DocEntry"= (SELECT To_Nvarchar(OWTR."U_grn") FROM
"VISIONTEST"."OWTR" WHERE OWTR."DocEntry"=:list_of_cols_val_tab_del );
end ;
END IF;
Regards,
Manish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
assume your
(Select Top 1 TO_NVARCHAR( OWTR."U_grn")
from "VISIONTEST"."OWTR = 200024 i.e Docnum= 200024 and docentry= 200025
then run the below query
update "VISIONTEST"."OPDN" set "VISIONTEST"."OPDN"."U_GRNS" = 'Released'
where OPDN."DocNum" = 200024 AND OPDN."DocEntry"= 200025
if this update your field then the above TN should work.
Regards,
Manish
this TN is working on SQL perfectly but i cnt convert it on HANNA.
if @object_type = '67' and (@transaction_type = 'U' or @transaction_type = 'A')
begin
update OPDN set OPDN.U_GRNS = 'Released'
from OPDN
where OPDN.DocNum = (Select Top 1 convert( int,OWTR.U_grn)
from OWTR where OPDN.DocNum = convert(int,OWTR.U_grn) and OWTR.DocEntry = @list_of_cols_val_tab_del)
end
Hi,
Can you explain a little that what you want to achieve with this command
(Select Top 1 TO_NVARCHAR( OWTR."U_grn")
my reason of asking is because this command is giving the result in an undefined order .
Regards,
Manish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try:
if :Object_Type = '67' and (:Transaction_Type = 'U' or :Transaction_Type = 'A') THEN
begin
update "VISIONTEST"."OPDN" set "VISIONTEST"."OPDN"."U_GRNS" = 'Released'
from "VISIONTEST"."OPDN"
where OPDN."DocNum" = (Select Top 1 ( OWTR."U_grn")
from "VISIONTEST"."OWTR" where OPDN."DocEntry"= To_Nvarchar(OWTR."U_grn") and OWTR."DocEntry"=:list_of_cols_val_tab_del);
end ;
END IF;
Thanks & Regards,
Nagarajan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
100 | |
11 | |
11 | |
6 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.