Re: [SQL] a wierd query

2004-05-13 Thread Edmund Bacon
sad wrote: select distinct a as F from table union select distinct b as F from table; Note that UNION only returns the unique values of the union You can get repeated values by using UNION ALL. -- Edmund Bacon [EMAIL PROTECTED] ---(end of

[SQL] a wierd query

2004-05-13 Thread [EMAIL PROTECTED]
hi i have a wierd problem and i require an equally weird query. 1) backgound Table test: CREATE TABLE main_table ( string_A varchar( 20), string_B varchar( 20), ); -- both columns are identical in nature and usage INSERT INTO

Re: [SQL] a wierd query

2004-05-13 Thread Silke Trißl
[EMAIL PROTECTED] schrieb: hi i have a wierd problem and i require an equally weird query. 1) backgound Table test: CREATE TABLE main_table ( string_A varchar( 20), string_B varchar( 20), ); -- both columns are identical in nature and usage

Re: [SQL] a wierd query

2004-05-13 Thread sad
i require the dictinct values from (visualizing each column result as a set) the union of the two columns select distinct a as F from table union select distinct b as F from table; ---(end of broadcast)--- TIP 7: don't forget to increase your

Re: [SQL] a wierd query

2004-05-13 Thread Peter Childs
On Thu, 13 May 2004, [EMAIL PROTECTED] wrote: hi i have a wierd problem and i require an equally weird query. 1) backgound Table test: CREATE TABLE main_table ( string_A varchar( 20), string_B varchar( 20), ); -- both columns are

Re: [SQL] a wierd query

2004-05-13 Thread Yasir Malik
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Yes you can. Try this: (select string_A from main_table) union (select string_B from main_table) Yasir On Thu, 13 May 2004, [EMAIL PROTECTED] wrote: Date: Thu, 13 May 2004 04:07:08 -0400 From: [EMAIL PROTECTED] [EMAIL PROTECTED] To: [EMAIL

Re: [SQL] Exceptions when 0 rows affected.

2004-05-13 Thread Stef
Andrei Bintintan mentioned : = Your problem depends on what interface/programming language you're using. Yep, I tried to do it using rules or triggers, but I can't get it to do what I want exactly, and it's not a good idea to put any rules or triggers on my database. I'm sticking to psql

Re: [SQL] isolation level

2004-05-13 Thread Bruno Wolff III
On Thu, May 13, 2004 at 18:13:23 +, Jaime Casanova [EMAIL PROTECTED] wrote: Hi all, is there a way to set the isolation level to something like the sql standard dirty read. No. There will be a way to use the standard name in a SET command, but you will actaully get READ COMMITTED

[SQL] isolation level

2004-05-13 Thread Jaime Casanova
Hi all, is there a way to set the isolation level to something like the sql standard dirty read. Thanx in advance, Jaime Casanova _ STOP MORE SPAM with the new MSN 8 and get 2 months FREE*

[SQL] \d in 7.4.2

2004-05-13 Thread Jaime Casanova
Hi all, maybe i'm wrong (because i'm writing this without 7.3 and 7.2 at hand) but i think when i do a \d my_table in pgsql 7.3 i get some fk info foreign key references etc. but in 7.4 i get Triggers: RI_ConstraintTrigger_46753, RI_ConstraintTrigger_46768,

[SQL] Ignore my last message

2004-05-13 Thread Jaime Casanova
Sorry it was my mistake, i was using psql from 7.2.2 _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 ---(end of

[SQL] \d in 7.4

2004-05-13 Thread Jaime Casanova
Sorry it was my mistake, i was using psql from 7.2.2 _ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail ---(end of broadcast)---

[SQL] Multiple outer join on same table

2004-05-13 Thread Marco Lazzeri
Hi! I'm searching a better (quicker) way to retrieve data as I used to do using the following query... == SELECT main.codice, other.value AS value_one, other.value AS value_two FROM main LEFT OUTER JOIN otherON main.id = other.id_main LEFT

Re: [SQL] a wierd query

2004-05-13 Thread sad
On Thursday 13 May 2004 19:27, you wrote: sad wrote: select distinct a as F from table union select distinct b as F from table; Note that UNION only returns the unique values of the union You can get repeated values by using UNION ALL. read the original problem look at the DISTINCT

Re: [SQL] a wierd query

2004-05-13 Thread Stephan Szabo
On Fri, 14 May 2004, sad wrote: On Thursday 13 May 2004 19:27, you wrote: sad wrote: select distinct a as F from table union select distinct b as F from table; Note that UNION only returns the unique values of the union You can get repeated values by using UNION ALL. read the

Re: [SQL] isolation level

2004-05-13 Thread Greg Stark
Bruno Wolff III [EMAIL PROTECTED] writes: On Thu, May 13, 2004 at 18:13:23 +, Jaime Casanova [EMAIL PROTECTED] wrote: Hi all, is there a way to set the isolation level to something like the sql standard dirty read. No. There will be a way to use the standard name in a SET

Re: [SQL] Multiple outer join on same table

2004-05-13 Thread Greg Stark
Marco Lazzeri [EMAIL PROTECTED] writes: Hi! I'm searching a better (quicker) way to retrieve data as I used to do using the following query... == SELECT main.codice, other.value AS value_one, other.value AS value_two FROM main LEFT OUTER JOIN other ON