Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Unable to delete a row!

Author  Topic 

seenuFour
Starting Member

16 Posts

Posted - 2009-06-25 : 12:59:00
Hello there,

I am having trouble deleting a row!

Here is what am using:

DELETE FROM Registrations WHERE (EmployeeNo = '00104'), (CourseNo = 'BUS111') and (StartDate = '06/30/2009')


This is the error:

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near ','.


Please tell me correct way to use a delete query.

Thanks a lot

Srinivas

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-06-25 : 13:06:45
your syntax is wrong. have a had a look at books online for delete syntax?it should be

DELETE FROM Registrations
WHERE EmployeeNo = '00104'
AND CourseNo = 'BUS111'
and StartDate = '06/30/2009'
Go to Top of Page

seenuFour
Starting Member

16 Posts

Posted - 2009-06-25 : 14:10:01
quote:
Originally posted by visakh16

your syntax is wrong. have a had a look at books online for delete syntax?it should be

DELETE FROM Registrations
WHERE EmployeeNo = '00104'
AND CourseNo = 'BUS111'
and StartDate = '06/30/2009'




That worked like a charm!

tanks visakh16
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-06-25 : 14:13:24
welcome
Go to Top of Page
   

- Advertisement -