Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create empty column in results
Message
 
À
13/06/2008 10:15:02
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01323801
Message ID:
01323817
Vues:
13
>>>I get an error on the WorkPhone column that is doesn't like the quotes. How do I create an empty column?
>>>
>>>
>>>	[Phone] [varchar](14) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
>>>	'' AS WorkPhone,
>>>
>>
>>
>>select *, cast('' as varchar(12)) as WorkPhone from People
>
>
>	cast('' as varchar(12)) AS WorkPhone,
>
>
>Error:
>
>
>Msg 173, Level 15, State 1, Line 12
>The definition for column 'cast' must include a data type.
>
Jay - are you trying to do a select or create a table - I'm assuming you are creating a table..?
____________________________________

Don't Tread on Me

Overthrow the federal government NOW!
____________________________________
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform