RE: is possible 1 query with 2 selects?

2002-02-12 Thread Butch Bean
I don't know you table structure but something like this would do it... SELECT * from QB as tbl1 JOIN relAB as tbl2 ON tbl2.A=tbl1.A where tbl2.a='a1' Butch Bean -Original Message- From: Egor Egorov [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 09, 2002 7:24 AM To: [EMAIL

RE: is possible 1 query with 2 selects?

2002-02-12 Thread Butch Bean
' SELECT * from QB as tbl1 LEFT JOIN relAB as tbl2 ON tbl2.B=tbl1.ref where tbl2.B='a1' -Original Message- From: Nuno Teixeira [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 09, 2002 11:18 AM To: Butch Bean Cc: [EMAIL PROTECTED] Subject: Re: is possible 1 query with 2

Re: is possible 1 query with 2 selects?

2002-02-12 Thread Nuno Teixeira
Hi, I try it and I get a syntax error: You have an error in your SQL syntax near 'on tbl2.A=tbl1.A where tbl2.A='a1'' at line 1 My tables structure are: show fields from QB; +--+-+--+-+-++ | Field| Type|

Re: is possible 1 query with 2 selects?

2002-02-12 Thread Nuno Teixeira
Bean | Cc: [EMAIL PROTECTED] | Subject: Re: is possible 1 query with 2 selects? | | | | Hi, | | I try it and I get a syntax error: | | You have an error in your SQL syntax near 'on tbl2.A=tbl1.A where | tbl2.A='a1'' at line 1 | | My tables structure are: | | show fields from QB

RE: is possible 1 query with 2 selects?

2002-02-12 Thread Butch Bean
PROTECTED] | Subject: Re: is possible 1 query with 2 selects? | | | | Hi, | | I try it and I get a syntax error: | | You have an error in your SQL syntax near 'on tbl2.A=tbl1.A where | tbl2.A='a1'' at line 1 | | My tables structure are: | | show fields from QB

Re: is possible 1 query with 2 selects?

2002-02-12 Thread DL Neil
Hello Nuno, I'm trying to make a query with only one command but I can't see how to do it. Supose that are 2 tables like: table QA table QB ref text ref text --- --- a1 texta1 b1 textb1 a2 texta2 b2 textb2 a3 texta3 b3 textb3 and there is a table that

Re: is possible 1 query with 2 selects? (It works!)

2002-02-12 Thread Nuno Teixeira
as tbl2 | | ON tbl2.B=tbl1.ref | | where tbl2.A='a1' | | -Original Message- | From: Nuno Teixeira [mailto:[EMAIL PROTECTED]] | Sent: Saturday, February 09, 2002 12:45 PM | To: Butch Bean | Cc: [EMAIL PROTECTED] | Subject: Re: is possible 1 query with 2 selects? | | | | Hi

Re: is possible 1 query with 2 selects?

2002-02-12 Thread Anuj Khandelwal
Try select * from QB, relAB where QB.ref = relAB.B and relAB.A='a1'; - Original Message - From: Egor Egorov [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, February 09, 2002 4:24 AM Subject: is possible 1 query with 2 selects? Nuno, Friday, February 08, 2002, 11:04:51 PM,

Re: is possible 1 query with 2 selects?

2002-02-12 Thread Nuno Teixeira
On Tue, Feb 12, 2002 at 01:31:43PM -, DL Neil wrote: | Hello Nuno, | |I'm trying to make a query with only one command but I can't see how to do |it. | |Supose that are 2 tables like: | |table QA table QB |ref text ref text |--- --- |a1 texta1 b1

Re: is possible 1 query with 2 selects? (It works!)

2002-02-10 Thread Nuno Teixeira
as tbl2 | | ON tbl2.B=tbl1.ref | | where tbl2.A='a1' | | -Original Message- | From: Nuno Teixeira [mailto:[EMAIL PROTECTED]] | Sent: Saturday, February 09, 2002 12:45 PM | To: Butch Bean | Cc: [EMAIL PROTECTED] | Subject: Re: is possible 1 query with 2 selects? | | | | Hi

RE: is possible 1 query with 2 selects?

2002-02-09 Thread Butch Bean
I don't know you table structure but something like this would do it... SELECT * from QB as tbl1 JOIN relAB as tbl2 ON tbl2.A=tbl1.A where tbl2.a='a1' Butch Bean -Original Message- From: Egor Egorov [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 09, 2002 7:24 AM To: [EMAIL

Re: is possible 1 query with 2 selects?

2002-02-09 Thread Nuno Teixeira
Hi, I try it and I get a syntax error: You have an error in your SQL syntax near 'on tbl2.A=tbl1.A where tbl2.A='a1'' at line 1 My tables structure are: show fields from QB; +--+-+--+-+-++ | Field| Type|

RE: is possible 1 query with 2 selects?

2002-02-09 Thread Butch Bean
' SELECT * from QB as tbl1 LEFT JOIN relAB as tbl2 ON tbl2.B=tbl1.ref where tbl2.B='a1' -Original Message- From: Nuno Teixeira [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 09, 2002 11:18 AM To: Butch Bean Cc: [EMAIL PROTECTED] Subject: Re: is possible 1 query with 2

Re: is possible 1 query with 2 selects?

2002-02-09 Thread Nuno Teixeira
Bean | Cc: [EMAIL PROTECTED] | Subject: Re: is possible 1 query with 2 selects? | | | | Hi, | | I try it and I get a syntax error: | | You have an error in your SQL syntax near 'on tbl2.A=tbl1.A where | tbl2.A='a1'' at line 1 | | My tables structure are: | | show fields from QB

RE: is possible 1 query with 2 selects?

2002-02-09 Thread Butch Bean
PROTECTED] | Subject: Re: is possible 1 query with 2 selects? | | | | Hi, | | I try it and I get a syntax error: | | You have an error in your SQL syntax near 'on tbl2.A=tbl1.A where | tbl2.A='a1'' at line 1 | | My tables structure are: | | show fields from QB