473,386 Members | 1,803 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

SQL 2000 - stored proc

Hello,

I am new to SQL programming and I need a little help.

I would like to write a stored procedure that gets information from a a table and selects it.

My table is fairly simple:

index text parent_id
1 A <null>
2 AA 1
3 B <null>
4 BB 3
5 AAA 2
6 BBB 4

( Is <null> a good parent for 'top' level nodes? )

My goal is to be able to obtain a set of data that looks something like this:

1 A
2 AA
5 AAA

or

1 A
2 AA

Depending upon what node I need to get data about.

Can this be done in SQL 2000?
Oct 16 '07 #1
0 759

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Joe Seamour | last post by:
I would like to access a table in MS Access from a stored procedure on MS SQL 2000. The MS Access DB is running on a diferent computer attached on the same network. I think I need to create an ODBC...
0
by: Dave Sisk | last post by:
I've created a system or external trigger on an AS/400 file a.k.a DB2 table. (Note this is an external trigger defined with the ADDPFTRG CL command, not a SQL trigger defined with the CREATE...
1
by: Westwood | last post by:
I have looked the newsgroups up and down and can't seem to find any information on this topic so I'm hoping this group can help me. We are a DB2 and SQL Server shop. Most of the time we are...
14
by: Roy | last post by:
Apologies for the cross-post, but this truly is a two-sided question. Given the option of creating Looping statements within a stored proc of sql server or in the code-behind of an .net webpage,...
2
by: jzogg7272 | last post by:
In my code I am executing a stored procedure to do a single row insert. I check the return value of the execution and I am getting -1, whereas a few weeks ago it was returning 0. Actually, I found...
0
by: rsstonejr | last post by:
Hello. Has anybody ever called a stored proc on a SQL Server 2005 database from a SQL Server 2000 database? Is it even possible? I'm using the following command: ...
2
by: rbg | last post by:
You are right, I did not include the exact query since it has a whole of joins and many where clauses in it. I did not want to make the post very hard to read, hence I simplified it. In the...
2
by: DZanke | last post by:
When our developers access a MS SQL 2000 stored procedure using Visual Studio 2005, it seems to save the stored procs in a format that causes problems w/ MS SQL 2000. When I view the stored proc w/...
1
by: sanika1507 | last post by:
hi all, how to debug a stored procedure .. Actually what i did was split the stored procs and took and SQL query and executed it... but i dont knw how to print the values of these stored...
2
by: Ilyas | last post by:
Hi all I need to implmenet paging across different tables. The tables all have a different name eg Data01, data02 data03 etc, however they are columns which are common to each table, but each...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.