473,385 Members | 1,445 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

ISQL: Msg 170, Level 15, State 1, Line 1 Line 1: Incorrect syntax near ' '

G'day everyone

That's a space between the ticks.

It's all part of a longer script but seeing as the failure occurs on
line 1

if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[config]') and OBJECTPROPERTY(id, N'IsUserTable') =
1)
drop table [dbo].[config]
GO

That's three lines only. Does it matter that they're in Unicode?

Any ideas?

Kind regards,
Bruce M. Axtens
Software Engineer
Strapper Technologies

Nov 8 '06 #1
3 14724
Bruce,
are you sure this is the part which causes an error ? It works fine on
my system.
ou must realise that the line number is always relative to the batch.
After GO a new batch starts and any error in the first line of an
statement after GO would return an error for line 1.

Markus

Nov 8 '06 #2

One more thing I almost overlooked. The error message clearly says
Incorrect syntax near ' '
but the code lines you posted don't contain any empty string ' ', so
the error must be somewhere else.

Markus

Nov 8 '06 #3
Gentlemen,

Thank you for your replies. With ISQL resetting its line number every
"GO" the offending line could have been anywhere in a 123 line file.

What I ended up doing was creating two scripts from the original: one
to do the "DROP"s and the other to do the "CREATE"s. Both ran without a
hiccup.

Thanks for your time.

Kind regards,
Bruce M. Axtens
Software Engineer
Strapper Technologies

Nov 9 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Alex Vilner | last post by:
Hello! We have a set of individual .SQL scripts which we would like to execute against a MS SQL Server 2000. Is there any way to have ISQL utility (or any other means) to execute all of them...
4
by: Marcin Zmyslowski | last post by:
Hello everyone! I have the following problem. I`ve opened a Query Analyser and write the statement: -isql -S 'PL6XXXX' -i 'd:\SQL_Server_2000\Raport_WWW.sql' I got the following erorr...
0
by: samuel | last post by:
Hi I wrote a macro in MS Access 2000. This is a .adp link on SQL server tables. I have 2 forms: script_selection & Form3 Form3 include 2 important fields: CD & line I want to write a...
9
by: MR | last post by:
I get the following Exception "The data at the root level is invalid. Line 1, position 642" whenever I try to deserialize an incoming SOAP message. The incoming message is formed well and its...
1
by: Sandesh | last post by:
Hello All, Me saying " has any body come across such error would be underestimating". Well I am getting a very peculiar and unique error "Line 1: Incorrect syntax near 'Actions'." ...
1
by: iporter | last post by:
In the following code, the two Response.Write statements output exactly the same - I can copy and paste both into Query Analyzer, and run them fine. However, if I comment out line 3, the...
1
by: Ruth413 | last post by:
Hello - I am getting the these errors in my sql 2005 generated script. I am stuck with first error. Please help.... Msg 102, Level 15, State 1, Line 3 Incorrect syntax near '('. Msg 319,...
0
by: roamnet | last post by:
hi i created database file with .mdf extention ,sql server as a source and use grid view to display data there're no problem in data retrieve and display,but i want to edit it or insert new...
1
by: underdown | last post by:
This error has been reported in a number of previous occasions. However in my case non of the suggested solutions appears to work --================================================== CREATE VIEW...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.