1

I have a stored procedure that receives a (n) list of filters stored as GUIDs. What I need is a stored procedure that will receive an (n) list of an (n) list of filters so that I can return comparisons each (n) list of filters. Is this possible, and how would you script it?

For reference, the current user type looks like the following:

CREATE TYPE [dbo].[GuidList] AS TABLE(
    [Value] [uniqueidentifier] NOT NULL,
    PRIMARY KEY CLUSTERED 
(
    [Value] ASC
)WITH (IGNORE_DUP_KEY = OFF)
)
1
  • 3
    No you can't use table types as column datatypes. Why not just add an additional column to the table type that acts as a grouping identifier? Commented Jun 6, 2013 at 13:56

1 Answer 1

1

If all you really want to do is have a list of lists (a 2-tier hierarchy, I think is what you're asking for), just use XML instead.

<guid_lists>
    <guid_list>
        <guid value = '' />
        <guid value = '' />
        <guid value = '' />
        <guid value = '' />
    </guid_list>
    <guid_list>
        <guid value = '' />
        <guid value = '' />
        <guid value = '' />
        <guid value = '' />
    </guid_list>
</guid_lists>

If that isn't usable, you may need to clarify the purpose for using a USER TYPE.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.