[DB-SIG] Accessing oracle from remote machine

2007-01-09 Thread Sean Davis
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

Re: [DB-SIG] comparing with lists via cx_Oracle

2007-01-09 Thread Dieter Maurer
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(

Re: [DB-SIG] comparing with lists via cx_Oracle

2007-01-09 Thread Harald Armin Massa
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",

Re: [DB-SIG] comparing with lists via cx_Oracle

2007-01-09 Thread M.-A. Lemburg
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

Re: [DB-SIG] comparing with lists via cx_Oracle

2007-01-09 Thread Harald Armin Massa
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

Re: [DB-SIG] Accessing oracle from remote machine

2007-01-09 Thread Andy Todd
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