Problem with select query that includes a date

I fought with it for about 4 hours - Yes, quite literally... I was never good with stuff to date. I have a brain block.

In any case, here's the situation:

I have an Access database that has a date/time field. There is no time, just a date in the format dd/mm/yyyy.

This table is a list of classes held for three years. I want to do a query that displays only the classes that have completed after January 1st of this year. I don't want to put the 01/01/2010 in the query itself because I want it to work again next year.

It's the current query:

< name cfquery = "classes" datasource = "" #DSN # "dbtype ="ODBC">"

SELECT classesTitles.ClassTitle, classesTitles.ClassDesc, classCatagories.catagoryName, classes.classStart, classes.classEnd, classes.classNotes, owners.fName, owners.lName, classTime.timeSlot, classes.classID, classes.classLimit

FROM classCatagories INNER JOIN (((classes INNER JOIN classesTitles ON classes.classTitle = classesTitles.classTitleID) INNER JOIN classTime WE classes.classTime = classTime.timeID) INNER JOIN owners WE classes.classInstructor = owners.ownerID) ON classCatagories.catagoryID = classesTitles.ClassType

WHERE the classes.classEnd < 01/01 / #DatePart ("yyyy", now())) #.

ORDER BY classes.classStart, classCatagories.catagoryName, classTime.timeSlot, classesTitles.ClassTitle

< / cfquery >

I don't get any results, but I should get a list of each class that has an end date before 1 January of this year - about 200 cases.

When I swap around the place where clause:

< name cfquery = "classes" datasource = "" #DSN # "dbtype ="ODBC">"

SELECT classesTitles.ClassTitle, classesTitles.ClassDesc, classCatagories.catagoryName, classes.classStart, classes.classEnd, classes.classNotes, owners.fName, owners.lName, classTime.timeSlot, classes.classID, classes.classLimit

FROM classCatagories INNER JOIN (((classes INNER JOIN classesTitles ON classes.classTitle = classesTitles.classTitleID) INNER JOIN classTime WE classes.classTime = classTime.timeID) INNER JOIN owners WE classes.classInstructor = owners.ownerID) ON classCatagories.catagoryID = classesTitles.ClassType

WHERE classes.classEnd > 01/01 / #DatePart ("yyyy", now())) #.

ORDER BY classes.classStart, classCatagories.catagoryName, classTime.timeSlot, classesTitles.ClassTitle

< / cfquery >

I get EACH class in the database, and I should get only about 50

The classes are long about 8 weeks, the dates of beginning and end are in the database in the form of date/time fields, so I need to show everything that ends in 2010, regardless of when it began.

I'm sure it's something pressing, but he's avoiding me.

Thank you

Michelle

Your field format date in access is irrelevent to the situation at hand.  Use objects appropriate date instead of trying to build an appropriate string.  On 1 January of the current year, the createdate() of coldfusion functions and year() now() are your friends.  Then, a message from Adam was not clear, use cfqueryparam with the resulting variable.

Tags: ColdFusion

