Click here to Skip to main content
15,885,782 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi there.

I get the following error on my SQL manager when I want to run a script.

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

Below is the Script.

use eqcas
SELECT cat_validation.name, cat_validation.description, cas_user_ext.email cat_validation.primarypin FROM eqcas.dbo.cas_user_ext cas_user_ext, eqcas.dbo.cat_validation cat_validation WHERE cat_validation.id = cas_user_ext.x_id AND ((cat_validation.expiration Is Null)) Go

What could be the problem?
Posted
Comments
Surendra Adhikari SA 14-Jun-13 5:20am    
can you show your table structure??
John Wayne52 14-Jun-13 5:32am    
I get this error afterward.

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

1 solution

You missed a comma:
SQL
SELECT cat_validation.name, cat_validation.description, cas_user_ext.email cat_validation.primarypin FROM 
Becomes
SQL
SELECT cat_validation.name, cat_validation.description, cas_user_ext.email, cat_validation.primarypin FROM 
 
Share this answer
 
Comments
John Wayne52 14-Jun-13 5:23am    
I get this error afterward.

Msg 102, Level 15, State 1, Line 2
Incorrect syntax near 'Go'.
OriginalGriff 14-Jun-13 5:39am    
Take out the "Go" - you don't need it. Also, why have you used two sets of brackets? Especially as you don't need any?
John Wayne52 14-Jun-13 5:50am    
Thanks so much!
OriginalGriff 14-Jun-13 6:15am    
You're welcome!
Monjurul Habib 16-Jun-13 15:57pm    
5+

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900