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
SBS 2008 move data feature crashes
Cant get vista to view my web site correctly!
Explain plan in Oracle
How to create Point using ArcGIS?
Blackberry not activinating on BES
Need solution to convert Java 1.6 application into C# project
Unable to Search Empty Folders
Event ID 37 Microsoft-Windows-Kernel-P
rocessor-P
ower
3 long beeps
Sysprep service pack 3