EJB QL WHERE IN expression with parameter

I would like to use an input parameter (?1) to represent an entire set ('A','B') inside the expression of the WHERE ... IN clause as follows:
SELECT OBJECT(t) FROM Table t WHERE t.field IN ('A','B')
SELECT OBJECT(t) FROM Table t WHERE t.field IN (?1)
Adding <ql-2.1-compatible/> into persistent.xml allows the last EJB-QL expression to be deployed.
Unfortunately, the parameter (?1) can only represent 1 member in the set.  Is there anywhere to get a single parameter (?1) to represent an entire set ('A','B','C','D') ?
Alton

michaels>  var par varchar2(100)
michaels>  exec :par := '7839,7698,7782'
PL/SQL procedure successfully completed.
michaels>  select *
  from emp
where empno in (
          select t.column_value.extract ('/r/text()').getnumberval() from table (xmlsequence (xmltype ('<r><r>' || replace (:par, ',', '</r><r>') || '</r></r>').extract ('//r'))) t)
     EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
      7839 KING       PRESIDENT            17-NOV-81       5000                    10
      7782 CLARK      MANAGER         7839 09-JUN-81       2450                    10
      7698 BLAKE      MANAGER         7839 01-MAI-81       2850                    30

Similar Messages

  • Hide Matrix column With Parameter

    Hi
    I,m trying to hide matrix columns with parameters. If i for example have one matrix column with for example tre metrix values  (Jan, Feb, and Mar). I have an expression with the values Jan, Feb, Mar with witch i would like to decide which
    columns to show in the matrix column. In cases when i have a real column i use code as below in the column. But now that this three columns basically exists in one matrix column i dont know how to solve it. Anybody that has a soluiton on this preferably
    some example code on the example.
    IIF(INSTR(JOIN(Parameters!ColumnChoser.Value,
    ","),"Jan")>0,False,True)
    Best regards Arne
    Arne Olsson

    Why not restrict data to only show the months you passed. Matrix creates columns based on data available so what you need is a filter like this in query below
    WHERE ','+ @MonthList + ',' LIKE '%,' + MonthName + ',%'
    assuming @MonthList as parameter through which you pass Jan,Feb etc and MonthName is column of the table containing corresponding month names used as matrix column group.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • ORDS Template with parameter does not work

    Hello everybody,
    I can not get working a RESTful Service using the ORDS_SERVICES -API (ORDS version 3.0.0.343.07.58), same Query without parameter (hardcoded product_id) works fine.
    declare
    l_module_id number;
    l_template_id number;
    l_handler_id  number;
    l_parameter_id number;
    begin
    ORDS_SERVICES.delete_module(p_name => 'test_parameter');
    l_module_id := ORDS_SERVICES.create_module(p_name => 'test_parameter',
                                p_uri_prefix => '/test_parameter',
                                p_items_per_page => 10,
                                p_status => 'PUBLISHED',
                                p_comments => null);
    l_template_id := ORDS_SERVICES.add_template(p_module_id => l_module_id,
                               p_uri_template => '/demo_product_info_10/',
                               p_priority => 0,
                               p_etag_type => 'HASH',
                               p_etag_query => null,
                               p_comments => null);
    l_handler_id := ORDS_SERVICES.add_handler(p_template_id => l_template_id,
                               p_source_type => 'MEDIA', -- source_type IN ('COLLECTION_FEED', 'COLLECTION_ITEM', 'FEED', 'MEDIA', 'PLSQL', 'QUERY', 'QUERY_1_ROW')
             p_source => 'select mimetype, product_image from demo_product_info where product_id = 2',
             p_format => 'DEFAULT',
             p_method => 'GET',
             p_items_per_page => null,
             p_mimes_allowed => null,
             p_comments => null);
    /* now same result but with parameter */
    l_template_id := ORDS_SERVICES.add_template(p_module_id => l_module_id,
                               p_uri_template => '/demo_product_info/{product_id}',
                               p_priority => 0,
                               p_etag_type => 'HASH',
                               p_etag_query => null,
                               p_comments => null);
    l_handler_id := ORDS_SERVICES.add_handler(p_template_id => l_template_id,
                               p_source_type => 'MEDIA', -- source_type IN ('COLLECTION_FEED', 'COLLECTION_ITEM', 'FEED', 'MEDIA', 'PLSQL', 'QUERY', 'QUERY_1_ROW')
             p_source => 'select mimetype, product_image from demo_product_info where product_id = :product_id',
             p_format => 'DEFAULT',
             p_method => 'GET',
             p_items_per_page => null,
             p_mimes_allowed => null,
             p_comments => null);
    l_parameter_id := ORDS_SERVICES.add_parameter(p_handler_id => l_handler_id,
                               p_name =>  'product_id',
             p_bind_variable_name => 'product_id',
             p_source_type => 'URI',
             p_param_type => 'INT',
             p_access_method => 'IN',
             p_comments => null);
    commit;
    end;
    The first template works fine:
    http://localhost:8080/ords/xxx/test_parameter/demo_product_info_10/
    shows a jpeg image of a wallet.
    The second template does not work:
    http://localhost:8080/ords/xxx/test_parameter/demo_product_info/10/
    fails with error:
    mapped request using: BasePathMapper [basePath=/xxx/] to: SCHEMA:apex|XXX
    Choosing: oracle.dbtools.http.dispatch.DispatchMetaData as current candidate with score: MetaDataScore [score=0, matchedMethod=  GET: {10299, false}
      common: CommonMetaData [accepts=[], cors=null, documentation=null, frameOptions=null, pageSize=10, pagination=NONE, requiresPrivilege=null, transport=null]
    , matchedPattern= /test_parameter/demo_product_info/{product_id}
    common: CommonMetaData [accepts=[], cors=null, documentation=null, frameOptions=null, pageSize=null, pagination=null, requiresPrivilege=null, transport=null]
    methods:
      GET: {10299, false}
      common: CommonMetaData [accepts=[], cors=null, documentation=null, frameOptions=null, pageSize=10, pagination=NONE, requiresPrivilege=null, transport=null]
    stack trace:
    oracle.dbtools.http.errors.InternalServerException: java.lang.IllegalArgumentException: INT
    at oracle.dbtools.http.errors.ErrorPageFilter.internalError(ErrorPageFilter.java:165)
    at oracle.dbtools.http.errors.ErrorPageFilter.doFilter(ErrorPageFilter.java:113)
    at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:44)
    at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:51)
    at oracle.dbtools.http.cors.CORSFilter.doFilter(CORSFilter.java:35)
    at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:44)
    I changed the add_parameter-call p_param_type => 'INT' to be  p_param_type => 'STRING'
    then error remains the same and strack trace says
    oracle.dbtools.http.errors.InternalServerException: java.lang.IllegalArgumentException: STRING
    at oracle.dbtools.http.errors.ErrorPageFilter.internalError(ErrorPageFilter.java:165)
    at oracle.dbtools.http.errors.ErrorPageFilter.doFilter(ErrorPageFilter.java:113)
    Could you please confirm and fix,
    kind regards,
    Tom

    This is a guess, but I suspect that ords_services.add_parameter() is not required at all.
    Also, your URL /demo_product_info/10/ should not have the trailing slash (according to your template URI).
    For more information, I suggest you look here:
    ords.3.0.0.343.07.58.zip\ords.war\scripts\migrate\core\ords_migrate.plb
    The migration package will show what is usually done for templates that already exist within APEX 4.2. I checked my templates and the ones with URI variables {in-curly-brackets} contain no records in apex_040200.wwv_flow_rt$parameters.
    -Kris

  • How to run a webdynpro multiple times by passing different parameters each time and save webpages with parameter name?

    Hi Experts,
    I am a BW consultant and new to webdynpro. Not sure how to run RSO_METADATA_REPOSITORY multiple times and by passing different parameter values each time(either taken from an a standard BW table or user provided - anything is fine) and build web pages with parameter name. Need help with direction on where to start.
    Let me step back and explain my requirement:
    In BW we have an object called transformation.
    One way of generating documentation for transformation is highlight transformation and press F1. Then its documentation will be opened as a local web page.
    I need these web pages for all transformations. This is my requirment.
    I came to know that RSO_METADATA_REPOSITORY is beeing used to generate this web page.
    The web link is something like below:
    http://ubw05.xxx.com:8005/SAP/BW/DOC/METADATA/?page=BW_O_D&SystemID=BWPCLNT100&ClassID=TRFN&ID=0KHR6J65AIIUTCJZEC093K6XDFV909PB&objectVersion=A&sap-language=EN&sap-client=100
    When i run this link seperately(not by selecting transformation and pressing F1) i need to enter login credentials to BW system.
    My challenges is how do i pass login credentials and multiple transformation IDs to generate multipe web pages with each page named by transformation ID?
    WHere to start? First of all is RSO_METADATA_REPOSITORY Webdynpro JAVA or webdynpro ABAP or can i use anything?
    Since it is beeing opened as local webpages i assume it is webdynpro JAVa is that correct?
    Thanks,
    Raghu

    hello,
    might be a problem with the version you are using.
    regards,
    the oracle reports team

  • Is it possible to create a spatial view with paramete?

    Is it possible to create a view with parameter like following:
    SELECT GEOM FROM INTERSTATES WHERE MDSYS.SDO_FILTER(GEOM, MDSYS.SDO_GEOMETRY(2003, 8307, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 3), MDSYS.SDO_ORDINATE_ARRAY(?, ?, ?, ?)), 'querytype=WINDOW') = 'TRUE'
    so that I can specify ???? at run time.
    If not, is there a way to create a view that perform variable window query?

    You may want to look at application contexts, that way you may have code something like this:
    create or replace context gis_ctx using gis_params ;
    create or replace package gis_params
    as
    procedure set_bounds( minx in number, miny in number, maxx in number,maxy in number );
    end;
    create or replace package body gis_params
    as
    procedure set_bounds( minx in number, miny in number, maxx in number,maxy in number )
    is
    begin
    dbms_session.set_context( 'gis_ctx', 'minx', minx);
    dbms_session.set_context( 'gis_ctx', 'miny', miny);
    dbms_session.set_context( 'gis_ctx', 'maxx', maxx);
    dbms_session.set_context( 'gis_ctx', 'maxy', maxy);
    end ;
    end ;
    To use this method you´ll have to execute
    gis_params.set_bounds(-3,40,-2.9,40.1) ;
    before doing the select.
    SELECT GEOM
    FROM INTERSTATES
    WHERE MDSYS.SDO_FILTER(GEOM,
    MDSYS.SDO_GEOMETRY(2003,
    8307,
    NULL,
    MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 3),
    MDSYS.SDO_ORDINATE_ARRAY(sys_context ('gis_ctx', 'minx'),
    sys_context ('gis_ctx', 'miny'),
    sys_context ('gis_ctx', 'maxx'),
    sys_context ('gis_ctx', 'maxy'))),
    'querytype=WINDOW') = 'TRUE' ;
    I f you are in a web environment, read about GLOBAL CONTEXT ACCESSED GLOBALLY .
    Regards, Nico.

  • Replacing an Airport Express with a Time Capsule but it won't connect to the internet.

    Hello, I hope somebody can help.
    I am trying to replace an Airport Express with a 2TB Time Capsule but it won't connect to the internet, via an ADSL modem.
    I have tried everything I can think of, powering down all devices, re-setting all devices, but nothing seems to solve the problem.
    When I first tried to set up the Time Capsule, there was an option to replace the Airport Express using the same settings.
    But there were repeated error messages of 'No DNS Servers' and 'PPPoE server couldn't be found'.
    I also had messages that the password for PPPoE wasn't correct, but when I plug the Airport Express back in again, everything works fine.
    What could the problem be?

    99% of issues with authentication are wrong password or wrong username.. eg it can be strange like the user name is missing the domain.. whereas the Airport Express works fine without it.
    Ring your ISP and make doubly sure you have exactly the correct username and password.
    If it still doesn't work, put the adsl modem back into router mode and try it again directly on the modem.. if it works ok on the modem but fails on the TC that is possible and can be caused by pppoe client using incorrect authentication type, CHAP or PAP which the TC does not allow you to select AFAIK.. some ISP do not give enough time to get the router to switch on auto to the correct authentication method.
    In the end run the modem as router and bridge the TC. It will work just as well for most installations in bridge as the modem in bridge.

  • Airport Express with printer & hard drive with Time Machine

    I have a MacBook that I'd like to backup its data. Concerned about the following (in level of concern from highest to lowest): theft, crash, fire.
    I currently have an Airport Express with a Brother printer attached to it that my PC and MacBook print to.
    I am really in a dilemma as to what to do. I was looking into Carbonite to get an offsite backup location of my data. (I figured offsite would cover all concerns of losing data due to theft, fire, or just a crash) However, Carbonite does not hold onto data you delete (ie, my photos and videos will fill up my hard drive eventually and I'd like to just archive them in one central spot when I am done accessing them on a regular basis-- ie delete them off my MacBook hard drive). That is like $55/year to do Carbonite... but, the only thing that will help me with over a hard drive in my house is a fire (and theft if a burglar were to find where my backup drive was in the house).-- Of course, I'd probably want a different location for my hard drive for that reason -- so, I'd have to buy another airport or just a time machine that has the wifi built in.
    I've read lots of issues with the Western Digital trying to download programs onto your computer... I have one for my PC that I backed up photos manually and it did try to install programs when I attached it to my PC... not so much my Mac when I took some photos off it. I looked into getting another portable hard drive at Costco for my Mac, but realized that it would require reformatting to use on my Mac (as it was built for a PC).... something I wasn't sure if I was computer-savvy enough to do or if I did do it, would I end up with issues later on?
    Anyhow... in the end, what do you all do to backup your data, especially photos and videos? Do you have smaller hard drives that you back up to and then when full move them to an offsite location? Can you have more than one "hard drive" backing up..... I was thinking it would be nice to have one larger hard drive that would potentially hold all my photos and videos so I can access anytime, but then have smaller drives of the same data that I can take to a safe deposit box and use as my super secure backup (no fire, no theft, no crash).
    btw, When doing time machine, does it keep all the metadata with each photo?
    Burning CD's is time consuming.... and, I have heard there are different qualities of disks out there... archival v. not... how long do the archival last v. the non-archival... or is that more of an issue for future generations not being able to access our photos?

    You need to remember that the Time Capsule is both a wireless router and a hard drive all in one enclosure. If you don't need a wireless router, around $150 of the $300 for a Time Capsule is going to be in the router portion of the device.
    The nice thing about the Time Capsule is that it is a network drive. All Macs running Leopard or Snow Leopard will be able to back up automatically to a single device. The first generation of Time Capsules about two years ago had some power supply problems that affected some users. Apple announced a program for these users to replace their Time Capsules.
    So, it depends on your requirements. If you are looking for a new, dual band wireless router and want to backup your Macs running Leopard or Snow Leopard automatically using ethernet or wireless, the Time Capsule is a logical choice.
    If you don't need a new router, then you'll need to look at a separate hard drive that will be attached directly to the computer using the USB or FireWire port. If you have two Macs, you'll have to get two hard drives if you want to do Time Machine backups correctly.
    Most hard drives can be reformatted to work with Mac if you don't mind a few extra steps and Disk Utility (Macintosh HD > Applications > Utilities > Disk Utility) does not look too complicated for you.
    Message was edited by: Bob Timmons

  • SQL Server 2008 R2 Express with SP2: 'SQLEXPRESS'-instance installation fails while any other instance name installation succeeds.

    We supply our software package that also includes the unattended installation (with /QS and so on) of SQL Server R2 Express (with SP2).
    The setup works good in about 99.9% cases, but one customer complained that after the "successful SQL Sever installation (at least, it looked so!) he could not open the supplied database getting some strange error messages...
    After some months of trial-n-error attempts we are now able to reproduce the problems this custumer had. But we cannot find the reason of the problem.
    So the test computer is a virtual machine with Windows 7 + sp1 32-bit.
    Among the programs/tools installed on this machine there were (in the following order):
    SQL Server 2008 Express - the default SQLEXPRESS instance
    SSMS
    VS 2010 Pro (German)
    SQL Server 2008 Express R2 (with SP 1 or SP2 - ?) - the default SQLEXPRESS instance
    Then some of them were uninstalled in the following order:
    SQL Server 2008 Express
    SSMS
    SQL Server 2008 Express R2 
    Now we tried to install (in normal mode with UI) the SQL Server 2008 Express R2 with SP2.
    When we chose the default SQLEXPRESS instance - it failed with the following info:
    Configuration status: Failed: see details below
    Configuration error code: 0x7FCCE689
    Configuration error description: External component has thrown an exception.
    and the Detail.txt file contained the following:
    2015-01-20 10:44:09 Slp: External component has thrown an exception.
    2015-01-20 10:44:09 Slp: The configuration failure category of current exception is ConfigurationValidationFailure
    2015-01-20 10:44:09 Slp: Configuration action failed for feature SQL_Engine_Core_Inst during timing Validation and scenario Validation.
    2015-01-20 10:44:09 Slp: System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception.
    2015-01-20 10:44:09 Slp: at SSisDefaultInstance(UInt16* , Int32* )
    2015-01-20 10:44:09 Slp: at Microsoft.SqlServer.Configuration.SniServer.NLRegSWrapper.NLregSNativeMethod Wrapper.SSIsDefaultInstanceName(String sInstanceName, Boolean& pfIsDefaultInstance)
    2015-01-20 10:44:09 Slp: Exception: System.Runtime.InteropServices.SEHException.
    2015-01-20 10:44:09 Slp: Source: Microsoft.SqlServer.Configuration.SniServerConfigExt.
    2015-01-20 10:44:09 Slp: Message: External component has thrown an exception..
    2015-01-20 10:44:09 Slp: Watson Bucket 1 Original Parameter Values
    2015-01-20 10:44:09 Slp: Parameter 0 : SQL Server 2008 R2@RTM@
    2015-01-20 10:44:09 Slp: Parameter 1 : SSisDefaultInstance
    2015-01-20 10:44:09 Slp: Parameter 2 : SSisDefaultInstance
    2015-01-20 10:44:09 Slp: Parameter 3 : System.Runtime.InteropServices.SEHException@-2147467259
    2015-01-20 10:44:09 Slp: Parameter 4 : System.Runtime.InteropServices.SEHException@-2147467259
    2015-01-20 10:44:09 Slp: Parameter 5 : SniServerConfigAction_Install_atValidation
    2015-01-20 10:44:09 Slp: Parameter 6 : INSTALL@VALIDATION@SQL_ENGINE_CORE_INST
    When we chose some other instance name then the installation has completed successfully.
    So the questions are:
    What could be the reason of the problem (and only for SQLEXPRESS instance that was earlier installed and then uninstalled)? I will provide the complete Detail.txt file if needed. 
    How could we check (if we could) the conditions so some name would be allowed as an instance name for SQL Server installer to success?
    With the best regards,
    Victor
    Victor Nijegorodov

    Thank you Lydia!
    Unfortunately the simple check the registry
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL does /did not work in our case since there is no any instance
    name there,
    However there seem to be some "rudiments" under
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall and/or HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services.
    So I will now try to check the subkeys of these two keys as it was mentioned by Xiao-Min Tan. 
    Best regards,
    Victor Nijegorodov
    Victor Nijegorodov

  • Digital outs in Logic Express with 828 or 002 rack

    Can someone tell me if it is possible to use the digital ins and outs of either my MOTU 828 or DIgi 002 rack with LE? It's no where as easy as Pro tools or DP!!

    Forgive my naivety... when you say "digital outs" are you talking about SPDIF? Does this mean I can't run Logic Express with an interface connected to the SPDIFs on my G5? Only Pro? Or am I off the mark?
    Thanks!

  • CANT execute query with parameter on user defined tables using query genera

    Dear All,
    I have problem when executing query with parameter on user defined tables using query generator.
    It seems SBO cannot accept parameter to query user defined tables.
    I've tried these:
    SELECT T0.U_Status FROM [@ST_PR_H] T0 WHERE T0.U_Status = [%0] --- this FAIL
    I try to pass the value directly without using parameter and It works
    SELECT T0.U_Status FROM [@ST_PR_H] T0 WHERE T0.U_Status = 2 --- this SUCCESS
    This one works
    SELECT * FROM RDOC T0 WHERE T0.width =[%0]  --- this SUCCESS
    and this one works too
    SELECT * FROM RDOC T0 WHERE T0.width = 595  --- this SUCCESS
    Is there anyone can help me ....???
    Thanks,
    Alfa

    I  generated this code using query wizard ....
    SELECT T0.[U_Status] AS 'Document Status' FROM  [dbo].[@ST_PR_H] T0  WHERE T0.[U_Status] = (N'2' )
    and replaced the (N'2' ) with [%0]
    SELECT T0.[U_Status] AS 'Document Status' FROM  [dbo].[@ST_PR_H] T0  WHERE T0.[U_Status] = [%0]
    and It worked ......
    Thanks 4 all .....

  • Can I use Airport Express with iPhone in my hotel room?

    Is there a way to set up an Airport Express in my hotel room when I travel, so that the provided High Speed internet cable in the room can be plugged into my Airport Express, giving me a wireless internet connection for the iPhone? I use Airport Express often this way with my MacBook, so I don't have to be tethered to the cable.

    I did this about a month ago when I was in England. I just had the Airport Express with me, and had not done any configurations. I plugged it in and had the iPhone find it. It worked in some hotels, and didn't at others. When it worked it was great. I assume with some of the hotels where it didn't work, that I needed to configure it but since I didn't have my laptop I didn't have any way to configure it. Is there any kind of "universal" or "automatic" configuration you can set it up with?

  • Send values to IN query with parameter

    Subject: send values to IN query with parameter
    Hello. Hope I'll explain my problem well enough:
    I have a query:
    -- select id from table where id in ('100')
    Now I used parameter for the IN part:
    -- select id from table where id in (:param)
    and I gave the parameter the value 100.
    now I want to have the query with two values:
    -- select id from table where id in ('100','200')
    I tried to use the parameter and give him the value of: '100','200'.
    It didn't worked :(
    Is there a syntax to give the parameter more then one value for the IN query (with out using another table or function etc')?
    Thanks in advance,Roy.

    This is the best solution I have for it.
    variable parameter varchar2(4000);
    exec :parameter := 'SYSTEM,SYS';
    select username
    from dba_users
    where username in ( select COLUMN_VALUE from table  (split_string(:parameter,',')))It uses this function
    CREATE OR REPLACE
    type string_table  as table of varchar2(4000)
    CREATE OR REPLACE
    FUNCTION split_string (
         string IN varchar2,
        delimiter IN varchar2
    ) RETURN  string_table IS
         tab string_table;
         pre integer;
         post integer;
         step integer;
         i integer;
    BEGIN
         pre := 1;
         step := length(delimiter);
         i := 0;
         tab := string_table();
         loop
              tab.extend;
              i := i + 1;
              post := instr(string,delimiter,pre);
              if ( post = 0 ) then
                   tab(i) := substr(string,pre);
                   return tab;
              end if;
              tab(i) := substr(string,pre,post-pre);
              pre := post + step;
         end loop;
    END;
    /Bye Alessandro

  • Cannot create view with parameter bindings

    Hi, I'm trying to create this view in SQLPlus:
    SELECT order_no, SUM(cut_qty),
    SUM(received_qty)
    FROM (
    SELECT order_no, cut.dated, DECODE(cut.bimetallic, 'F', cut.quantity, cut.quantity/2) cut_qty,0 AS received_qty
    FROM cut_shop_orders_dated cut
    WHERE cut.dated BETWEEN TO_DATE('&date1','DD/MM/YYYY') AND TO_DATE('&date2','DD/MM/YYYY')
    UNION
    (SELECT order_no, rec.dated, 0, rec.quantity
    FROM received_shop_orders_dated rec
    WHERE rec.dated BETWEEN TO_DATE('&date3','DD/MM/YYYY') AND TO_DATE('&date4','DD/MM/YYYY')))
    GROUP BY order_no
    The problem is that sqlplus asks me for the parameter values and then creates it with these values as literal dates in the to_date function, those not asking for parameter values in runtime.
    How can I create it using parameters with no values at design time?
    Thanks.
    Leandro.

    if you want something like :
    select * from emp $where_clause;
    you can write a procedure with parameter and run it as dynamic sql for example
    create or replace procedure pr1 ( p_where   varchar2) is
    begin
      execute immediate 'create or replace view view_name as select * from emp '|| p_where;
    end pr1;
    /then run it on sql*plus
    SQL> exec pr1('where deptno = 10');
    make sure you give yourself "create any view" rights explicitly.
    HTH
    Ghulam

  • Regular Expressions with Call Policy on VCSe

    Hi Guys,
      I am working on firming up the call policy on my VCS Expressway to try to better intercept the SIP spam requests it is getting from internet ip numbers. Right now those spam requets are getting rejected by the loop detection but I want to intercept them before they even do a search on the Expressway. It seems that the call policy rules I create without regular expressions are functioning fine but I don't think I have the syntax correct for the regular expressions.
    The goal of this rule is to reject any incoming SIP request that has a destination alias format of 7 to 17 digits followed by an @VCSe_IP. so for example it would reject the following attempts: 0123456@VCSe_IP and 0123456789101112@VCSe_IP with one rule.
    The policy I created is this: source pattern: unauthenticated user, Destination pattern: \d{7,17}@xx\.xx\.xx\.xx (where xx is the individual octets of the VCSe IP address), Action: reject  
    However the above policy does not seem to be rejecting the calls before they do a search. I have checked the above expression with the check pattern tool on the VCSe and it comes up with a sucessful match when I try the destination alias of a request that made it through, hence my confusion. Any help you guys could provide would be appreciated.
    Thanks,
    Steven                

    Steven,
    Default Zone access rules do not relate to this at all and you can keep those set to 'No'.
    How exactly are you placing the test calls when attempting to verify this?
    I created the following CPL rule on my X7 VCS (With 10.10.10.10 being the IP address of my VCS):
    Source pattern:
    Destination pattern: \d{7,17}@10\.10\.10\.10
    Action: Reject
    I then proceeded with placing a SIP call from an unregistered C20, calling the URI '[email protected]' while running a diagnostics log on my VCS with Network log level set to 'DEBUG', and captured the following in that log:
    Incoming INVITE:
    2013-02-22T16:03:36+01:00 vcs02 tvcs: UTCTime="2013-02-22 15:03:36,598" Module="network.sip" Level="INFO":  Src-ip="10.x.x.x"  Src-port="5060"   Detail="Receive Request Method=INVITE, Request-URI=sip:[email protected], Call-ID=9dd19ad75b1063ecf716461b149e9e2a"
    2013-02-22T16:03:36+01:00 vcs02 tvcs: UTCTime="2013-02-22 15:03:36,598" Module="network.sip" Level="DEBUG":  Src-ip="10.x.x.x"  Src-port="5060"
    SIPMSG:
    |INVITE sip:[email protected] SIP/2.0
    Call processing logic, showing CPL matching:
    2013-02-22T16:03:36+01:00 vcs02 tvcs: Event="Search Attempted" Service="SIP" Src-alias-type="SIP" Src-alias="10.x.x.x" Dst-alias-type="SIP" Dst-alias="sip:[email protected]" Call-serial-number="0886391c-7d01-11e2-adf5-0050569a08fd" Tag="08863aac-7d01-11e2-bd2e-0050569a08fd" Detail="searchtype:INVITE" Level="1" UTCTime="2013-02-22 15:03:36,601"
    2013-02-22T16:03:36+01:00 vcs02 tvcs: Event="Call Attempted" Service="SIP" Src-ip="10.x.x.x" Src-port="5060" Src-alias-type="SIP" Src-alias="sip:10.x.x.x" Dst-alias-type="SIP" Dst-alias="sip:[email protected]" Call-serial-number="0886391c-7d01-11e2-adf5-0050569a08fd" Tag="08863aac-7d01-11e2-bd2e-0050569a08fd" Protocol="UDP" Auth="NO" Level="1" UTCTime="2013-02-22 15:03:36,601"
    2013-02-22T16:03:36+01:00 vcs02 tvcs: UTCTime="2013-02-22 15:03:36,602" Module="network.cpl" Level="DEBUG":  Remote-ip="10.x.x.x"  Remote-port="5060"   Detail="CPL: "
    2013-02-22T16:03:36+01:00 vcs02 tvcs: UTCTime="2013-02-22 15:03:36,602" Module="network.cpl" Level="DEBUG":  Remote-ip="10.x.x.x"  Remote-port="5060"   Detail="CPL:   "
    2013-02-22T16:03:36+01:00 vcs02 tvcs: UTCTime="2013-02-22 15:03:36,602" Module="network.cpl" Level="DEBUG":  Remote-ip="10.x.x.x"  Remote-port="5060"   Detail="CPL: matched "
    2013-02-22T16:03:36+01:00 vcs02 tvcs: UTCTime="2013-02-22 15:03:36,602" Module="network.cpl" Level="DEBUG":  Remote-ip="10.x.x.x"  Remote-port="5060"   Detail="CPL: "
    VCS responds to INVITE with 403 Forbidden:
    2013-02-22T16:03:36+01:00 vcs02 tvcs: UTCTime="2013-02-22 15:03:36,616" Module="network.sip" Level="DEBUG":  Dst-ip="10.x.x.x"  Dst-port="5060"
    SIPMSG:
    |SIP/2.0 403 Forbidden
    As you can see, on my VCS everything seems to work as expected. I'd recommend you capture a similar diagnostics log on your own VCS to check what is different in your test call compared to the output above.

  • ORA-00998: must name this expression with a column alias

    Dear all,
    create table mebs_temp10 tablespace mebs_tempt nologging as SELECT TRUNC(meddate) as meddate, ctype , btext btext, COUNT (1), sum(duration/60), SUM (bamount) FROM mells.hcalls WHERE meddate >= '01-JAN-2009' and meddate < '01-MAY-2009' GROUP BY meddate, ctype, btext
    ERROR at line 1:
    ORA-00998: must name this expression with a column alias
    I tried giving a alias for the columns ctype , btext .. but helpless. which column to be aliased ?
    Kai

    Try this...
    create table
    mebs_temp10 tablespace mebs_tempt nologging as
    SELECT
    TRUNC(meddate) as meddate,
    ctype,
    btext btext,
    COUNT (1) count_field,
    sum(duration/60) sum_duration,
    SUM (bamount) sum_bamount
    FROM mells.hcalls WHERE meddate >= '01-JAN-2009' and meddate < ' GROUP BY meddate, ctype, btext

Maybe you are looking for

  • Syncing Issues: album art, cut-off songs

    I have a 16GB iPod Touch that I've been syncing with my Windows Vista PC, seemingly without complications. It has only recently come to my attention that somewhere between my computer's library and my library on my iPod, something is messing up at ra

  • Error in transferring a Contract from R/3 to SRM

    Hi Gurus, we've implemented SAP SRM on an extended classic scenario with R/3 as the back-end system. I transfer contracts from the back-end system to SRM by using the BBP_CONTRACT_INITIAL_UPLOAD report. A problem occurs when the contract in the R/3 s

  • Trial Help

    I downloaded the new Flash Builder 4.5 PHP Standard, but when I installed it it said it was the premium version.  After running the install I opened the program and it said that I needed to install Zend.  There was a tab for Zend so I installed it. 

  • Renderer for JLabel

    Hi, I'm looking for a way to automatically set the text of a JLabel depending on choices made in a couple of JComboBoxes. Is there a way to set the text of a JLable using a Renderer (?) like it is possible to set the cells in an List or Table? Would

  • When saving to bookmark folders, dropdown menu does not display all of them, just a few.

    When attempting to save a bookmark, using "Bookmark this page" and then selecting Bookmark Menu to display a list of saved folders, the list of saved folders that appears is a short partial list. This list does not permit scrolling to view the remain