[SQL] Selecting rows as if they were columns?

2003-10-09 Thread Kurt Overberg
Gang, I've got what I think should be a pretty simple problem- I just can't figure out how I'd do it. Heck, I can't even figure out how I'd search for an answer to this problem. I've got 2 tables: member and member_attr Member is just a standard entry for a member. Very simple: table member

Re: [SQL]

2003-10-09 Thread Jan Wieck
Vishal Charan (IT Fiji) wrote: please remove my email from your database contacts. Best Regards, *_Vishal Charan_* *IT Support * *Courts/Homecentres* Is this another worm that attempts to lower the internet traffic by requesting to remove people from mailing lists? It's the 5th or so "unsubs

Re: [SQL] Selecting rows as if they were columns?

2003-10-09 Thread Josh Berkus
Kurt, > I've got what I think should be a pretty simple problem- I just can't > figure out how I'd do it. Heck, I can't even figure out how I'd search > for an answer to this problem. This is an old common SQL problem ... the "crosstab" table. There are 3 standard ways to solve it, depending

Re: [SQL] Selecting rows as if they were columns?

2003-10-09 Thread Richard Huxton
On Thursday 09 October 2003 18:14, Josh Berkus wrote: > Kurt, > > > I've got what I think should be a pretty simple problem- I just can't > > figure out how I'd do it. Heck, I can't even figure out how I'd search > > for an answer to this problem. > > This is an old common SQL problem ... the "cro

Re: [SQL] SQL query problem

2003-10-09 Thread Stuart Barbee
Marek, Not sure but, try switching the lines db_data.mda_mod_con _CON, db_data.set_mda_fue _FUE with db_data.set_mda_fue _FUE, db_data.mda_mod_con _CON so there query is: SELECT _CON.con_id, _MOD.mod_ty, _VER.version, _YEA.year, _CON.dri_id, _CON.man_cod, _ENG.eng_p

Re: [SQL] [GENERAL] SQL query problem (many table in FROM statement and many LEFT JOIN's)

2003-10-09 Thread Marek Lewczuk
> > SELECT > > _CON.con_id, > Please make sure you get the quoting right regarding table > names. PostgreSQL will fold _CON into _con unless quoted > "_CON". So, it may be that you created the table with quotes > ("_CON"). Now, in your query you don't use quotes and thusly > it is looking for

[SQL] SQL query problem

2003-10-09 Thread Marek Lewczuk
Hello, I'm in the middle of the migration process from MySQL to PostgreSQL and I cannot understand why this query isn't working (in MySQL it's working fine). PG returns: ERROR: Relation "_con" does not exist This is my query: SELECT _CON.con_id, _MOD.mod_ty, _VER.version, _YEA.year, _C

Re: [SQL] SQL query problem

2003-10-09 Thread Bruno Wolff III
On Thu, Oct 09, 2003 at 20:52:58 +0100, Marek Lewczuk <[EMAIL PROTECTED]> wrote: > Hello, > I'm in the middle of the migration process from MySQL to PostgreSQL and > I cannot understand why this query isn't working (in MySQL it's working > fine). PG returns: ERROR: Relation "_con" does not exist