Skip to Content
author's profile photo
Former Member

How to turn flexible search statement into impex export

I would like to export the results of the following flexible query:

select {o.extendedorderid},{o.code}, {s.code}, {creationtime} from {order as o join orderstatus as s on {o.status}={s.pk}} where {s.code} = 'SUBMITTED'

I have been researching but still coming up short.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    author's profile photo
    Former Member
    Posted on Aug 06, 2016 at 06:52 AM

    you can also try

     INSERT_UPDATE order;pk;code;creationtime
     "#% impex.exportItemsFlexibleSearch( "" select {o:pk}, {o.code}, {o.creationtime} from {order as o join orderstatus as s on {o.status}={s.pk}} where {s.code} = 'SUBMITTED'"");"
     
    
    
    
    

    If you want to change the query to multiple joins then update the insert_update script accordingly.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Vinay,

      What would the syntax be if I were to export multiple fields from different types? I have updated my flexi query statement but how to modify the insert_update script?

      Regards, Nikhil

  • author's profile photo
    Former Member
    Posted on Aug 06, 2016 at 06:39 AM

    Hello John,

    Please go to HAC -> Console -> Impex Export. Then put below script. it will export. Similary you can put your query in the below example. Export. Script will be executed and exported data will come in the dataexport.zip.

      INSERT_UPDATE Employee;pk
      "#%impex.exportItemsFlexibleSearch(""select {pk} from {Employee} "");"
    
    Add comment
    10|10000 characters needed characters exceeded