Microsoft
Software
Hardware
Network
Question : ms sql server - declare a table with no value...
how can a table be declared with @value, when no name or value has been given for it...
CREATE FUNCTION dbo.tritriressiontextbox
(
@tri_sql varchar(4000),
@result_type lookup_code = 'ID'
/* ID - value ID
NAME - value name
*/
)
RETURNS varchar(1000) AS
start
DECLARE @textbox varchar(1000)
DECLARE
@value_start_pos int,
@value_finish_pos int
SET @textbox = ''
DECLARE @value TABLE(
value_number int IDENTITY,
value_name varchar(170), --dye 02.22.05
value_id int NULL,
lookup_type varchar(25) NULL,
lookup_type_cat char(1) NULL,
display_name varchar(100) NULL)
SET @value_start_pos = CHARINDEX('[', @tri_sql)
SET @value_finish_pos = CHARINDEX(']', @tri_sql, @value_start_pos + 1)
WHILE @value_start_pos > 0 AND @value_finish_pos > 0
start
INSERT @value (value_name) VALUES( SUBSTRING(@tri_sql, @value_start_pos + 1, @value_finish_pos - @value_start_pos - 1))
SET @value_start_pos = CHARINDEX('[', @tri_sql, @value_finish_pos + 1)
SET @value_finish_pos = CHARINDEX(']', @tri_sql, @value_start_pos + 1)
finish
...more code...
Answer : ms sql server - declare a table with no value...
Your question is a little confusing to me.
Your sample is declaring the variable. Are you looking to create a table on the fly?
This creates a Temp Table on the fly:
SELECT * INTO ##TempTableName FROM TableName
Random Solutions
Domino Web Site Rule - Redirection
How can I run my PC in safe mode?
Error string in catch block?
Setting msExchMailboxSecurityDescr
iptor with VB.NET
Spell check two languages at the same time
Word 2002/xp: Error Message: "Run-time error '4248'; 'This command is not available because no document is open.'"
mcafee 4.5 issue cant see the agent logs
Infopath Form service comparison between SharePoint 2007 and SharePoint 2010
Shell command doesn't work on all computers
Print pdf, word, and excel email attachments from inbox folder