473,322 Members | 1,523 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

How do we handle varchar2 parameter with comma delimiter and no quotes

Hi, My query gets directly executed in a report and a parameter is a varchar2 that gets the user_id passed with a comma delimiter but no quotes to the user_id( which are sometimes non-numeric), how can we handle this, i tried to pass this parameter to a function and return after appending quotes to it but this does not work as oracle searches user_id for the whole string returned ( eg user_id = '1','2',3'). Any help is appreciated

Thanks
Vidhya.P.C.
Jul 8 '10 #1
2 2803
debasisdas
8,127 Expert 4TB
try using a pipe lined function.
Jul 12 '10 #2
amitpatel66
2,367 Expert 2GB
Just check if DBMS_UTILITIES.COMMA_TO_TABLE can be used in oracle reports. this would help you convert comma delimited values to Oracle Collection (Table) format and then you can loop through table to perform desired task on each value.

Second option EXECUTE IMMEDIATE 'SELECT * from table_name WHERE user_id IN ('||p_user_id||')';
Jul 12 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Anders Dalvander | last post by:
os.popen does not work with parameters inside quotes, nor do os.popen. At least on Windows. import os cmd = '"c:\\command.exe" "parameter inside quotes"' os.popen4(cmd) Results in the...
6
by: SStory | last post by:
How can I handle the user entering single quotes like in Bob's mini mart? If I use command objects will this no longer be an issue? I guess that would mean no simple adhoc SQL statements...
5
by: SStory | last post by:
How can I handle the user entering single quotes like in Bob's mini mart? If I use command objects will this no longer be an issue? I guess that would mean no simple adhoc SQL statements...
2
by: Robert E. Flaherty | last post by:
I am using System.Data.OracleClient (Oracle Provider for OLE DB 9.2.0.4.0) in an ASP.NET 1.1 app. I am evoking a stored procedure with a number of input parameters and two output parameters, both...
14
by: bonehead | last post by:
Greetings, I'm using the DoCmd.TransferText method to export the results of a MS Access query to a csv file. The csv will then be used to load an Oracle table. In other systems such as TOAD...
1
by: excite | last post by:
I am now trying to use Python for data process, and I encounted a CSV file with different delimiter within a row, such as the following format: 2006/10/17 6.88, 9.88, ...................... so when...
1
by: swep | last post by:
To any who might be able to help this is the situation.I have a dropdown list that gets populated from SQL. It contains both single and double quotes. It populates the dropdown list just fine. I...
4
by: lawrence k | last post by:
I'm working in PHP 4. Even if a parameter is mandatory, I nearly always give it a default value of "false". Then I print an error message if someone who is calling my function forgot the mandatory...
1
by: kcosgayon | last post by:
Hello, I have a java program that creates a dynamic SQL statement with where clause. Is it possible to pass the query string (with string where clauses name = 'John") as a parameter in a stored...
10
by: teddyber | last post by:
Hello, first i'm a newbie to python (but i searched the Internet i swear). i'm looking for some way to split up a string into a list of pairs 'key=value'. This code should be able to handle this...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.