Advertisement

05.21.2008 at 06:41PM PDT, ID: 23423058
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.6

Stored Procedure for getting connections

Asked by Saber37886661 in MS SQL Server, SQL Query Syntax, SQL Server 2005

Tags:

G'day,
I have a bit of a problem where I have a stand alone connection table that I am trying to drill down to get all connections for item x. I have previously done the code in C# but as you can imagine, it's a bit clumsy! So now I'm trying to store it as a stored procedure. Basically I have a table that holds my connections with four fields that holds the relevant data. 'L_CONN', 'L_ID', 'R_CONN' and "R_ID' and another field 'SUSPENDED_REC' which tells me if a connection is still valid. 'L_CONN' holds the name of the table that makes up the left hand side of the connection. 'L_ID' is its unique id number. 'R_CONN' holds the name of the table that makes up the right hand side of the connection. 'R_ID' is its unique id number. Currently I have a working stored procedure that will return the top level of connections (The code snippet), but I want it to be able to loop down the connection 'tree' until it runs out of connections. Finally, if possible, I would then like to be able to retrieve the fields 'OBJECT_ID', 'DESCRIPTION', 'ICON', 'STATUS', 'LOCKED' from each record that it finds.
The data in the table looks like this:
L_CONN            L_ID            R_CONN          R_ID            SUSPENDED_REC
PROJECT           1                 SITES              1                  0
PROJECT           1                 SITES              2                  0
PROJECT           1                 SITES              3                  0
PROJECT           1                 SITES              4                  0
SITES                 1                SITE_SYSTEM  1                 0
SITES                 1                SITE_SYSTEM  2                 0
SITES                 3                SITE_SYSTEM  3                 0
SITES                 3                SITE_SYSTEM  4                 0

Hopefully someone out there has a bit more of an idea about this then I do. The stored procedure will first roll out on a SQL2000 box, but I have been told that it will also have to work on a SQL2005, and eventually SQL2008.
Thanks for the help
Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
CREATE PROCEDURE QuickConnConnectionSingle(
@t1 varchar(255),
@inVal varchar(10)
)
AS
BEGIN
 
SET DATEFORMAT DMY
SELECT R_CONN, R_ID from conlink where L_CONN=@t1 and L_ID=@inVal and UP='N' and ((ISNUMERIC(SUSPENDED_REC) = 0) OR (SUSPENDED_REC = 0))
END
GO
[+][-]05.22.2008 at 05:30AM PDT, ID: 21623114

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.22.2008 at 05:54AM PDT, ID: 21623313

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.22.2008 at 06:16AM PDT, ID: 21623489

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.22.2008 at 06:29AM PDT, ID: 21623593

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.22.2008 at 06:40AM PDT, ID: 21623689

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.22.2008 at 06:41AM PDT, ID: 21623697

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.22.2008 at 06:47AM PDT, ID: 21623746

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.22.2008 at 06:50AM PDT, ID: 21623773

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.22.2008 at 06:55AM PDT, ID: 21623825

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.22.2008 at 06:59AM PDT, ID: 21623856

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: MS SQL Server, SQL Query Syntax, SQL Server 2005
Tags: MS SQL
Sign Up Now!
Solution Provided By: napel25
Participating Experts: 2
Solution Grade: A
 
 
[+][-]05.22.2008 at 07:16AM PDT, ID: 21623989

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628