cancel
Showing results for 
Search instead for 
Did you mean: 

Query Parameter against a UDT

Former Member
0 Kudos

Hello All:

Normally when you do paramter like


/*select from OINV t0*/ 
declare @docdate as datetime
/* where */ 
set @docdate = /* t0.docdate */ '[%0]' 
select @docdate

But I have tried to use a parameter against UDT instead of SBO native table.. I am not sure if this is doable...Has anyone done something like this before?


/*select from dbo.[@JP_WHSPSR] t0*/ 
declare @wareperson as nvarchar(50)
/* where */ 
set @wareperson = /* t0.Name */ N'[%0]' 
select @wareperson

Anyone can help I greatly appreciate it!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello I´m trying something similar, I want to filter from a table, how do you use the clause "WHERE" in your query??

Former Member
0 Kudos

You assuming you mean the where clause in the parameter statements. They are very limited. I think I have done something with simple where clause. To say select only date after a specific date. Or select only customer...etc But if you want to do complex selection I don't know if it is possible.

Former Member
0 Kudos

Hi, many thanks for responding. I want to do something like this

/* Select from .[owht] T0 */

declare @code as nvarchar(15)

/* where T0.U_TGV_CODE_JURIS ='902'*/

set @code= /* T0.wtname */ '[%0]'

select @code

But the 'where' clause doesn´t filter the query I only want to select the name where de code is like '902' and not the rest. This brings me all what i have in the table

Answers (1)

Answers (1)

Former Member
0 Kudos

It should be the same.

I expect that here you make select from UDT

set @wareperson = /* t0.Name */ N'[%0]'

Check, if is there correct table name written (due prefix @) as

dbo.[@UDT]