» Quick Links
You can make money on these forums
We Share profits with you
Google
Google Adsense
Google Adwords
YPN
Yahoo
MSN Search
Web Directories
Web Hosting
Web Hosting Offers
Hosting News
Suggestions
Link Building
Domain Names
PHP Forums
MySQL Forums
» More Links
OSP News
Reseller Hosting
Shared Hosting
Dedicated Servers
Google Adsense
Search Engine Marketing
Link Development
Affiliate Marketing


» Advertising
Multiple DC PR Check

Free SEO Tools


Go Back   Webmaster Forums > Website Developement / Programming > MySQL Forums

MySQL Forums Share Your Ideas and Tips about MYSQL. Ask questions about MYSQL. Table Design and Much More...

Reply
 
Thread Tools Display Modes
  #1  
Old 05-27-2007, 04:16 AM
bolonga bolonga is offline
Junior Member
 
Join Date: May 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
bolonga is on a distinguished road
Default correct syntax??

Hi there,
From the 2 tables, I select all the items based on the "location of 2006-12-18 00:00:00"

"select T1.P_ID, T1.Date, T1.SN, T1.Batch, T1.Result, T2.D2, T2.D4, T2.D6, T2.D8, T2.D1, T2.D3, T2.D5, T2.D7, T2.TP_Batt, T2.ROC, T2.VAUX1
from tester AS T1, others_test As T2 where 2006-12-18 24:00:00 > T1.Date > 2006-12-18 00:00:00"

Is this the correct syntax? If not, plz let me not?
Regards, -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Revenue Sharing Ads ( ?):
  #2  
Old 05-27-2007, 06:47 AM
Beau Beau is offline
Senior Member
 
Join Date: Jul 2006
Posts: 132
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 15
Beau is on a distinguished road
Default Re: correct syntax??

SELECT t1.P_ID, t1.Date, t1.SN, t1.Batch, t1.Result, t2.D2, t2.D4, t2.D6, t2.D8,
t2.D1, t2.D3, t2.D5, t2.D7, t2.TP_Batt, t2.ROC, t2.VAUX1
FROM tester AS t1
JOIN others_test AS t2
WHERE t1.Date BETWEEN 2006-12-18 24:00:00 AND 2006-12-18

00:00:00

Also, you have no join condition for others_test so you will get all rows of this table joined to each row of tester. -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error in SQL syntax vodero MySQL Forums 1 05-22-2007 07:18 AM
Error in SQL syntax! sullen MySQL Forums 1 12-18-2006 03:19 AM
sql syntax!! Hsierra MySQL Forums 1 11-04-2006 04:12 AM
error in SQL syntax!! Wrudra MySQL Forums 1 10-30-2006 03:31 AM
error in SQL syntax!!! Mara MySQL Forums 1 08-19-2006 04:19 AM


All times are GMT. The time now is 10:25 AM.