Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dynamic variable creation in oracle:

I dont know is it accurate question which i want to ask:

Bassicly i want to create variable at run time: like this:

SQL
select * from table t where t.name in ("here i dont know the number of values, and can be insert at run time");


my complete problem is, I was given multiple values in decimel format, first i have to convert these values in HAX format manually and then concate some of these values and then put it in query, I want to automate this whole process in oracle, say when i run procedure it ask me for values in decimle(number of values unknown) then procedure convert these values in HAX and some of these values concatinate and then insert it in query.
How can i accomplish this task.
Posted
Updated 25-Feb-15 20:58pm
v2

1 solution

You need to create stored procedure[^] and pass string with comma separated values. Then you need to split comma separated values[^] to be able to compare them to database values.

That's all! Try!
 
Share this answer
 
Comments
_Asif_ 26-Feb-15 3:15am    
+5
Maciej Los 26-Feb-15 3:52am    
Thank you, Asif ;)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900