To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here

HOME News MS SQL Oracle DB2 Access MySQL PHP Scripts Books Links DBA Talk


Go Back   Database Journal Forums > Related Sites > SQL Course

SQL Course SQL Course > Ask questions about the lessons on SQL Course 1 and 2. If you have problems > with the interface, please post in the Feedback forum

Reply Post New Thread
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 02-07-2003, 12:52 PM
jajawong jajawong is offline
Junior Member
 
Join Date: Feb 2003
Posts: 4
what's wrong with my SQL Statement(MySQL)????

select * from StaffDetail, Division, Dept where StaffID in ('1','2'), StaffDetail.DivID = Division.DivID,StaffDetail.DeptID = Dept.DeptID,JoinDate>=' 2000-01-01' and JoinDate<=' 2000-01-02';
Reply With Quote
  #2  
Old 02-08-2003, 08:58 AM
skhanal skhanal is online now
Experts
 
Join Date: Nov 2002
Location: New Jersey, USA
Posts: 3,369
I am not familiar with MySQL specific syntax but my guess would be you will have to replace the commas with AND in your WHERE clause.


select * from StaffDetail, Division, Dept where StaffID in ('1','2')
AND StaffDetail.DivID = Division.DivID,StaffDetail.DeptID = Dept.DeptID
AND
JoinDate>=' 2000-01-01' and JoinDate<=' 2000-01-02';
__________________
http://gotodba.com
Reply With Quote
  #3  
Old 02-08-2003, 11:38 PM
jajawong jajawong is offline
Junior Member
 
Join Date: Feb 2003
Posts: 4
I have solve my problem.
sorry to ask such stupid question!
Reply With Quote
  #4  
Old 02-17-2003, 10:53 PM
penjaga_kubur penjaga_kubur is offline
Junior Member
 
Join Date: Feb 2003
Location: malaysia
Posts: 3
Unhappy something....

what the meaning deptno.dept=dept.depno
Reply With Quote
Reply Post New Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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

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


All times are GMT -5. The time now is 12:51 PM.


DatabaseJournal Recent Articles


 » Searching and Sorting Strings in Oracle

 » Preparing To Upgrade Access Tables to SQL ...

 » Sun Expands MySQL With Closed Source

 » Microsoft Demos New SQL Server Features at...

 » Wipro and Oracle Launch First Joint Innova...

Search Database Journal:
 





Acceptable Use Policy

JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers

Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.