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!

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

Similar Messages

  • SOAP web service: query parameter?

    Hi guys,
    I'm a newbie when it comes to web services and I've hit a problem that I didn't expect. I've exposed several SOAP services using the JAX-WS and WebLogic which are working fine. I've tried implementing an access key security mechanism such as Amazon does by adding a filter in front of the service's handling servlet to check for an access key sent as an HTTP query parameter. So basically, the service that was exposed at the following URL:
    http://localhost/company/service
    must now be accessed using the following URL:
    http://localhost/company/service?accessKey=123
    The filter checks the accessKey parameter and short-circuits the request if the wrong access key is sent.
    While this approach works well with JAX-RS web services, it doesn't seem to be working as well with JAX-WS web services: adding the parameter makes WebLogic return a 404 error instead of processing the request. I'm convinced I've seen web services being called with query parameters and that this can be done, but I don't see how. Any ideas anyone?
    Cheers!

    It seems that the servlet generated by Workshop doesn't handle extra parameters too well. I've managed to get it working by tweaking the filter so that it lets WSDL retrieval requests pass through but still filters the other requests. Everything is working fine.

  • SSRS countrow Aggregate error(Aggregate and lookup functions cannot be used in query parameter expressions.)

    Below expression works fine with text box but gives error in dataset expression.
    ="SET FMTONLY OFF select  "+ join(Parameters!Column.Value,",") +" FROM pamcustom.dbo.vw_HFL_HFD_HotfileData INNER JOIN pamcustom.dbo.HFL_HFB_HotFileBatch  on BatchID = HFB_intBatchID where BatchID ="+Parameters!BatchId.Value+"
    and "+Parameters!cmbTranType.Value+" "+ iif(CountRows("DS_Aml_Mnr_Iss_Desc")=Parameters!Mnr_Iss_Desc.count," "," and aml_mnr_iss_desc in "+"('" & join(Parameters!Mnr_Iss_Desc.Value,"','")
    & "')")+iif(CountRows("ds_ReportingCategory")=Parameters!ReportingCategory.count," "," and ReportingCategory in "+"('" & join(Parameters!ReportingCategory.Value,"','") & "')")+iif(CountRows("ds_NAICSubGroup")=Parameters!NAICSubGroup.count,"
    "," and naicsubgroup in "+"('" & join(Parameters!NAICSubGroup.Value,"','") & "')")+iif(CountRows("ds_PortTrading")=Parameters!PortTrading.count," "," and porttrading in "+"('"
    & join(Parameters!PortTrading.Value,"','") & "')")+iif(CountRows("ds_GL_LE")=Parameters!GL_LE.count," "," and gl_le in "+"('" & join(Parameters!GL_LE.Value,"','") &
    "')")+iif(CountRows("ds_coagroup")=Parameters!cmbCoaGrp.count," "," and coagroup in "+"('" & join(Parameters!cmbCoaGrp.Value,"','") & "')")+iif(CountRows("Portfolio")=Parameters!cmbPort.count,"
    "," and portfolio in "+"('" & join(Parameters!cmbPort.Value,"','") & "')")+IIf(IsNothing(Parameters!txtSecID.Value)," "," and secid in ('"+Replace(Parameters!txtSecID.Value,",","','")+"')")+iif(IsNothing(Parameters!minPortFilter.Value)
    and IsNothing(Parameters!MinPort.Value)," "," and portfolio "+Parameters!minPortFilter.Value+Parameters!MinPort.Value)+iif(IsNothing(Parameters!maxPortFilter.Value) and IsNothing(Parameters!MaxPort.Value)," ","
    and portfolio "+Parameters!maxPortFilter.Value+Parameters!MaxPort.Value)+iif(IsNothing(Parameters!minCoaFilter.Value) and IsNothing(Parameters!txtMinCoa.Value)," "," and portfolio "+Parameters!minCoaFilter.Value+Parameters!txtMinCoa.Value)+iif(IsNothing(Parameters!maxCoaFilter.Value)
    and IsNothing(Parameters!txtMaxCoa.Value)," "," and portfolio "+Parameters!maxCoaFilter.Value+Parameters!txtMaxCoa.Value)
    I guess the error " Aggregate and lookup functions cannot be used in query parameter expressions." is because I am using CountRow to ensure that if all values of multi select all selected i will not use that filter in where clause.
    Pls. guide...

    Hi, Include your parameter total count in the dataset for parameter and instead of using countrows() function use the count from dataset in the expression.
    Hope this helps.........
    Ione

  • Passing query parameter through xcelsius 2011 at run time

    I am using reporting service as a web connectivity and I am trying to pass the query parameter at run time from the dashboard. While executing the xcelsius at first time it is working well with the default value but after passing the parameter from combo box, the data is not loading. It is not returning anything except the field name.
    I am new to this xcelsius. Your help will be really appreciated.
    Thanks.

    Hi,
    if you do the following thing,i think it may be helpfull,
    First select Data in menubar>Connection->select required connection>select the useage option in connection definition window>give  trigger cell value as combo box destination cell.
    Thanks,
    Ramana

  • How do I clear query parameter in Oracle 10g ADF

    HI ,
    My question is
    1. when i am navigating to page B from Page A its querying data and showing . And I have same Pgae B which is attached to Menu also
    so . How do i trace whether I am comming from menu or comming from Page A ..??
    2. if i moved to page A and searched with some criteria , after then I moved to Page B from Menu , again come back to Page A from Menu
    its retaining the old search criteria in the page . not clearing my search criteria . ( as a result what is happening its not showing the data whatever
    in the Table ) . In order to show my existing data , i need to clear and then again clicking page B in Menu then only its showing the data .
    so how to clear query parameter

    [email protected] wrote:
    HI ,
    My question is
    1. when i am navigating to page B from Page A its querying data and showing . And I have same Pgae B which is attached to Menu also
    so . How do i trace whether I am comming from menu or comming from Page A ..??Add a setActionListner and set a sessionscope variable according to the action?
    >
    2. if i moved to page A and searched with some criteria , after then I moved to Page B from Menu , again come back to Page A from Menu
    its retaining the old search criteria in the page . not clearing my search criteria . ( as a result what is happening its not showing the data whatever
    in the Table ) . In order to show my existing data , i need to clear and then again clicking page B in Menu then only its showing the data .
    so how to clear query parameter

  • I have SSRS parametarized report in that one data set have repeated values with query parameter . but while am mapping that query parameter to report parameter i need to pass distinct values. How can i resolve this

    I have SSRS parametarized report in that one data set have repeated values with query parameter . but while am mapping that query
    parameter to report parameter i need to pass distinct values. How can i resolve this

    Hi nancharaiah,
    If I understand correctly, you want to pass distinct values to report parameter. In Reporting Service, there are only three methods for parameter's Available Values:
    None
    Specify values
    Get values from a query
    If we utilize the third option that get values from a dataset query, then the all available values are from the returns of the dataset. So if we want to pass distinct values from a dataset, we need to make the dataset returns distinct values. The following
    sample is for your reference:
    Select distinct field_name  from table_name
    If you have any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Oracle 10g exp error with query parameter

    Hi all,
    I am trying to perform an export but getting this error when using the query parameter. I think it's a syntax problem but not sure where.
    I'm in a dos prompt
    E:\>exp file=xxxxx.dmp log=xxxx.log tables=xxxxx query='where responseid not in (select responseid from aaaa_bbbbb)';
    LRM-00112: multiple values not allowed for parameter 'query'
    EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
    EXP-00000: Export terminated unsuccessfully
    Thx

    This is why I love this forum so much.
    I've probably done thousands of exports and never used the query parameter.
    Here's something that will help you. Please read and note the requirement to escape, or protect, special characters and such.
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96652/ch01.htm
      exp scott/tiger TABLES=emp QUERY=\"WHERE job=\'SALESMAN\' and sal \<1600\"ji li

  • Expdp error with query parameter

    i am trying to use datapump and using query parameter in there as below...
    but when i use the below, its exporting some system "repcat$" tables and
    nothing realted to scott.audit table or anything realted to my query where
    clause...what am i doing wrong ??
    expdp system
    DUMPFILE=test.dmp
    LOGFILE=test.log
    DIRECTORY=DATA_PUMP_DIR
    TABLES=SCOTT.AUDIT
    QUERY=SCOTT.AUDIT:'"WHERE TRUNC (audit.audit_timestamp)
    BETWEEN TO_DATE ('01012008','DDMMYYYY') AND TO_DATE ('13012008','DDMMYYYY')"'
    also when i use scott instead of system user i get below error
    Export: Release 10.2.0.3.0 - 64bit Production on Wednesday, 22 July, 2009 12:53:45
    Copyright (c) 2003, 2005, Oracle. All rights reserved.
    Password:
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    ORA-39002: invalid operation
    ORA-39070: Unable to open the log file.
    ORA-39145: directory object parameter must be specified and non-null

    i treid again, but creating a new datapump dir as follows...create or replace dir dpdump as '/backup/dpdump/orcl';
    then gave grant read,write on directory dpdump to system
    and now why is oracle looking at a differnt location ?? even when i changed the
    direcotry ???
    $ expdp SYSTEM
    DUMPFILE=test.dmp
    LOGFILE=test.log
    DIRECTORY=DPDUMP
    QUERY=SCOTT.AUDIT:'"WHERE TRUNC (audit.audit_timestamp)
    BETWEEN TO_DATE ('01012008','DDMMYYYY') AND TO_DATE ('13012008','DDMMYYYY')"'
    Export: Release 10.2.0.3.0 - 64bit Production on Wednesday, 22 July, 2009 13:27:18
    Copyright (c) 2003, 2005, Oracle. All rights reserved.
    Password:
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    ORA-39001: invalid argument value
    ORA-39000: bad dump file specification
    ORA-31641: unable to create dump file "/oracle/app/oracle/product/10.2.0/admin/orcl/dpdump/expdat.dmp"
    ORA-27038: created file already exists
    Additional information: 1
    $>
    Seems little weird but can you:--
    1. Drop the dpdump directory.
    SQL> drop directory dpdump;
    2. recreate it and then grant the permissions.
    SQL> create directory dpdump as '/backup/dpdump/orcl';
    The folders must exists in the location.
    SQL> grant read,write on directory dpdump to system;
    3. SELECT directory_name, grantee, privilege
    FROM user_tab_privs t, all_directories d
    WHERE t.table_name(+)=d.directory_name
    ORDER BY 1,2,3;
    Anand

  • Export using a QUERY parameter

    I am trying to export a subset of data using the following parms:
    FILE=C:\EXPORT\ADM_ACCESS_LOG.DMP
    GRANTS=Y
    INDEXES=Y
    DIRECT=N
    ROWS=Y
    CONSISTENT=N
    TRIGGERS=Y
    CONSTRAINTS=Y
    FEEDBACK=1000
    TABLES=(THRESHER.ADM_ACCESS_LOG)
    QUERY=\"WHERE LOGIN_DT='31-JUL-2005'\"
    The table exists as does the column, however, I get the following error:
    LRM-00101: unknown parameter name 'LOGIN_DT'
    I have everything spelled correctly and I am logging into export as thresher.
    What am I doing wrong?
    Thanks

    use the query parameter like this
    QUERY="WHERE to_char(dte,'mm/dd/yyyy')='07/31/2005'"
    or
    QUERY="WHERE to_char(dte,'dd-mon-yyyy')='31-JUL-2005'"
    --thedba                                                                                                                                                                                                                                                                                                                                           

  • Query parameter question

    Hi
    What are the diffrence of the query parameter in following format:
    select * from table_a where row_id=?id
    select * from table_a where row_id=:id
    select * from table_a where row_id=&idThe 1st and 2nd works if I use them as named query from Java (Toplink)
    The 2nd and the 3rd works when I use them from SQL developer. SQL developer will pop up parameter window. but the window looks diffrent with each parameter format.
    What are the diffrences?
    Thanks

    >
    select * from table_a where row_id=?idMust be a Java thing, not SQL or PL/SQL
    select * from table_a where row_id=:idThis is a bindvariable
    select * from table_a where row_id=&idThis is a substitution variable
    Edited by: Alex Nuijten on Jun 17, 2009 5:33 PM
    Edited by: Alex Nuijten on Jun 17, 2009 5:34 PM

  • Using IN Operator in Query Parameter querying an Oracle dataset

    I have created a main data set querying from Oracle in which I have two query parameters that are multi-valued lists.  I created a data set for each of those multi-valued lists.  These two parameters are configured to be multi-valued and selected
    from the query.  On the main data set, the parameters are set to an expression: = Join(Parameter.Field.Value, ",").  If I sent just one value as a default in each of those parameters, works great.  If I select "Select All"
    in my drop down and rerun the report then I get "Query execution failed for dataset" and "rsErrorExecutingCommand".  I am using Report Builder 3.0.  I have seen some older posts saying you have to use a stored procedure to generate
    a string from the selects to be passed to the parameter?  I don't get this.  Obviously I want to stick with using a query parameter for the performance gain.  Is there an easy way to make this work?
    Grateful for any help!  Laurie

    Laurie, you are right that the execution time is too long.  Your instinct is correct to put the burden on the database to return the correct resultset, rather than filtering it in the report.  
    I think I wasn't clear about my explanation and you may have made this more complicated than it needs to be.  The functionality that you want is already in ReportBuilder.  Please check out this example from MS:
    http://technet.microsoft.com/en-us/library/aa337396(v=sql.105).aspx
    This is the correct syntax:
    AND soh.SalesPersonID IN (@BusinessPersonID)
     Is this how you have your query configured? If not, could you supply an example.
    Hope that helps,
    Mark

  • Problem in using query parameter in exp(9.2)

    Hi Folks,
    I'm not able to take export from a table with query option on a Solaris machine. here is my parameter file which has query parameter in it. I'm also posting error message.
    file=utf_exp_raw_citation.dmp
    log=utf_exp_raw_citation.log
    owner=utf8admin
    statistics=none
    tables=raw_citation
    query=\"where nvl(source,'AAA') in ('EMC','HMD','HSR','KIE','NASA','PIP','AAA')"\
    rows=y
    Error:-*
    $ exp utf8admin/[email protected] parfile=exp_raw_citation_07_01_2011_new.dat
    LRM-00116: syntax error at ')' following 'AAA'
    LRM-00113: error when processing file 'exp_raw_citation_07_01_2011_new.dat'
    EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
    EXP-00000: Export terminated unsuccessfully
    Please help me in this.
    regards
    Krishna Prasad Donepudi

    I suggest you utilize a parameter file to avoid the shell messing with metacharacters on command line

  • Query parameter with selectOneChoice in panelFormLayout

    hello all :)
    i got problem, how to make query parameter with selectOneChoice in panelFormLayout, anyone help me... :(
    helep gan.....helep
    thx
    agungdmt

    Hi Frank... :), thx for your response
    i have try your solution, but still not work. in this case i'm still confuse with using parameter (bind variable with view criteria) in join table
    in this below, query in my project (generate at create view object)
    --- [Query] ------
    SELECT WhLokasi.LOKASI_ID,
    WhLokasi.BARIS_KE,
    WhLokasi.DESKRIPSI,
    WhLokasi.KOLOM_KE,
    WhLokasi.SUBKOLOM_KE,
    WhRak.RAK_ID,
    WhRak.NAMA,
    WhWarehouse.WAREHOUSE_ID,
    WhWarehouse.NAMA AS NAMA1
    FROM WH_LOKASI WhLokasi, WH_RAK WhRak, WH_WAREHOUSE WhWarehouse
    WHERE (WhLokasi.RAK_ID = WhRak.RAK_ID) AND (WhRak.WAREHOUSE_ID = WhWarehouse.WAREHOUSE_ID)
    ------ [Bind variable] --------
    baris : String
    kolom : String
    subkolom : String
    namarak : String
    namagudangv : String
    ------ [View Creiteria] -------
    ( (WhLokasi.BARIS_KE = :baris ) AND (WhLokasi.KOLOM_KE = :kolom ) AND (WhLokasi.SUBKOLOM_KE = :subkolom ) AND (UPPER(WhRak.NAMA) LIKE UPPER( :namarak || '%') ) AND (UPPER(WhWarehouse.NAMA) LIKE UPPER( :namagudang || '%') ) )
    need help gan... :)
    thx
    agungdmt
    Edited by: agungdmt on Dec 16, 2010 6:42 PM

  • BDOC query parameter

    Hi all,
    I have a Bdoc parameter syntax related question.
    I want to set a query bdoc parameter as below where TERRID is a parameter and
    i want to pass sql like ...
    ****SQL****
    WHERE TABLE1.NTERRID LIKE 'TERRID%'
    ***BDOC QUERY***
    WHERE TABLE1.NTERRID LIKE :TERRID
    Now when this BDOC query is actually executes it puts % in front as well sql looks like below
    WHERE TABLE1.NTERRID LIKE '%TERRID%'
    how do i change my boc query parameter syntax to have % only at the end of the parameter and not in front.
    Thanks in advance
    Hetal

    Hi,
    no, I guess in your example you would need MatchAtBegin rather than MatchAtEnd. But normally MatchAdvanced is used. You need to try anyway...
    MatchEmpty looks like the possibility to search for empty content explicitely, but I never have seen this somewhere...
    Regards,
    Wolfhard

  • Impdp Query parameter

    Hi
    I have the following query parameter in my parfile
    QUERY=SYSADMIN:INVOICE"Where Invoice_date>TO_DATE('01JAN09','DDMONYY')"
    When I start the Import job it is doing a full table scan on the source table - Ideally it must use the index on invoice date.
    Any pointers would be appreciated.

    Hello,
    Where Invoice_date>TO_DATE('01JAN09','DDMONYY')If the above Where clause is not selective enough, then the Optimizer may prefer a Full Table Scan.
    You may have some example on the link below:
    http://courses.csusm.edu/cs643yo/slides/optimization.htm
    Best regards,
    Jean-Valentin

Maybe you are looking for