Similar Questions

  • Im having a problem with your security software.  Your data bass must be bad, now I can't have spent my address question.  Ive answered all questions to the best of my knowledge and software has always said that my answers are incorrect

    Im having a problem with your security software.  Your data bass must be bad, now I can't have spent my address question.  Ive answered all questions to the best of my knowledge and software has always said that my answers are incorrect

    Hello Bernard,.

    You sign a document that has authentication based on knowledge, applied in it? If so, and if you can't go to questions, then you will need to contact the sender of the document because they can remove it and return you the document. You can respond directly to the e-mail received esign and happens directly from the sender.

    Kind regards

    -Usman

  • How to write a simple select query to get the data of the table as an XML.

    How to write a simple select query to get the data of the table as an XML. In the query, I'm just adding items below which i need be there in the XML document
    select '<test_tag>'||EMP_NAME||'</test_tag>','<date>'||sysdate||'</date>' 
    from temp_table where id_num BETWEEN 1 AND 10;
    I have need to add the root tag as well in the beginning and the end of < root > < / root > this xml file. Please advice if this is possible with the select query
    without using XMLGEN, XMLQUERY or any other packages built and function?

    I need to URL escapes with the UTF-8 code points that we have already achieved using the utl_http package. Please help how to do that without using the utl_http package.

    What is wrong with him?

    At present, the only way I can think of to avoid a call to UTL_HTTP. SET_BODY_CHARSET is to write your own little wrapper.
    In this way, you can specify the Boolean parameter or omit it if you choose to use named parameters:

    SQL> create or replace function my_url_escape (url in varchar2)
      2  return varchar2
      3  deterministic
      4  is
      5  begin
      6   return utl_url.escape(url, false, 'AL32UTF8');
      7  end;
      8  /
    
    Function created
    
    SQL> select my_url_escape('http://some.uri.com/param?lang=fr&text=contrôle') from dual;
    
    MY_URL_ESCAPE('HTTP://SOME.URI
    --------------------------------------------------------------------------------
    http://some.uri.com/param?lang=fr&text=contr%C3%B4le
     
    
  • I have problems with an action that I created.

    I have problems with an action that I created. Basically, I created an action that I apply to my images to give them all the same look, but when I add this action that it always enlarges the size of the image lets say 7 MB to 100 MB is possible to decrease this without ruining the action?

    Hi lukef,

    It depends on what kind of changes are included in this action.

    You can choose to save it to the web, if you want to save a low waist.

    Kind regards

    Claes

  • How do I monitor/find where is the State of my download?  I don't know how long it takes or if there is a problem with the download that I can't find anything.  Also, is it supposed to be an icon for my purchase of Photoshop and light in my apps folder

    How do I monitor/find where is the State of my download?  I don't know how long it takes or if there is a problem with the download that I can't find anything.  Also, is it supposed to be an icon for my purchase of Photoshop and light in my apps folder?  Where can I find that when it's done download?

    Could you please confirm the operating system you are using.

    You can see the status of the application of CC desktop download.

    The CC app desktop click the creative cloud icon located in the taskbar (Windows) or the Apple bar (Mac OS) menu, to open the creative cloud desktop application.

    Hope this will help you.

    Kind regards

    Hervé Khare

  • Problem with Apex 5.0 report with a query that runs in SQL Developer

    Hello

    I have a query that runs in SQL Developer without problem, but when I use it in a classic report, it displays following:

    error report:

    ORA-06502: PL/SQL: digital or value error: character of number conversion error


    The query is:

    select 
     T1.ID_ATTACHMENT, 
     T1.BLOB_CONTENT, 
     T2.ATTACH_CATEGORY, 
     T1.FILENAME, 
     T1.ATTACHMENT_DESCRIPTION 
    from ATTACHMENTS T1
     LEFT JOIN REF_ATTACH_CATEGORIES T2
      ON T1.ATTACHMENT_CATEGORY = T2.ID_ATTACH_CATEGORY
     WHERE T1.ID_ATTACHMENT IN
      (SELECT ID_ATTACHMENT FROM REL_ATTACHMENTS
       WHERE REL_PART_ID = 1
       AND REL_ID = 64146);
    


    And the output of SQL Developer is:

    2015-08-12_01-03-36.png

    I have following Setup for the BLOB_CONTENT column in the classic report:

    2015-08-12_01-06-25.png

    Any ideas what is causing this problem?

    Thanks in advance,

    Sergio


    I don't have notes with me, but I think that the content of the blob must be selected as:

    DBMS_LOB. GetLength (blob_content) as blob_content

    and check that you have included the primary key in the results.

  • Problem with difference of calculation between two dates from Monday to Saturday

    Hello

    I need help to change a function return number you dates, including Saturday hours (09:00 - 14:00), Monday to Friday (09:00 - 21:00);

    This is my code;

    CREATE OR REPLACE
    FUNCTION TEST2 (FECHA_INICIO DATE, DATE FECHA_FIN)

    RETURN NUMBER IS THE NUMBER OF HORASTOTALES;
    date the date;

    BEGIN
    If)
    SELECT date, to_char (date, 'DY', 'NLS_DATE_LANGUAGE = ENGLISH') dia.
    (SELECT to_date('FECHA_INICIO') + LEVEL - 1 date
    OF THE DOUBLE
    CONNECT BY LEVEL < = (FECHA_FIN - FECHA_INICIO))
    WHERE TO_CHAR (DATE, 'DY', 'NLS_DATE_LANGUAGE = ENGLISH') not IN ("SAT") THEN

    with t as)

    SELECT CASE LEVEL
    When 1 then greatest (fecha_inicio, trunc (fecha_inicio) + 9 / 24)
    to another level - 15 + trunc (fecha_inicio) / 24
    end fecha_inicio
    case connect_by_isleaf
    When 1 then least (fecha_fin, trunc (fecha_fin) + 21 / 24)
    Another trunc (fecha_inicio) + level - 3 / 24
    end fecha_fin
    of the double

    connect by level < = trunc (fecha_fin) - trunc (fecha_inicio) + 1).

    Select sum (more large (fecha_fin - fecha_inicio, 0)) * 24 horas
    in horastotales
    T

    WHEN TRUNC (FECHA_INICIO) - TRUNC (FECHA_INICIO, 'iw') < 5;

    RETURN HORASTOTALES;

    ) ELSE IF
    Return HORASTOTALES + 5;
    END;

    concerning

    Hello again,

    Using this function, which makes me ask properly, what hours, my problem is that I can not include Saturday hours;

    create or replace FUNCTION TEST (FECHA_INICIO DATE, FECHA_FIN DATE

    )

    RETURNS the NUMBER IS horastotales NUMBER;

    BEGIN

    with t as)

    SELECT CASE LEVEL

    When 1 then greatest (fecha_inicio, trunc (fecha_inicio) + 9 / 24)

    to another level - 15 + trunc (fecha_inicio) / 24

    end fecha_inicio

    case connect_by_isleaf

    When 1 then least (fecha_fin, trunc (fecha_fin) + 21 / 24)

    Another trunc (fecha_inicio) + level - 3 / 24

    end fecha_fin

    of the double

    connect by level<= trunc(fecha_fin)="" -="" trunc(fecha_inicio)="" +="">

    )

    Select sum (more large (fecha_fin - fecha_inicio, 0)) * 24 horas

    in horastotales

    T

    When TRUNC (FECHA_INICIO) - TRUNC (FECHA_INICIO, 'iw')<>

    RETURN horastotales;

    END;

    Example:

    SELECT TEST (TO_DATE (January 7, 2013 09:10 ',' DD-MM-YYYY HH24 '), TO_DATE (February 7, 2013 09:00 "," DD-MM-YYYY HH24 ')) horas

    OF THE DOUBLE

    output: 11, 8 hours

    Then try to add parts of your function, to get what I want, but it gives me compilation errors

  • Problem with "select * from table" for dynamic IN the list

    I have a 'for loop' based a query that does not work. The query is supposed to return the name of the table, the data type and the name of the column in the columns poses a number of name filters. The problem I have is when I run the query into a TOAD with:

    schema_list value SCOTT, MED and the clause of 'in' as ' to (select * from table (DATAPUMP_UTIL.in_list_varchar2 (:schema_list))))»

    The query returns the expected lines.

    When I have it in my code as shown below it returns no rows. I don't know what hurts me, but any help would be great! I'm on Oracle 11.1.0.6.0.
    PROCEDURE export_schema_ondemand (schema_list VARCHAR2, encrypt_file NUMBER default 0, mask_sensitive_data NUMBER default 0) IS  
        ...
        schema_list_t := my_package.in_list_varchar2(schema_list);
        ... 
        for c1 in
           (
            with ok_to_mask as (
            select 
                owner,
                table_name, 
                column_name
            from   
               all_tab_columns
            where
                owner in (select * from table(schema_list_t))
            minus
            (SELECT 
                c.owner,
                p.table_name,
                cc.column_name
            FROM 
                all_cons_columns cc, 
                all_constraints p,
                all_constraints c
            WHERE 
                c.owner in (select * from table(schema_list_t))
                c.constraint_type = 'R'
                AND p.owner = c.r_owner
                AND p.constraint_name = c.r_constraint_name
                AND cc.owner = c.owner
                AND cc.constraint_name = c.constraint_name
                AND cc.table_name = c.table_name
            UNION ALL
            SELECT 
                c.owner,
                cc.table_name,
                cc.column_name
            FROM 
                all_cons_columns cc,
                all_constraints p,
                all_constraints c
            WHERE
                p.owner in (select * from table(schema_list_t))
                AND p.constraint_type in ('P','U')
                AND c.r_owner = p.owner
                AND c.r_constraint_name = p.constraint_name
                AND c.constraint_type = 'R'
                AND cc.owner = c.owner
                AND cc.constraint_name = c.constraint_name
                AND cc.table_name = c.table_name))
            select 
                atc.table_name as mask_tab, 
                atc.column_name as mask_col, 
                atc.data_type as mask_type
            from   
                all_tab_columns atc,
                ok_to_mask otm
            where
                atc.owner = otm.owner
                and atc.table_name = otm.table_name
                and atc.column_name = otm.column_name
                and atc.owner in (select * from table(schema_list_t))
                and 
                (
                atc.column_name like '%LAST%NAME%'
                or atc.column_name like '%FIRST%NAME%'
                or atc.column_name like '%NAME_LAST%'
                or  atc.column_name like '%NAME_FIRST%'
                or  atc.column_name like '%ENAME%'
                or atc.column_name like '%SSN%'
                or atc.column_name like '%DOB%'
                or atc.column_name like '%BIRTH%'
                )
                and atc.column_name not like '%PHYSICIAN_%'
                and atc.column_name not like '%DR_%'
                and atc.column_name not like '%PROVIDER_%'
                and atc.column_name not like 'PRESCRIBER_%'     
           )
          loop
             ...
    
    FUNCTION in_list_varchar2 (p_in_list  IN  VARCHAR2)  RETURN VARCHAR2_TT is
    
        l_tab   VARCHAR2_TT := VARCHAR2_TT();
        l_text  VARCHAR2(32767) := p_in_list || ',';
        l_idx   NUMBER;
            
    BEGIN
        LOOP l_idx := INSTR(l_text, ',');
            EXIT WHEN NVL(l_idx, 0) = 0;
            l_tab.extend;
            l_tab(l_tab.last) := TRIM(SUBSTR(l_text, 1, l_idx - 1));
            l_text := SUBSTR(l_text, l_idx + 1);
        END LOOP;
    
        RETURN l_tab;
            
    END in_list_varchar2;
    Published by: BluShadow on June 29, 2011 16:11
    addition of {noformat}
    {noformat} tags.  PLEASE READ {message:id=9360002} TO LEARN TO DO THIS YOURSELF.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    

    Hello

    If you have a query that works well when you launch it directly, and that breaks down when you start with a procedure, this can be a problem of privileges.

    Points of view ALL_ * shows only the objects you have access, but using a procedure, privileges must be granted directly to the user and not with a role.

    You should check the SELECT privileges to your user through roles and give them directly to the user.

    Hope this will help.

    Sylvie

  • Problem with hierarchical query in function PL\SQL

    I have a simple table containing the ID of the parent

    -Create table

    create the table1 table:

    (

    ID NUMBER (12) not null,

    year number 4.

    month NUMBER (2),

    parent_id NUMBER (12)

    );

    -Create/recreate primary, unique and foreign key constraints

    change the table1 table:

    Add primary key constraint PK_TABLE1 (ID);

    change the table1 table:

    Add the foreign key constraint FK_TABLE1_PARENT (PARENT_ID)

    reference TABLE1 (ID);

    data:

    Insert into TABLE1 (id, year, month, parent_id)

    values (5, 2015, 12, 3);

    Insert into TABLE1 (id, year, month, parent_id)

    values (6 (2015), 12, 4);

    Insert into TABLE1 (id, year, month, parent_id)

    values (3 (2015), 11, 1);

    Insert into TABLE1 (id, year, month, parent_id)

    values (4 (2015), 11, 2);

    Insert into TABLE1 (id, year, month, parent_id)

    values (1, 2015, 10, null);

    Insert into TABLE1 (id, year, month, parent_id)

    values (2 (2015), 10, null);

    commit;

    and query

    with h as

    (select t.id, t.year, t.month, CONNECT_BY_ROOT t.id as parent_id from table1 t

    where t.year = 2015 and t.month = 12

    and CONNECT_BY_ROOT t.year = 2015 and CONNECT_BY_ROOT t.month = 10

    connect by prior t.id = t.parent_id)

    Select * from:

    Join table1 t left t.id = h.parent_id;

    It works, but when I put this request in the procedure pl\sql

    create or replace procedure is get_report (p_cur_out on sys_refcursor)

    Start

    Open the p_cur_out for

    with h as

    (select t.id, t.year, t.month, CONNECT_BY_ROOT t.id as parent_id from table1 t

    where t.year = 2015 and t.month = 12

    and CONNECT_BY_ROOT t.year = 2015 and CONNECT_BY_ROOT t.month = 10

    connect by prior t.id = t.parent_id)

    Select * from:

    Join table1 t left t.id = h.parent_id;             

    end get_report;

    /

    They do not compile. And in the fall, with the exception

    Errors of compilation for the PC of the PROCEDURE. GET_REPORT

    [Error: PL/SQL: ORA-00600: internal error code, arguments: [qctcte1], [0], [], [], [], [], [], [], [], [], []]

    Online: 6

    Text: with h as

    Error: PL/SQL: statement ignored

    Online: 6

    Text: with h as

    My version of oracle

    1Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production
    2PL/SQL Release 11.2.0.3.0 - Production
    3CORE Production 11.2.0.3.0
    4AMT for Linux: Version 11.2.0.3.0 - Production
    5NLSRTL Version 11.2.0.3.0 - Production

    What is the problem with my request? Or database? How to solve this problem?

    If you have access to MOS, you can search the reason of it. If you are using left join syntax instead of joining ANSI, owner Oracle procedure compiles and returns the result.

  • Confusion between the performance problem with a query

    I have a query that takes 3 minutes (according to another developer, but when I run it not even returned after 10 minutes) to return lines nil. But the interesting part is that instead of select * if I give a count (*) select, he returned in less than a second. And even the subquery returns no rows in less than one second. The query is as follows. I see no option to answer this confusing behavior. Please suggest me an option I can verify, what explains this scenario. I am interested to know the root cause of it. Please let me know if you need any details.
    select * from order_lines_flmnt_stg_in ol
     WHERE order_lines_flmnt_stg_in_id IN (
              SELECT DISTINCT order_lines_flmnt_stg_in_id
                         FROM order_lines_flmnt_stg_in ol,
                              order_header_flmnt_stg_in oh,
                              order_lines oln
                        WHERE ol.TYPE = 'Original'
                          AND ol.item_code NOT IN (
                                 SELECT oln.item_code
                                   FROM order_lines oln,
                                        order_lines_flmnt_stg_in ol,
                                        order_header_flmnt_stg_in oh
                                  WHERE oh.po_id = ol.po_id
                                    AND ol.item_code = oln.item_code)
                          AND (    ol.error_message IS NULL
                               AND oh.error_message IS NULL
                               AND oh.activate_flag = 1
                              ));
    SQL*Plus: Release 10.2.0.1.0 - Production on Wed Sep 30 16:41:53 2009
    
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    With the Partitioning, Real Application Clusters, OLAP and Data Mining options
    
    SQL> set lines 10000
    SQL> alter session set current_schema = epix;
    
    Session altered.
    
    SQL> set timing on
    SQL>           SELECT DISTINCT order_lines_flmnt_stg_in_id
      2                       FROM order_lines_flmnt_stg_in ol,
      3                            order_header_flmnt_stg_in oh,
      4                            order_lines oln
      5                      WHERE ol.TYPE = 'Original'
      6                        AND ol.item_code NOT IN (
      7                               SELECT oln.item_code
      8                                 FROM order_lines oln,
      9                                      order_lines_flmnt_stg_in ol,
     10                                      order_header_flmnt_stg_in oh
     11                                WHERE oh.po_id = ol.po_id
     12                                  AND ol.item_code = oln.item_code)
     13                        AND (    ol.error_message IS NULL
     14                             AND oh.error_message IS NULL
     15                             AND oh.activate_flag = 1
     16                            );
    
    no rows selected
    
    Elapsed: 00:00:00.11
    SQL> select count(*) from order_lines_flmnt_stg_in ol
      2   WHERE order_lines_flmnt_stg_in_id IN (
      3            SELECT DISTINCT order_lines_flmnt_stg_in_id
      4                       FROM order_lines_flmnt_stg_in ol,
      5                            order_header_flmnt_stg_in oh,
      6                            order_lines oln
      7                      WHERE ol.TYPE = 'Original'
      8                        AND ol.item_code NOT IN (
      9                               SELECT oln.item_code
     10                                 FROM order_lines oln,
     11                                      order_lines_flmnt_stg_in ol,
     12                                      order_header_flmnt_stg_in oh
     13                                WHERE oh.po_id = ol.po_id
     14                                  AND ol.item_code = oln.item_code)
     15                        AND (    ol.error_message IS NULL
     16                             AND oh.error_message IS NULL
     17                             AND oh.activate_flag = 1
     18                            ));
    
      COUNT(*)
    ----------
             0
    
    Elapsed: 00:00:00.18
    SQL> select count(*) from order_lines_flmnt_stg_in;
    
      COUNT(*)
    ----------
          3198
    
    Elapsed: 00:00:00.18
    SQL> 
    I don't know if it's relevant, but there are no locks on the tables involved.

    Published by: release 6' - 8 "September 30, 2009 16:49

    count (*) SELECT can use the index only without having to consult the table at all...
    Amiel

  • problem with the creation of my usb data card connect to a wifi hotspot network!

    Hello, I have g62005ax machine of hp pavilion and the use of windows 7 home basic service 1 since I bought it, I map of 3g data through which I use internet on my laptop, recently I had a phone android romaric mi3 and wanted to use the net to my data card 3 g on phone via my laptop by creating my cell phone as a wifi hotspot I tried connectify and virtual wifi router and mhotspot, enable me to create a hotspot wifi successfully, my phone can identify them and even be able to connect to the wifi network but I can not surf or download in the phone no matter what app or browser, phone says connected wifi network and phone receives the data as 0.15 0.58, 0.98 KB. My card data speeds work fine on pc on 1 MB/s with no problems, but what is wrong I am doing even after the connection is established?  As I said I tried different pc applications, given that my phone might have problem then I tried another star of the Galaxy samsund phone pro, it also connects to the wifi network but the same problem, IE. No surf, the so problem is not end of my phone, what am I doing wrong here?

    Hello IRON-MAN.

    Thanks for posting on the HP Forums!

    I understand the hotspot of data card USB that you create from your laptop is not working properly. I'll do what I can to help out you! Please follow this guide to make sure that you follow the correct procedures: How to create a WiFi HotSpot with your connection Internet/card USB Data...

    Please let me know your results. If you're still having problems, please provide some screen shots so I have something to look at. Thank you and have a great day!

    Mario

  • problem with the query insert masking character @.

    Hi the gems...

    I do through xml schema, run... means using a batch file, I'll call the xml files and the xml file contains the names of files containing all the DDLs and LMD...

    No problem with the DDL...

    now when I run the LMD, all are working well except a few insert scripts...

    Insert into TABLE_NAME (EVENT_ID, EVENT_DESC, EVENT_MESSAGE_TEMPLATE, EVENT_MESSAGE_SUBJECT) values (4, 'abcdefgh',)
    'Hi,
    Order details:
    @Order_ID #.
    @Instrument_ID #.
    This is an automated email. Please do not reply.',
    "executed");

    This kind of scripts insert failed with the error "[ora: sqlplus] SP2-0310: could not open the file" Order_ID #, .sql.

    This problem is due to the @ character before the data...

    problem doesn't happen when I run the script explicitly, xml perform only the origin of the problem

    So, I need to know if there is a way to hide the sign @...

    Please help... Thanks in advance

    user12780416 wrote:
    "[ora: sqlplus] SP2-0310: could not open the file" Order_ID #, .sql.

    In SQL * more the @ character means: run a script. That would explain the error message.
    The real problem is that your chain is written on several lines. A string like this might work:

    {code}
    Insert into TABLE_NAME (EVENT_ID, EVENT_DESC, EVENT_MESSAGE_TEMPLATE, EVENT_MESSAGE_SUBJECT) values (4, 'abcdefgh',)
    "Hi," | Chr (10)
    ||' Order of details :'|| Chr (10)
    |' @Order_ID #' | Chr (10)
    |' @Instrument_ID #' | Chr (10)
    ||' This is an automated email. Please do not respond. »
    "executed");
    {code}

    But it might not be a usable workaound.
    As you create the string insert sort, you might be able to replace all line breaks in the present with you own custom lines.

    Replace (yourEventMessage, Chr (10), "' |) Chr (10): "')

  • Problem with a query of xmlt

    Hello

    I need to query this xml file:

    < a > < action id = "1" > < alarm id = "1000" > 3 < / alarm > < alarm id = '1001' > 2 < / alarm > < alarm id = "31" > 2 < / alarm > < / action > < Code action = "3" > < alarm id = "16" > 5 < / alarm > < / has >

    I need to add the action/@id attribute to this query:
    select aa.hour,
           to_number(extract(value(xa),'alarm/@id')) alm_,
           to_number(extract(value(xa),'alarm/text()')) freq_
      from t_alarm_stats aa,
           xmltable('$XML/a/action/alarm' passing aa.x_alarm AS "XML") xa
     where aa.id_device = 3194
       and aa.hour > trunc(sysdate-1);
    I have now the recordset is fine enough:

    time, id_alarm and frequency of the alarm:
    28/03/2011 01:00 1000 3
    28/03/2011 01:00 1001 2
    28/03/2011 01:00 31 2
    28/03/2011 01:00 16 5

    I need to also add the corresponding action/@id, but I don't know how to navigate to a higher level of my xml so that the Recordset:

    time, action id, id_alarm and frequency of the alarm:
    28/03/2011 01:00 1 1000 3
    28/03/2011 01:00 1 1001 2
    28/03/2011 01:00 1 31 2
    28/03/2011 01:00 3 16 5

    Y at - it the possibility to do this with 1 query?

    Thanks in advance,
    Samuel

    Hello

    This should do it:

    select aa.hour
         , xa1.action_id
         , xa2.alarm_id
         , xa2.alarm_freq
    from t_alarm_stats aa,
         xmltable('$XML/a/action'
           passing aa.x_alarm AS "XML"
           columns action_id number  path '@id',
                   alarms    xmltype path 'alarm'
         ) xa1,
         xmltable('/alarm'
           passing xa1.alarms
           columns alarm_id   number path '@id',
                   alarm_freq number path '.'
         ) xa2
    where aa.id_device = 3194
    and aa.hour > trunc(sysdate-1)
    ;
    
  • What is the problem with this query in the source

    A blank page is region 2. Region1: enter rec_no (-rec_no is varchar2) region2:hide and show that displays one record based on rec_ no region1 entered.
    The problem is that I get the following error

    ORA-06550: line 1, column 7: PLS-00428: an INTO clause in this SELECT statement

    Here's my simple query in a process of pl/sql
    Start
    Select rec_no, rec_name from mytable where rec_no = upper(:P16_rec_no);
    end;

    Why? The same query works under the sql command.

    what I'm trying to accompolish here, it is because he has given huge if I want to display hide also multiples, regions and allow users to update each region as a result. Help, please. It kills me that I just can't understand what is causing the problem to the query. Thank you.

    Hello

    The list is set to the field EMPLOYEE_ID itself? What is the primary key of the table? In my example, DEPTNO is the primary key and I used the element generated by the wizard page to display the list. The parameters of the Source of the item itself or the column DEPTNO and database so that the process "process line...". "to identify the updated row.

    Andy

  • iTunes problem with selection checking / unchecking

    Hello, I have a recurring problem with iTunes which I hope someone can help me please! That the size of my library is greater than the capacity of my iPod, I uncheck a lot of my songs in order to keep under the limit of capacity during the synchronization. However, recently almost everytime I sign back into iTunes, it has been reset so that each song is checked and therefore it synchronizes I'm more capacity. It is very annoying to have to go back through my library and uncheck songs I don't want out there every time.  Anyone have any idea why it does this please?

    Hey there claya1984,

    Welcome to Apple Support communities.

    As I understand it, there is a problem with all the songs are checked when launch connecting to iTunes on your MacBook Pro. Try to take a glance at the article following the link and removing add-ons from third-party iTunes that you can use with iTunes.

    iTunes: solving problems with third party plug-ins iTunes - Apple Support

    If the problem persists, you can isolate and resolve almost any issue in Mac OS X by testing with a different user account, as shown here:

    Insulation in Mac OS X - Apple support questions

    So long.

Maybe you are looking for

  • Girl randomly tried to add me

    I use Skype for about 2 years now and have never received applications randomly, until 2 days ago. I logged call with my friends and found this friend request randomly, the message "Hello, add me!

  • Pavilion g42 361tx: 6 GB ram upgrade

    Hi, I have a notebook hp g42 361tx with 2 GB of ram now, I want to upgrade the RAM of 4 GB My question is 1 corsair DDR3 SO-DIMM 4 GB PC10666 - CMSO4GX3M1A1333C9 (1x4Go) this ram compatible with my laptop or not? 2 is ok 4 GB + 2 GB? 3 is SO - DIMM D

  • Need drivers of Windows XP Home for Satellite L series PSL43

    I installed Windows XP Home edition on the laptop and I would like to know where I can get WXP drivers form Satellite L series PSL43 or when they will be released?Thank you

  • Sattelite L50-B-1HH closes properly, hinge problem?

    I have my laptop for 2 months now, but I noticed recently that it does not close correctly.I was wondering how the hinges are attached. With my laptop, it seems that the left hinge is only attached on the left and right of the two sides. Is this corr

  • understand what to remove from the iPad

    I have a 32 GB iPad mini I continue to receive messages that the storage capacity is full and I have to delete something... I can't understand which fits all this space, I have a ton of HD movies out there or anything like that... perhaps I should si