Skip to Content
avatar image
Former Member

Query Parameter against a UDT

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!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Dec 05, 2008 at 01:12 PM

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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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

  • avatar image
    Former Member
    Sep 11, 2008 at 08:01 AM

    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]

    Add comment
    10|10000 characters needed characters exceeded