Re: Multiple SELECTs in one query

2004-04-13 Thread Michael Stassen
A * by itself must come first, so SELECT *, "A" AS SortCode FROM Jobs will work. [EMAIL PROTECTED] wrote: I am not sure about MySQL but in Oracle this will NOT work: "SELECT "A" AS SortCode, * FROM Jobs" However, this WILL: "SELECT "A" AS SortCo

Re: Multiple SELECTs in one query

2004-04-13 Thread Udikarni
I am not sure about MySQL but in Oracle this will NOT work: "SELECT "A" AS SortCode, * FROM Jobs" However, this WILL: "SELECT "A" AS SortCode, Jobs.* FROM Jobs" Try adding the table or alias in front of the "*". In general, however, I will repeat m

Re: Multiple SELECTs in one query

2004-04-13 Thread Steve Pugh
Hey gang, many thanks to all for pointing me in the right direction for my previous "multiple selects" question. I moved to 4.1.1 and implemented Udikarni's use of multiple sum()s instead of multiple selects() and that stuff is all groovy now! Of course, I'm beating my head on *another* wall n

Re: Multiple SELECTs in one query

2004-04-12 Thread Udikarni
You might consider a whole different approach which is more efficient, because regardless of VB or MySQL - in your current setup you are issueing 3 distinct SQL statements against the same table and you might be able to convert it to only issueing one. Basically, use functions to create 1's or

Re: Multiple SELECTs in one query

2004-04-12 Thread Steve Pugh
Aha, that would explain it! I guess my next question would have to be...is the the appropriate list to inquire as to the stability of the current Alpha builds? My app is pretty timid in its use of SQL, mostly SELECTS and a smattering of UPDATES and INSERTS on single tables. But on the other

RE: Multiple SELECTs in one query

2004-04-12 Thread Victor Pendleton
You will need to be using MySQL 4.1.x in order to perform sub-selects. -Original Message- From: Steve Pugh To: [EMAIL PROTECTED] Sent: 4/12/04 11:01 AM Subject: Multiple SELECTs in one query Hello, all! I am porting my Visual Basic app over from MSDE to MySQL, and things so far are goin