Solved

User defined datatype

Posted on 2014-11-21
4
143 Views
Last Modified: 2014-11-23
Hi

I have a pre existing code in an stored pro that receives multi valued  parameter from SSRS 2008.

Declare @tbl_x table(typename nvarchar(100))
While len(@rpt_parameter) >0
Begin
Insert into @tbl_x
.....
)

I'm not familiar with user defined data types and need to do same thing for a parameter of type unique identifier.
Are the variables ( in the example above: typename) defined here in the code? Do I need to do the same for unique identifier data type?
Thanks
0
Comment
Question by:shmz
4 Comments
 
LVL 51

Accepted Solution

by:
HainKurt earned 500 total points
Comment Utility
that looks a column name to me...

a table var names @tbl_x which has one column named "typename" with nvarchar(100) datatype

above code, creates a (temporary) table with one column and dumps all parameters into it, so maybe it will use it in some queries/views etc...
0
 
LVL 69

Expert Comment

by:ScottPletcher
Comment Utility
Declare @tbl_x table(typename uniqueidentifier primary key) --might as well be pk, unless you need to insert dup values to this table??

 While len(@rpt_parameter) >0
 Begin
 Insert into @tbl_x
 .....
 )
0
 
LVL 16

Expert Comment

by:DcpKing
Comment Utility
There are no user-defined data types in the code fragment you provided. Perhaps you would like to provide the full SProc (or at least the part that gets data into the table variable (@tbl_x)) for us to see ? Otherwise what HainKurt says.

Mike
0
 

Author Closing Comment

by:shmz
Comment Utility
thanks
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now