User defined datatype

Posted on 2014-11-21
Last Modified: 2014-11-23

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
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?
Question by:shmz
LVL 51

Accepted Solution

HainKurt earned 500 total points
ID: 40458052
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...
LVL 69

Expert Comment

ID: 40458293
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
 Insert into @tbl_x
LVL 16

Expert Comment

ID: 40460268
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.


Author Closing Comment

ID: 40460896

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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.
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
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…
Via a live example, show how to shrink a transaction log file down to a reasonable size.

911 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

22 Experts available now in Live!

Get 1:1 Help Now