on 10-20-2016 3:54 PM
Hi,
Im trying to export below query from System-tools-export
INSERT_UPDATE Customer;uid[unique=true,allownull=true];customerType(code) "#% impex.exportItemsFlexibleSearch( ""SELECT {C.uid}, {PCT.code} from {Customer} as C join Pangaea2CustomerType as PCT on {C.customerType} = {PCT.PK} } where {PCT.code}='Migrated'"" );"
I want to only export customer which are tagged as Migrated.Only customers which have enum values as Migrated. But this query throws error for PK.
Please need your help here.
Regards, Siddhi
As on this answer https://answers.sap.com/questions/12760500/flexible-search-query-return-null-in-java-file-but.html?c...
You need to select the pk of the objects that you want exported.
More like:
INSERT_UPDATE Customer;uid[unique=true];customerType(code)
"#% impex.exportItemsFlexibleSearch( ""SELECT {c.pk} from {Customer as C join Pangaea2CustomerType as PCT on {C.customerType} = {PCT.PK} } where {PCT.code}='Migrated'"" );"
(Also as Raghavendra noted you had an rogue curly brace }
in there)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Siddhi,
There is a issue with the above script. It contains one extra bracket after customer in customer as c.
Please try the below script, it should work.
INSERT_UPDATE Customer;uid[unique=true,allownull=true];customerType(code) "#% impex.exportItemsFlexibleSearch( ""SELECT {C.uid}, {PCT.code} from {Customer as C join Pangaea2CustomerType as PCT on {C.customerType} = {PCT.PK} } where {PCT.code}='Migrated'"" );"
Regards,
Raghavendra.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.