Re: [SQL] Triggers

2006-08-22 Thread Kis János Tamás
Hi, Plesae read my previous message in this mail list, on 2006-08-15. 14.20 at " [SQL] Undo an update" thread. bye, kjt McAfee SCM 4.1 által ellenőrizve! ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriat

[SQL] to get DD-MM-YYYY format of data

2006-08-22 Thread Penchalaiah P.
Hi ..   I am using date is data type to one of the field in my table….but when ever I am passing values to that field it is taking yyy-mm-dd format.. But I don’t want like that .. I need like this DD-MM-.. for this wt I have to do…   Thanks  &  Regards Penchal reddy | Software En

Re: [SQL] to get DD-MM-YYYY format of data

2006-08-22 Thread Michael Fuhr
On Tue, Aug 22, 2006 at 06:46:11PM +0530, Penchalaiah P. wrote: > I am using date is data type to one of the field in my tablebut when > ever I am passing values to that field it is taking yyy-mm-dd format.. > > But I don't want like that .. I need like this DD-MM-.. for this wt > I have t

Re: [SQL] to get DD-MM-YYYY format of data

2006-08-22 Thread Alvaro Herrera
Penchalaiah P. wrote: > I am using date is data type to one of the field in my tablebut when > ever I am passing values to that field it is taking yyy-mm-dd format.. > > But I don't want like that .. I need like this DD-MM-.. for this wt > I have to do... Read the documentation on the "D

[SQL] joining VIEWs

2006-08-22 Thread Brian Cox
Given a view like: create view view1 as select g.id as UserGroupId, s.uid as UserId, s.time as StartTime from stats s join groups g on g.uid = s.uid and a SELECT like: select a.UserGroupId,b.UserGroupId from view1 a full outer join view1 b on b.UserGroupId = a.UserGroupId WHERE a.StartTime >= '2

Re: [SQL] joining VIEWs

2006-08-22 Thread Stephan Szabo
On Tue, 22 Aug 2006, Brian Cox wrote: > Given a view like: > > create view view1 as > select g.id as UserGroupId, s.uid as UserId, s.time as StartTime from stats > s join groups g on g.uid = s.uid > > and a SELECT like: > > select a.UserGroupId,b.UserGroupId from view1 a > full outer join vi

[SQL] SQL92 compliance

2006-08-22 Thread Daniel CAUNE
Hi, Is AS in "SELECT my_column AS my_name FROM my_table" mandatory to be SQL92 compliant? PostgreSQL requires this keyword by default when defining alias, which might be good thing. I mean, I would prefer being notified from a syntax error than spending a couple of hours wondering why a client a

[SQL] error with mor than 1 sub-select

2006-08-22 Thread chrisj
Hi, I am fairly new to PostgreSQL but not to SQL. Is this a bug or a limitation... The first query works fine, but when a second sub-query is added I get a syntax error... psql protocal2 -U p2user << EOF1 select * from serv_res SR where serv_key = 10 and not exists

Re: [SQL] SQL92 compliance

2006-08-22 Thread Michael Glaesemann
On Aug 23, 2006, at 10:40 , Daniel CAUNE wrote: Hi, Is AS in "SELECT my_column AS my_name FROM my_table" mandatory to be SQL92 compliant? You can find this in the documentation: http://www.postgresql.org/docs/8.1/interactive/sql-select.html#AEN48391 The AS Key Word In the SQL standard,

Re: [SQL] error with mor than 1 sub-select

2006-08-22 Thread Michael Fuhr
On Tue, Aug 22, 2006 at 06:47:51PM -0700, chrisj wrote: > The first query works fine, but when a second sub-query is added I get a > syntax error... > > psql protocal2 -U p2user << EOF1 > select * >from serv_res SR >where serv_key = 10 > and not exists > (

Re: [SQL] error with mor than 1 sub-select

2006-08-22 Thread Osvaldo Kussama
chrisj <[EMAIL PROTECTED]> escreveu: Hi,I am fairly new to PostgreSQL but not to SQL. Is this a bug or alimitation...The first query works fine, but when a second sub-query is added I get asyntax error...psql protocal2 -U p2user << EOF1select * from serv_res SR where serv_key = 10

Re: [SQL] error with mor than 1 sub-select

2006-08-22 Thread chrisj
thanks, stupid user error. i guess the pointer on the error message led me astray Michael Fuhr wrote: > > On Tue, Aug 22, 2006 at 06:47:51PM -0700, chrisj wrote: >> The first query works fine, but when a second sub-query is added I get a >> syntax error... >> >> psql protocal2 -U p2user << EO