1. Olan Knight
  2. PowerBuilder
  3. Wednesday, 27 June 2018 20:12 PM UTC

PBv12.1, b7055
Oracle 12C

I've inherited PBv9 code that uses a string arr as a retrieval argument in a dw.

I migrated the code to PBv12.1, and now the dw fails on the retrieve and returns zero rows.
   - When I take the parameters and enter them one at a time, each value returns data.

Original string array with data:
>>>> Well, for some reason I can no longer paste images here. <<<<<<<  

string    is_list_of_cllis [19]
[1] = "CHCGILGGDS2"
[2] = "DKLBILRS0MD"
[3] = "DLLSTXTLDS8"
.
. and so on


I'm trying to manually enter a string array, and everything I try EXCEPT a single value errors out with a "ORA-00907:  Missing right parenthesis".

How do I manually enter string array data as a dw parameter?

 

Thanks,

Olan

 

Who is viewing this page
Accepted Answer
Andreas Mykonios Accepted Answer Pending Moderation
  1. Thursday, 28 June 2018 09:53 AM UTC
  2. PowerBuilder
  3. # Permalink

Hi Olan.

Normally they are comma separated values like in the following screenshot:

If you work with strings the values have to be enclosed in single quotes... It' similar to a IN keyword in SQL. Look at the following screenshot:

Pressing ok gives the result you see behind the modal window.

The examples you see are based on PB Demo DB V2017R2. Sql for fname:

  SELECT "customer"."id",   
         "customer"."fname",   
         "customer"."lname",   
         "customer"."address",   
         "customer"."city",   
         "customer"."state",   
         "customer"."zip",   
         "customer"."phone",   
         "customer"."company_name"  
    FROM "customer"  
   WHERE "customer"."fname" in ( :fname )    


The declaration of the retrieval argument fname is shown on the modal window.

Andreas.

Comment
  1. Olan Knight
  2. Thursday, 28 June 2018 21:43 PM UTC
Thanks, Andres. That's exactly what I was seeking!



Olan

  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 27 June 2018 21:02 PM UTC
  2. PowerBuilder
  3. # 1

Hi Olan;

  Arrays are handled in the DW's Retrieval Arguments via the SQL Painter ...

HTH

Regards .. Chris

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.