473,396 Members | 2,121 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,396 software developers and data experts.

how to pass PL/SQL-BOOLEAN argument to procedure in Oracle

hey
im using cx_Oracle to connect my python code to Oracle database,
and i wanted to know how can i pass PL/SQL-BOOLEAN argument to procedure ?
my code is something like "cursor.execute(query,varList)"
where query is "begin SYS.MYPACKAGE.MYPROCEDURE(varcharArg => :1,booleanArg => :2); end;"
and varList is my argument list, and the second argument need to be of type BOOLEAN, how can i achive that ?
thanks !
Jun 26 '08 #1
3 5664
jlm699
314 100+
I'm confused on what exactly you're asking.. could you clarify a bit? Are you passing a boolean in Python to an Oracle database or are you passing an Oracle boolean to Python?

In Python the keywords True and False represent 1 and 0 respectively. There is also the bool() function which evaluates common objects to boolean true or false...

Anyways, could you provide slightly more specific information on what you're having trouble with?
Jun 26 '08 #2
10x for your replay,
im trying to pass a boolean value in Python to an Oracle database procedure(to PL/SQL BOOLEAN value that my Oracle procedure getting)
my oracle procedure is getting to values:1. varchar value,2.boolean value
and i want to execute this procedure from my python code, and i dont know hot to pass the boolean value to the Oracle procedure.
Jun 26 '08 #3
jlm699
314 100+
Expand|Select|Wrap|Line Numbers
  1. varChar = 'Some chars'
  2. boolArg = 'TRUE'
  3. query = "begin SYS.MYPACKAGE.MYPROCEDURE(varcharArg %s, booleanArg %s); end;" % (varChar, boolArg)
  4. cursor.execute(query,varList)
Is that what you're looking for?
Jun 26 '08 #4

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

Similar topics

2
by: Yarik | last post by:
Hello there! I am working with MS SQL Server 2000. I have a table function that takes an integer parameter and returns a table, and I can successfully use it like this (passing a literal as a...
2
by: mskorik | last post by:
Hello all, Is it possible to pass 2 SQL statements in a single call ? I keep SQL statements in a text file and usually there are couples of several SQL statements that represent a named unit...
3
by: dk | last post by:
Hi all, Would appreciate some advice on the following: I am trying to speed up an Access database connected to a SQL Server back-end. I know I can use a pass-through query to pass the sql...
6
by: Access Newbie | last post by:
I'm using Access 2000 and I'm trying to create a pass-through query to append all the data from a local table to a remote table. I'm using the SQL query editor in MS Access to create the query (I...
8
by: Tcs | last post by:
I've been stumped on this for quite a while. I don't know if it's so simple that I just can't see it, or it's really possible. (Obviously, I HOPE it IS possible.) I'm trying to get my queries...
2
by: Robert | last post by:
when using the following function to create a pass through query is there a way to set the query property, "Returns Rows" to no. The default is yes. Since we are planning to create the pass...
1
by: JM | last post by:
Hello, Using Access 2000 queries, you can reference(pass) form values directly using syntax like Forms!frmPaint!txtColor. I want to do a pass through query to SQL Server 2000, but I don't know...
3
by: Maciek Zywno | last post by:
Hi, I managed to do this by using a query and !! syntax, but it does not work with SPs. So I created a procedure with "@" to define a paraemter, but how can I pass a value to this procedure from...
7
by: Zlatko Matić | last post by:
Let's assume that we have a database on some SQL server (let it be MS SQL Server) and that we want to execute some parameterized query as a pass.through query. How can we pass parameters to the...
13
by: magickarle | last post by:
Hi, I got a pass-through query (that takes about 15 mins to process) I would like to integrate variables to it. IE: something simple: Select EmplID from empl_Lst where empl_lst.timestamp between...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.