function return text
-
hi,i want to create this funcyion but sql not allowed,
create FUNCTION returnrahgiri(@rahgiri text)
RETURNS text
as
BEGIN
return (Select response from work_with_us where (response=@rahgiri))
ENDmessage error: Msg 2716, Level 16, State 1, Procedure returnrahgiri, Line 1 Column, parameter, or variable #0: Cannot specify a column width on data type text.
-
hi,i want to create this funcyion but sql not allowed,
create FUNCTION returnrahgiri(@rahgiri text)
RETURNS text
as
BEGIN
return (Select response from work_with_us where (response=@rahgiri))
ENDmessage error: Msg 2716, Level 16, State 1, Procedure returnrahgiri, Line 1 Column, parameter, or variable #0: Cannot specify a column width on data type text.
You can replace text with Varchar(50) or any specified size.
-
hi,i want to create this funcyion but sql not allowed,
create FUNCTION returnrahgiri(@rahgiri text)
RETURNS text
as
BEGIN
return (Select response from work_with_us where (response=@rahgiri))
ENDmessage error: Msg 2716, Level 16, State 1, Procedure returnrahgiri, Line 1 Column, parameter, or variable #0: Cannot specify a column width on data type text.
Assuming you're not using SQL 2000 or earlier, you shouldn't be using the text data-type[^]:
http://technet.microsoft.com/en-us/library/ms187993.aspx[^]
ntext , text, and image data types will be removed in a future version of Microsoft SQL Server. Avoid using these data types in new development work, and plan to modify applications that currently use them. Use nvarchar(max), varchar(max), and varbinary(max) instead.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer