Home > Archive > MS SQL Server > November 2006 > SQL 2000 - Cannot "USE database" - Incorrect Syntax??









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author SQL 2000 - Cannot "USE database" - Incorrect Syntax??
patrick.mcdonald@gmail.com

2006-11-30, 12:12 am

Hello,

First off I want to say that I am a "noob" when it comes to MS SQL. I
have an odd issue. I have a database that's called 001 - When issue the
command "use 001" in Query Analyzer, I get the error "server: msg 170,
level 15" Syntax incorrect by 001.

The database exists! if I do a "SP_databases" the database does show up
as 001. Why can I not use it?

Thanks in advanced.

Roy Harvey

2006-11-30, 12:12 am

USE [001]

The standard for names requires the first character be alphabetic. A
name that voilates that must be put in square brackets. I strongly
suggest that since you are just getting started you use name that fits
the standard.

Roy Harvey
Beacon Falls, CT

On 29 Nov 2006 17:44:40 -0800, patrick.mcdonald@gmail.com wrote:

>Hello,
>
>First off I want to say that I am a "noob" when it comes to MS SQL. I
>have an odd issue. I have a database that's called 001 - When issue the
>command "use 001" in Query Analyzer, I get the error "server: msg 170,
>level 15" Syntax incorrect by 001.
>
>The database exists! if I do a "SP_databases" the database does show up
>as 001. Why can I not use it?
>
>Thanks in advanced.

patrick.mcdonald@gmail.com

2006-11-30, 12:12 am

Thanks alot that helps!

Patrick


Roy Harvey wrote:[color=darkred
]
> USE [001]
>
> The standard for names requires the first character be alphabetic. A
> name that voilates that must be put in square brackets. I strongly
> suggest that since you are just getting started you use name that fits
> the standard.
>
> Roy Harvey
> Beacon Falls, CT
>
> On 29 Nov 2006 17:44:40 -0800, patrick.mcdonald@gmail.com wrote:
>

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com