Search Results

Showing results 1 to 12 of 12
Search took 0.01 seconds.
Search: Posts Made By: cgyrob ; Forum: MySQL and child forums
Forum: MySQL Oct 8th, 2009
Replies: 2
Views: 405
Posted By cgyrob
Try this


Select a,b,c,d,e,f from
(
(SELECT a, b, c, d, e, f, DATE
FROM table1 WHERE a=10 AND b=1)
UNION
(SELECT a, b, c, d, e, f, DATE
FROM table1 WHERE a=11 AND b=1)
Forum: MySQL Aug 10th, 2009
Replies: 3
Views: 398
Posted By cgyrob
Glad I could help. Can you mark the thread solved if your problem has been fixed.

Thanks.
Forum: MySQL Aug 7th, 2009
Replies: 3
Views: 398
Posted By cgyrob
The first thing you need to do is replace the left join with an Inner join. Right now you are joining all the customers even if they do not have any orders which is a waste of resources when you are...
Forum: MySQL Aug 7th, 2009
Replies: 4
Views: 557
Posted By cgyrob
I know this thread is a few days old but if you want the top 10 from the combined list you just sort the list after the unions not for each table.


(SELECT * from table_a )
union (SELECT * FROM...
Forum: MySQL Aug 4th, 2009
Replies: 2
Views: 328
Posted By cgyrob
I think the best way is the syntax you feel more comfortable with.

I like the old joining syntax using the where clause but alot of people like the new syntax, I believe because of readability...
Forum: MySQL Jul 23rd, 2009
Replies: 8
Views: 631
Posted By cgyrob
Im glad i could atleast point you in the right direction. good luck with the rest.
Forum: MySQL Jul 21st, 2009
Replies: 8
Views: 631
Posted By cgyrob
Try this


SELECT MAKE.MAKE, MAKE.count, color.Color, color.count
FROM(
SELECT MAKE, count(*)count
FROM cars
Group by MAKE
)MAKE,
( SELECT MAKE, color,...
Forum: MySQL Jul 21st, 2009
Replies: 8
Views: 631
Posted By cgyrob
Nevermind, I take it the attachment is the table schema.

Is it important to do it all in one query. What are you using the resultset for because if you do it in one query you will most likely get...
Forum: MySQL Jul 21st, 2009
Replies: 8
Views: 631
Posted By cgyrob
Since you didn't give too much information I thought of a few other interpetations of what you asked.

If field1 is a numeric value you might want the sum of the field grouped by field2


Select...
Forum: MySQL Jul 21st, 2009
Replies: 8
Views: 631
Posted By cgyrob
do you mean something like this


Select field2,count(Field1)
From Table
Group by field2
Forum: MySQL Jul 1st, 2009
Replies: 3
Views: 710
Posted By cgyrob
Their is no way to control flow with Case in SQL so the easy answer to your question is no it is not possible.
Forum: MySQL Jun 30th, 2009
Replies: 3
Views: 710
Posted By cgyrob
Its an easy search

http://msdn.microsoft.com/en-us/library/ms181765.aspx
Showing results 1 to 12 of 12

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC