Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create empty column in results
Message
From
13/06/2008 10:24:22
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01323801
Message ID:
01323821
Views:
12
>>>>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..?

Select.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform