Hello,
I am trying to make the in clause and appending in where clause with
and/or
I used in_ to make the in clause
I want to make the dynamic where so i go on makking the and_, or _and
the end result i put in where
Now the priblem is with in clause.
Eg :
i made in like res = id in_((1,2,3,4
Hello,
I am tryin to make the dynamic where clause using append_whereclause.
But how i can do that, For eg :
I have a==b and c in (1,2,3,4) or d like %s
So i made three sqlalchemy expression
1. a==b
2. c in (1,2,3,4) [ using in_]
3. d like %s [using like]
now i want this 3 to stuff in where
Hello ,
I am trying to insert in the table using two ways in the values which
i show below
engine = sqlalchemy.create_engine()
metadata = MetaData()
t1 = Table('master',metadata) # assume master has 2 feilds name , city
t1.insert({'name':'','city':'bank'})
engine,execute(t1)
This works f
Hello,
I want to add the alias for the columns is it possible in sqlalchemy.
Say i have select id as uid from xyz
so i do like this
t1 = Table("xyz", metadata)
id = Column("id")
Now i want to add alias to it
id = Column("id",alias_= "uid") :( didnt work
Can i add it later like i make default
Hello
I want to make a join with using .
Eg. Table1 join table2 using (id)
How can i do this?
I have tried for join like table1 join table on t1.xx = t2.xx
Making the object like
t1 = Table(t1 ,metadata)
t2 = Table(t2 ,metadata)
t1xx = Column(xx)
t1.append_column(t1xx)
t2xx = Column(xx)
t2.ap
I have made some sql.expression and add them in dict like
{'where':[ ]} something like this
In the process it goes in some other dict
When now i try to do deepcopy i get error
File "/var/lib/python-support/python2.5/sqlalchemy/util.py", line 574,
in __setitem__
self._list.append(key)
Attribu
Hello ,
I am trying to make query like
select (a+b) from xyz;
to do this
xyz = sqlalchemy.Table('xyz',metadata)
a = sqlalchemy.Column('a', sqlalchemy.Integer)
xyz.append_column(a)
b = sqlalchemy.Column('b', sqlalchemy.Integer)
xyz.append_column(b)
column = [(a + b)]
select = sqlalchemy.selec
but i dont want to see all this queries only the query i execute
On Jan 1, 10:29 pm, Michael Bayer wrote:
> thats the SQL which SQLAlchemy is emitting.
>
> On Jan 1, 2009, at 2:31 AM, Ash wrote:
>
>
>
> > Hello
>
> > i am using sqlalchemy
>
> > and t
Hello
i am using sqlalchemy
and to trace the query i use metadata.bind.echo = True
but the o/p is very strange it gives the catalog queries.
like
INFO:sqlalchemy.engine.base.Engine.0x..4c:
SELECT attname FROM pg_attribute
WHERE attrelid = (
SELECT indexrelid FR
Hello ,
I am usinng sqlalchemy for making the sum on column i am using
sqlalchemy.func.sum (col_name).
I am getting the error while dng it .
Code snnipet
aggregator=sqlalchemy.func.sum('product_sold')
make_select = sqlalchemy.select(from_obj=[sales],columns=
[aggregator],distin
Hello,
I want to know how to implement the cross join using sqlalchemy
I create the metadata say metadata
i have table a and b which i want to cross join.
a_o = sqlalchemy.Table('a',metadata,autoload=True)
b_o = sqlalchemy.Table('b',metadata,autoload=True)
j = join(a_o,b_o, onclause=a_o.c.b_i
Sorry i got the error and now its working
On Nov 15, 11:10 am, Ash <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I am using sqlalchemy version 0.4.6
>
> While running i am gettng the error
> Code :
> engine = sqlalchemy.create_engine("postgres://[EMAIL PROTECTED]:54
Hello,
I am using sqlalchemy version 0.4.6
While running i am gettng the error
Code :
engine = sqlalchemy.create_engine("postgres://[EMAIL PROTECTED]:5432/
aaa",echo=True)
metadata = sqlalchemy.MetaData(engine)
table_a1=sqlalchemy.Table('table_a1', metadata, autoload=True)
I am getting error i
Hello,
I tried with joins on sqlalchemy (Postgres)
It gives me a error that i cant figure out . But the query it gives me
(echo True)
Works fine seems to be no error in this .
Thanks in advance
--~--~-~--~~~---~--~~
You received this message because you are subs
Hi to everyone
I am using date_part to get data from PostgresSQL and i want to fetch
data quarter wise (Q!,Q2,Q3,Q4)
The query date_part('month', ) in (1,2,3) works well in
postgres and fetch for first 3 months but how to put it in
sqlalchemy ...
I hope u got what i am asking for .
Pls help i
15 matches
Mail list logo