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
Operation Must Use an Updateable Query
Restarting a WPF application to apply updates
How do I make a database that stores data from a form with sections that have an unknown number of entries
Intel VT vs. AMD-V for Hyper-V
get latest file in the directory in unix
HP Driver Dowload problems
permissions changed after moving folder from one server to another
Is there any code of SATA interface in VHDL?
Installing Exchange 2003 Enterprise, what switches do I need to use with dcdiag?
How to draw a cardioid in Opengl?