Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 22nd, 2006, 12:44 AM
Registered User
 
Join Date: Nov 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Create Variable when needed (dynamic)

Hi,

Is it possible to create dynamic variables in SQL Server 2000? I mean, I want my stored procedure to create variable and declare it, only when needed.

For example,

I have got a variable called, @str0 of type varchar(4000). When the limit is full then it will create a variable @str1 of type varchar(4000). When that limit is full then it will create another variable @str2, @str3, @str4 ….

Can someone please advice how can I do it in SQL server 2000?

Thanks in advance
Rashed


 
Old February 22nd, 2006, 11:01 PM
SQLScott's Avatar
Wrox Author
 
Join Date: Dec 2004
Posts: 338
Thanks: 0
Thanked 2 Times in 2 Posts
Default

No, as far as I know, this is not possible.






Similar Threads
Thread Thread Starter Forum Replies Last Post
XSLT variable help needed ElinF XSLT 2 February 23rd, 2007 10:15 AM
Help needed in constructing create table statement method Access VBA 0 April 28th, 2005 11:04 AM
Create a dynamic variable from a recordset tdaustin Classic ASP Basics 3 May 13th, 2004 11:04 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.