|
|
Re: fetching dynamic columns from a table [message #622055 is a reply to message #622054] |
Wed, 20 August 2014 11:55 |
|
punitsoneji
Messages: 6 Registered: August 2014 Location: India
|
Junior Member |
|
|
Hi BlackSwan,
>suppose I have a table which has 25 columns and in the next run it might have more or less columns so I can't hardcode the column names in loop to fetch the values of it
>>For the same reason I made a collection of all available columns in this table on which I would perform actions
>say datatype of all columns in that table would be of varchar2(20)
Thanks
Punit Soneji
[Updated on: Wed, 20 August 2014 11:57] Report message to a moderator
|
|
|
|
Re: fetching dynamic columns from a table [message #622061 is a reply to message #622060] |
Wed, 20 August 2014 12:10 |
|
punitsoneji
Messages: 6 Registered: August 2014 Location: India
|
Junior Member |
|
|
> to where are these values supposed to go after you get them?
these values will be used to form a string as in below example :-
^^^p_id=>v_set,NULL,v_effective_from,v_effective_to~~~460000000,103~~~460000001,10~~~460000002,2~~~460000003,*~447471147```
103 - is value available @ column1
10 - is value available @ column2
2 - is value available @ column3
* - is value available @ column4
Numbers like 460000000,460000001,460000002 & 460000003 are available in another collection
and prefix of the string is predefined.
I hope you got my requirement
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: fetching dynamic columns from a table [message #622144 is a reply to message #622142] |
Thu, 21 August 2014 07:08 |
|
Michel Cadot
Messages: 68625 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
I already pointed to the documentation; my point is that, if you will have many problems to use it as table column type, there is no problem to use it in PL/SQL, as soon as you know what it is, no more problem than INTEGER, INT, SMALLINT, DECIMAL, NUMERIC, NATURAL or POSITIVE, it is just an alias for a constrained type.
[Edit: "it" missing"]
[Updated on: Thu, 21 August 2014 07:09] Report message to a moderator
|
|
|
|