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
Can someone give me an explaination of a Vector
question mark in expression
Deleting data from Access Table
Move Sharepoint 2010 DB's from one server to another
Delphi, forms in Dll and Threads
Project Server 2010 won't install
Css
Stored Procedure not working in Crystal
Joomla Re-install
Ajax or flash..For online Jewellery designer ?