Wrox Programmer Forums
|
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 May 27th, 2004, 04:33 PM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000
Default Arrays In Sql

Is It possible to do arrays in sql
i need to do a stack when reading from a table using a cursor
to deal with tree data.

hope some one help About arrays In SQL

Ahmed Ali
Software Developer
__________________
Ahmed Ali
Senior Software Developer
 
Old May 27th, 2004, 04:55 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hello,

There is a table variable, which you can insert contents into this table variable

declare @t table
(
  myID int identity(1,1) primary key not null,
  text varchar(50) not null
)

I don't believe you can do arrays. Maybe in SQL 2005, but I'm not sure then. I haven't seen any specs on it...

Brian
 
Old May 29th, 2004, 12:15 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

No insure there in no Array in MS-SQL!
what is array at all?! u can make a dumy table as Brian said & work with that, as an array do for!

Always:),
Hovik Melkomian.
 
Old June 1st, 2004, 06:34 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Though you are using MSSQL 7, still you can insert those values into a temp table and process from there are as Brian said. Why should one keep longing for arrays in SQL;) when there is an alternate?

_________________________
-Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Arrays in PL/SQL code_lover Oracle 2 March 17th, 2007 09:32 AM
SQL Server vs Arrays Bryan_Homey ASP.NET 2.0 Basics 2 August 18th, 2006 01:21 AM
Multidemmesional Arrays OR arrays gmoney060 Classic ASP Basics 3 November 1st, 2004 03:42 PM
How Can I Use Arrays with SQL Server Data? Lucy SQL Server ASP 4 June 14th, 2004 01:20 PM





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