cancel
Showing results for 
Search instead for 
Did you mean: 

Selecting Columns/Parameters Randomly

Former Member
0 Kudos

Hi All,

I would like to ask one thing.

Is it possible to selecet  parameters or columns randomly from table ?

I am working on PAL where i want to pick parameters or columns randomly.

Picking rows randomly is ok but how to pick columns or parameters?

Please guide me.

Thanks & Regards,

Zaib

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

It sounds like a terrible idea, because PAL is picky about data types. But assuming that you really want to do this... 🙂

You can code dynamic SQL to create a temporary table to pass to PAL. You would transpose the columns into an array, and pick random elements from the array. Then you use:

lt_temp_table := SELECT RANDOM1, RANDOM2, RANDOM3 FROM TABLE;

And pass this into the PAL function wrapper.

John