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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 54

Accepted Solution

Huseyin KAHRAMAN 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

by:Scott Pletcher
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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

729 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