I am new to the list, so if I am in the wrong place, feel free to direct me
elsewhere.
I am trying to connect to an Oracle installation on a remote machine. I have
installed the oracle instant client on my machine (linux x84_64) and can
connect via Oracle's sqlplus client to the remote machi
Harald Armin Massa wrote at 2007-1-8 19:01 +0100:
>Sometimes I have to get additional data for a set of ids, the usual select of
>
>select whatever from sometable where id in (1,2,3,4,5)
>
>Next level is, [1,2,3,4,5] is a Collection in Python (List, Tuple, Set)
>
>to transcribe it as
>
>cs.execute(
Dieter,
> >cs.execute("select whatever from sometable where id in (%(pyeles)s)",
> >dict(pyeles=[1,2,3,4,5]))
> Does "cx_Oracle" support Python parameter style?
It does not, my fault. That's not the problem I am focussed on.
cx_Oracle supports a "Oracle-Style Parameter fitted to Python dicts",
On 2007-01-09 21:03, Harald Armin Massa wrote:
>> If the problem is not the parameter style, it may be the
>> sequence --> string conversion. In this case, use can use
>> ",".join([1,2,3,4,5])
>> instead of "[1,2,3,4,5]".
>
> There MUST NOT be a conversion to a string.
>
> It has to be a
Marc-Andre,
> The standard SQL notation for value lists in SQL is
>
> x in (value1, value2, ...)
>
> so this should work pretty much with every SQL database.
yes. If I know the number of values beforhand, even parameters work:
x in (:value1, :value2, :value3)
(for being ":" the paramete
Sean Davis wrote:
> I am new to the list, so if I am in the wrong place, feel free to direct me
> elsewhere.
>
> I am trying to connect to an Oracle installation on a remote machine. I have
> installed the oracle instant client on my machine (linux x84_64) and can
> connect via Oracle's sqlp