Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Incorrect Syntax?
Message
 
 
À
31/07/2013 14:36:37
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 6.5 and older
Application:
Web
Divers
Thread ID:
01579562
Message ID:
01579566
Vues:
42
>What is wrong with this statment?
>
>
>declare @temp table (Zip varchar(5), xYear varchar(4), xQuarter varchar(1));
>
>insert into @temp (zip,xyear,xquarter) values Select substring(PropertyZip,1,5), SUBSTRING(xYear,1,4), SUBSTRING(xQuarter,1,1)
> from [Foreclosure Notices];
>
>
>I am getting a Incorrect Syntax near SELECT keyword. All look correct to me.

Just in addition to William and Boris answers - there is no sense of having varchar(1) column. Use char(1).
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform