Re: Using Multiple Selects

2004-12-16 Thread Brent Baisley
While 10 users per minute isn't all that much and your system will probably handle it without a problem, you should always worry about doing 12 queries for a single action. I'm not sure what your data structure is like, a single table with one column for each attribute or one record for each as

Using Multiple Selects

2004-12-15 Thread Shane McDonald
A quick question on the performance of the SELECT statement. I have a table with a set of 50 products, each product has about 10 attributes associated with it. The user will select certain aspects of a product (height, weight, colour, length etc.), and many products may display a particular att

RE: Combining multiple selects into 1 select.

2004-06-01 Thread Leo
M myTable WHERE Closeout = 'Y' HTH.. :) Leo > -Original Message- > From: Andy [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 02, 2004 1:34 AM > To: [EMAIL PROTECTED] > Subject: Combining multiple selects into 1 select. > > Hello, > > Is is possible to c

Combining multiple selects into 1 select.

2004-06-01 Thread Andy
Hello, Is is possible to combine the results of multiple selects into one query/result? And if so, how do you implement it? A simple example follows: Query 1: SELECT * FROM myTable WHERE OnSale = 'Y' Query 2: SELECT * FROM myTable ORDER BY Category Query 3: SELECT * FROM myTable WHER

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
ent and you're done. One pass instead of 4 and no UNIONs. You might have to tinker with the syntax if CASE is not available in MySQL to this extent but that's the general idea. In a message dated 4/13/2004 6:50:33 PM Eastern Daylight Time, [EMAIL PROTECTED] writes: >

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 he

Re: Multiple SELECTs in one query

2004-04-12 Thread Udikarni
0) as "avg_of_complete" FROM tableFLIST You'll get all 3 results in one pass. > > 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 > Sub

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

Multiple SELECTs in one query

2004-04-12 Thread Steve Pugh
Hello, all! I am porting my Visual Basic app over from MSDE to MySQL, and things so far are going quite well. I've found most of the "gotcha" differences in how I need to structure my queries, but I am having trouble with one in particular. In my original code, I could use one query to get a

Re: mysql: multiple SELECTs with INSERT or UPDATE??

2002-10-06 Thread John Ragan
corereader contains safeguards to prevent updates, but its design helps quick development of queries such as yours. you can do a multiple join with multiple selects just by pointing and clicking to try out various ideas. it's free at http://corereader.com/ it installs at the novice

Re: mysql: multiple SELECTs with INSERT or UPDATE??

2002-10-05 Thread Paul DuBois
At 15:54 +0200 10/5/02, Mirza wrote: >Hi, > >i am inserting data in a mysql table like this: >INSERT INTO mytable1 >(bu_main_id) > SELECT main_id FROM mytable2 > WHERE username=\"$username\" > >that's ok. > >but now i would like to insert 2 values (bu_main_id and

mysql: multiple SELECTs with INSERT or UPDATE??

2002-10-05 Thread Mirza
Hi, i am inserting data in a mysql table like this: INSERT INTO mytable1 (bu_main_id) SELECT main_id FROM mytable2 WHERE username=\"$username\" that's ok. but now i would like to insert 2 values (bu_main_id and status), and i would like to know, is it possible t

Multiple SELECTS v.s. one SELECT

2001-08-18 Thread Philip Mak
I'm using the Tangram perl module, which makes MySQL act like an object oriented database. My database has a table of stories (STORY). Each STORY is written by an AUTHOR. So, the database design is like this: CREATE TABLE story ( id int PRIMARY KEY NOT NULL, title VARCHAR(80),

multiple selects

2001-04-24 Thread geir
Hi I am using an application (excel) that sends sql requests and fills the excel sheet. When i issue an update statements, the update doesnt return data to my program (*.vba) in excel, so it hangs. To bypass the problem I was told to use the following ansi compliant sql statement "SET NOCOUNT ON"