Dates of the query

Hello

Need to write this query in an optimized way:

For example:
create table ff(a number, ff varchar2(10), rang_d date, ncc_i char(1));

select * from ff

A                      FF         RANG_D                    NCC_I 
---------------------- ---------- ------------------------- ----- 
1                      f1         10-DEC-08                 N     
2                      f1         11-DEC-08                 N     
2                      f1         12-DEC-08                 N     
3                      f2         09-DEC-08                 N     
3                      f2         10-DEC-08                 N     
5                      f1         09-DEC-08                 Y     
6                      f2         10-DEC-08                 Y     

6 rows selected


create table fff(a number, ff varchar2(10), fbd date, trd_c varchar2(10));

select * from fff

A                      FF         FBD                       TRD_C      
---------------------- ---------- ------------------------- ---------- 
1                      f1         10-DEC-08                 TRC        
in these conditions:

-Need to extract a row of the table "fff" current date is 9 December 08 ', if the folder does not exist need to check a table 'ff'... to get the next valid date or the minimum date for the funds 'f1' i.e. ' 10-DEC-08

-Si TRD_C = 'TRC' then select the records in table 'ff' where NCC_I = 'Y '.

Published by: user8650395 on November 21, 2009 07:03

persistent on mode
Let's see if I got it this time ;)

What:

HOEK%xe> select * from fff;

         A FF         FBD        TRD_C
---------- ---------- ---------- ----------
         1 f1         10-12-2008 TRC
         2 f1         11-12-2008 TRC
         3 f1         09-12-2008 TRE

HOEK%xe> select * from ff;

         A FF         RANG_D     N
---------- ---------- ---------- -
         1 f1         10-12-2008 N
         2 f1         11-12-2008 N
         3 f1         12-12-2008 N
         4 f1         09-12-2008 Y

HOEK%xe> select f.a
  2  ,      f.ff
  3  ,      f.fbd
  4  ,      f.trd_c
  5  ,      f2.ncc_i
  6  from   fff f
  7  ,    ( select ff
  8         ,      ncc_i
  9         ,      min(rang_d) rang_d
 10         from   ff
 11         where  rang_d >= to_date('09-12-2008','dd-mm-yyyy')-- your curr. business cycle date
 12         group  by ff
 13         ,         ncc_i
 14       ) f2
 15  where  f2.ff = f.ff
 16  and    f2.rang_d = f.fbd
 17  and case
 18        when f.trd_c  = 'TRC' and f2.ncc_i = 'N' then 1
 19        when f.trd_c != 'TRC' and f2.ncc_i = 'Y' then 1
 20      end = 1
 21  order by a;

         A FF         FBD        TRD_C      N
---------- ---------- ---------- ---------- -
         1 f1         10-12-2008 TRC        N
         3 f1         09-12-2008 TRE        Y

So too this isn't meet your requirement, so let us know what you yourself tried sofar (post some examples of query got stuck you on and explain why you're stuck) and that you use the CASE has been a help to you.

Tags: Database

Similar Questions

  • Support - dates in the query object browser!

    Hi all,

    I need help on something simple...

    How can I create a query for the dates in the Explorer objects, Oracle 10g XE?

    I tried: > 1 January 2010 > "January 1, 2010", > 1 January 2010 ", <>January 1, 2010 +... all sorts of diversions and nothing."

    I always have error report:
    ORA-01858: a non-digit character was found here where was waiting for a digital

    I want to just filter a few dates...

    Thank you

    With dates, its generally better to be precise with the date format and does depend not on 'default' well (for American English) January 1, 2011" must have worked, maybe not.

    Are you trying to filter for a specific date, or a beach, that is... where... = or perhaps where between and ...?

    When looking for a date, it may be useful to ignore the component "time" a date with the tronque() function field:

    select ... where trunc( ) = to_date( '01-01-2011','yyyy-mm-dd') ...
    

    Note the to_date with the format mask, which will prevent trouble with assumptions about default date formats (which can also change with the locale... i.e. UK-English customer default date format is "yyyy-mm-dd")

  • No recovery data to the query

    I have a form that has a few fields that get data from a value list. If I save the data in the form, the data are saved successfully. But during the questioning of the form, I don't see the returned data back. Can you get it someone please let me know, what could be the problem?

    Thank you
    IQ.

    the data is backed up properly

    How do you know this? Have you checked the data in the table with sqlplus (or another tool)?

    But during the questioning of the form, I don't see the returned data back

    And what happens if your just search returns no records because you ask with the wrong search criteria? As: I just added an employee in the Department and 10, and I question the Department 20-online no data found.

  • Count on a table with header and row data in the query

    Hello

    I have an obligation to prepare a report that shows the metrics on the provider. I need to find the total PO for this provider, which fit the Bill

    report must be mealgne of #ofpo, #invoice, total_inv_amt and total_po_amt, total_tax_amt with numbers also with the point in time. So my question is how do we achieve this I have this below query that gives all the data but do not know how to get the counties with that. All ideas

    SELECT hou.name,
    POV. $VENDOR_NAME,
    API.invoice_num,
    API.invoice_id,
    invoice_date,
    gl_date,
    API.invoice_currency_code,
    APID.line_type_lookup_code inv_line_type,
    APID. Description inv_description,
    APID.amount,
    APID.unit_price inv_price,
    amount_paid,
    apt. Name payment_terms,
    payment_status_flag,
    APC.check_number,
    APC.check_date,
    Poh.Segment1 po_num,
    Poh.CREATION_DATE po_creation_date,
    por. CREATION_DATE po_rel_creation_date,
    por.release_num,
    pol.line_num,
    MC. Segment1 category_name,
    (select item_num msi.segment1
    MSI inv.mtl_system_items_b
    where msi.inventory_item_id = pol.item_id
    and msi.organization_id = 1) item_num.
    pol.item_description po_item_description,
    Poll.need_by_date,
    pol.unit_price po_price,
    Poll.Quantity,
    Poll.quantity_cancelled,
    Poll.quantity_received,
    Poll.quantity_billed
    OF api ap.ap_invoices_all,.
    Hou hr_operating_units,.
    apt, ap_terms_tl
    AP.ap_invoice_distributions_all apid,
    pod po.po_distributions_all,
    Po.po_vendors pov,
    Po.po_headers_all poh,
    Po.po_lines_all pol,
    survey of po.po_line_locations_all,
    por po.po_releases_all,
    AP.ap_checks_all apc,
    AP.ap_invoice_payments_all IPA,
    -inv.mtl_system_items_b msi,
    Apps.mtl_categories_b mc
    WHERE apt.term_id = api.terms_id
    AND hou.organization_id = api.org_id
    AND BETWEEN TRUNC (poh.creation_date): p_start_date AND: p_end_date
    AND api.invoice_id = apid.invoice_id
    AND apid.po_distribution_id = pod.po_distribution_id (+)
    AND pov.vendor_id = api.vendor_id
    AND poh.po_header_id (+) = pod.po_header_id
    AND poll.line_location_id (+) = pod.line_location_id
    AND pol.po_line_id (+) = pod.po_line_id
    AND apip.check_id = apc.check_id (+)
    AND apip.invoice_id (+) = api.invoice_id
    AND mc.category_id (+) = pol.category_id
    AND por.po_release_id (+) = pod.po_release_id
    AND pov.vendor_id = 1

    Hello

    Her looks like a job for the COUNT function. That's all I can say with certainty based on the information you gave.

    If you want to see on each line of output, the number of rows with the same value of api.invoice_num has a value for poh.po_header_id, you can use

    COUNT (poh.po_header_id) OVER (PARTITION BY api.invoice_num)   AS po_cnt
    

    I could give much better directions if you could post a small example of data (CREATE TABLE and INSERT statements) and the results desired from these data. I realize it's hard with so many pictures. To see some of your courses and the desired output, could help.

  • Extract the subset of data in the query string

    Hi all

    I am using query strings in Eloqua for some time and found the implementation of them quite simple. I recently ran well across a scenario where it is not set up as a standard string.

    The URL ends up looking like this:

    http://Sub.domain.com/LP=123/?var=AB-business-_-AB-BusinessAB-_-TRK1AB23_hm_comp2-e_abcdefg_s

    The 'TRK1AB23' is the component I want to extract and place in a field.

    When I use the following code, I find myself everything of value, I want to pull all the way to the end of the string. What should I do to this code to retrieve only the characters that I need?

    function getQueryStringParamValue (strQStrParam) {}

    strURL var = document.location.href;

    var strQStrParamValue = "";

    If (strURL.indexOf('?')! = - 1) {}

    strQStrParamValue = strURL.substr (strURL.indexOf('?') + 1);

    If (strQStrParamValue.indexOf (strQStrParam)! = - 1) {}

    strQStrParamValue = strQStrParamValue.substr (strQStrParamValue.indexOf (strQStrParam));

    strQStrParamValue = strQStrParamValue.substr (strQStrParamValue.indexOf ('TRK') + 1);

    If (strQStrParamValue.indexOf('&')! = - 1) strQStrParamValue = strQStrParamValue.substr (0, strQStrParamValue.indexOf ('&'));

    Return strQStrParamValue;

    } else {}

    strQStrParamValue = defaultHiddenFieldNameValue;

    Return strQStrParamValue;

    }

    } else {}

    strQStrParamValue = defaultHiddenFieldNameValue;

    Return strQStrParamValue;

    }

    }

    Insert here the name of the form

    var form = 'generic ';

    function setCampaign() {}

    var elqForm = return [form];

    Repeat for each field to be completed

    elqForm.elements ['singleLineText'] .value = getQueryStringParamValue ('var');

    }

    Window.OnLoad = setCampaign;

    < /script >

    Egan,

    Your answer actually has helped me tremendously. I learned to look closer the code and found that it was an option of substring. I changed the substring to look at the first three characters of the code (which are always consistent) and then adjusted to shoot only the eight characters containing the code.

    It is not the prettiest or most appropriate code but it does exactly what I need to!

  • First date of the month

    Hi experts,

    Please let me know how to get registered for the 1st of the month by using the query, after passing a date in the query:

    My queries below give me 1 license of the year and the last date of the month... Kindly hep...
    SELECT TRUNC(TO_DATE('24-JUN-2011'),'YEAR') FROM DUAL
    
    SELECT LAST_DAY(ADD_MONTHS('24-JUN-2011',12 - 
    TO_NUMBER(TO_CHAR(SYSDATE,'mm')))) FROM DUAL
    Help appreciated,

    Thnx in advance
    TRUNC(TO_DATE('24-JUN-2011'),'MM')
    

    And he always will be always 1... ;)

  • Application of control data to the Web Service parameter takes the form of object

    I sent in a simple web service on an instance of peoplesoft.
    The request message is:
    <? XML version = "1.0" encoding = "windows-1252"? >
    < xsd: Schema container = "http://www.w3.org/2001/XMLSchema".
    xmlns = "http://www.example.org".
    targetNamespace = "http://www.example.org".
    elementFormDefault = "qualified" >
    < xsd: element name = "SSR_CLASS_SEARCH_REQ" >
    < xsd: annotation >
    < xsd: documentation >
    An element of the sample
    < / xsd: documentation >
    < / xsd: annotation >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: element name = "INSTITUTION" type = "xsd: String" nillable = "true" / >
    < xsd: element name = "TERM" type = "xsd: String" nillable = "true" / >
    < xsd: element name = "CAREER" type = "xsd: String" nillable = "true" / >
    < xsd: element name = "TOPIC" type = "xsd: String" nillable = "true" / >
    < xsd: element name = "CLASS_NBR" type = "xsd" nillable = "true" / > "
    < / xsd: SEQUENCE >
    < / xsd: complexType >
    < / xsd: element >
    < / xsd: Schema >

    While the response message has a depth of three levels:

    In jdev 11g (Studio Edition Version 11.1.1.1.0, Build JDEVADF_11.1.1.1.0_GENERIC_090615.0017.5407) is available for download on OTN, I perform the following steps.

    Create a Web Service data control using the WSDL, generated from the end TFTP url.
    The data control is created successfully. The problem is:
    -In the mode of operation of the service (in the data control), the query parameter appears as an object.
    -L' entry under the tree of service operation parameter ' parameter '.

    The control of data looks like:

    -< datacontrolname >
    -_parameters < serviceOperationName >
    -parameter
    -CAREER
    -CLASS_NBR
    -INSTITUTION
    -TOPIC
    -TERM
    -< serviceOperationName > (Object)
    -Settings
    -parameter
    -Return
    -return type >

    The return type is fine, with collections in the depth of the tree hierarchy.

    How to create a form of parameter for this data control.

    Find out how it's done in this tutorial:
    http://download.Oracle.com/otndocs/technology/tech/fmw4apps/agile/PDF/adf11g-agile.PDF

  • How to use a parameter query to select and display the data in the table of the façade

    Hiiiiii

    I am using Access 2007 database
    I want to select the specific data in the database using control of the chain as 'select product, size, weight of ProductInfo where barcode (chain control) =?'  and also display the same table of façade.

    I use the connected database toolkit.
    I saw the example of the parameterized insert, but it did not help to use parameterized select query, as well as to display data of parameterized select query.

    I looked for example on parameterized select query, but I don't have any.
    So pls guide me how to do this. I would like to know the other method (if any) that the use of parameter query to perform the same thing.
    If possble pls share a vi reference.
    Thank you!!!

    HII szewczak
    Thanks for the reply
    but I did not getsolution in one of your shared links
    My problem is solved. There is no need to use the parameter query to select control values
    In my case I want to display data from database where bar code is even entered by the user
    I use the data function DB TOOL CHOOSE and create the condition of chain based on concatenation of strings

  • How the lack of dates online results of the query and convert the output

    Hi Experts,

    My inline query returns the data in this format

    2-jan-2016    10
    4-jan-2016    33
    5-jan-2016    20
    7-jan-2016    70
    8-jan-2016    77
    

    I want to display the output as

    1-jan-2016 2-jan-2016 3-jan-2016 4-jan-2016 5-jan-2016 6-jan-2016 7-jan-2016 8-jan-2016 9-jan-2016 10-jan-2016 
    0    10    0   33  20 0  70 77 0 0
    

    Can you please help me with query how over the missing dates, is it tier, collar or pivot?

    Thanks in advance.

    Kind regards

    IVW

    Hello

    Is that what you are looking for?

    WITH
    SampleSet
    AS (SELECT TO_DATE (' 2 January 2016', 'DD-mon-yyyy') dt, val 10 FROM DUAL)
    UNION ALL
    SELECT TO_DATE (' 4 January 2016', 'DD-mon-yyyy'), 33 FROM DUAL
    UNION ALL
    SELECT TO_DATE (' 5 January 2016', 'DD-mon-yyyy'), 20 FROM DUAL
    UNION ALL
    SELECT TO_DATE (' 7 January 2016', 'DD-mon-yyyy'), 70 FROM DUAL
    UNION ALL
    SELECT TO_DATE (' 8 January 2016', 'DD-mon-yyyy'), 77 FROM DUAL
    )
    sample_rn as
    (
    Select
    DT
    val
    , dt - min (dt) (order 1) + 1 rn
    2 line_no
    Of
    SampleSet
    order by
    DT
    )
    mindate as
    (select min (dt) dt sampleset)
    dates in the FORM
    (
    SELECT
    DT + level 1 - dt
    null val
    level rn
    1 line_no
    Of
    MinDate
    CONNECT BY ROWNUM<= 10 ="" --="" number="" of="">
    )
    a, as
    (
    Select
    to_char Col (DT)
    rn
    line_no
    Of
    dates d
    Union
    Select
    to_char Col (Val)
    rn
    line_no
    Of
    sample_rn
    where
    RN<= 10             ="" --="" number="" of="">
    )
    Select
    *
    Of
    a pivot (pass the max (col) of rn (1,2,3,4,5,6,7,8,9,10))--liste of columns 1 to))

    What makes a list with 2 rows. Line 1 has dates starting with the first data of sampleset. and line 2 has the values. The number of columns, you can determine yourself.

    Kind regards

    Peter

  • Inserting data by using the query

    Hello

    In a book, I read the Sub statement:

    Inserting data by using the query (DML)

    If the user wants to transfer data from a table to another table in the insert statement are used independently of data that can be processed or not processed form.

    Can someone clarify what is the significance of this (processed or unprocessed form).


    Thank you.

    Why don't you ask the author of the book.

    How can we know what the author means when you take a quote out of context and don't provide any reference so that we can see exactly what is shown to you.

    I can only imagine that they are referring to data that are queried directly, "like what", another table, or who was interrogated and manipulated before be inserted.

  • Build the query to select date with status

    Hi guys,.

    Grateful if you can advise me on how to build the query on below scenario:

    Table A

    Date

    11.44.39.000000000 12-OCT-14 AM ASIA/SINGAPORE

    11.44.35.000000000 16-SEP-14 AM ASIA/SINGAPORE

    11.44.42.000000000 22-SEP-14 AM ASIA/SINGAPORE

    The result of the query:

    Date                                                                                            Status

    11.44.39.000000000 12-OCT-14 AM ASIA / SINGAPORE inactive

    11.44.35.000000000 16-SEP-14 active AM ASIA/SINGAPORE

    11.44.42.000000000 22-SEP-14 AM ASIA/SINGAPORE inactive

    Basically, the logic, I wanted is

    Active principles: today date or max (date) < sysdate

    Otherwise will be inactive

    And there is 1 active date in time.

    Thanks in advance

    Hello

    2753165 wrote:

    Hi guys,.

    Grateful if you can advise me on how to build the query on below scenario:

    Table A

    Date

    11.44.39.000000000 12-OCT-14 AM ASIA/SINGAPORE

    11.44.35.000000000 16-SEP-14 AM ASIA/SINGAPORE

    11.44.42.000000000 22-SEP-14 AM ASIA/SINGAPORE

    The result of the query:

    Date                                                                                            Status

    11.44.39.000000000 12-OCT-14 AM ASIA / SINGAPORE inactive

    11.44.35.000000000 16-SEP-14 active AM ASIA/SINGAPORE

    11.44.42.000000000 22-SEP-14 AM ASIA/SINGAPORE inactive

    Basically, the logic, I wanted is

    Active principles: today date or max (date)<>

    Otherwise will be inactive

    And there is 1 active date in time.

    Thanks in advance

    Sorry, we don't know what you want.

    Are you saying that 1 row (maximum) can be assigned status = 'Active' and if 2 or more lines are eligible, the last of them will be called 'Active'?

    If so:

    CASE

    WHEN tmstmp<=>

    OR ROW_NUMBER () OVER (PARTITION BY CASE

    WHEN tmstmp<=>

    THEN "could be."

    ANOTHER 'No Way'

    END

    ORDER BY tmstmp DESC

    )  = 1

    THEN "active."

    ELSE 'inactive '.

    END

    If you would care to post CREATE TABLE and instructions INSERT for some samples, so I could test it.

    DATE is not a very good name for a column, especially if the column is a TIMESTAMP, not a DATE.  I called the TMSTMP instead of the DATE column.

  • I want to loop through the data from two different tables using for loop where the query should be replaced at runtime, please help me

    I have the data into two table with the structure of similar column, I want to loop through the data in these two tables

    based on some condition and runtime that I want to put the query in loop for example, the example is given, please help me

    create table ab (a number, b varchar2 (20));

    Insert into ab

    Select rownum, rownum. "" sample "

    of the double

    connect by level < = 10

    create table bc (a number, b varchar2 (20));

    Insert into BC.

    Select rownum + 1, rownum + 1 | "" sample "

    of the double

    connect by level < = 10

    declare

    l_statement varchar2 (2000);

    Boolean bool;

    Start

    bool: = true;

    If it is true, then

    l_statement: =' select * ab ';

    on the other

    l_statement: =' select * from bc';

    end if

    I'm in execute immediate l_statement - something like that, but I don't know

    loop

    dbms_output.put_line (i.a);

    end loop;

    end;

    Something like that, but this isn't a peace of the code work.

    Try this and adapt according to your needs:

    declare

    l_statement varchar2 (2000);

    c SYS_REFCURSOR;

    l_a number;

    l_b varchar2 (20);

    Boolean bool;

    Start

    bool: = true;

    If it is true, then

    l_statement: = "select a, b, AB;

    on the other

    l_statement: = "select a, b from bc;

    end if;

    --

    Open c for l_statement;

    --

    loop

    extract the c in l_a, l_b;

    When the output c % notfound;

    dbms_output.put_line (l_a |') -' || l_b);

    end loop;

    close c;

    end;

    /

  • AOP "Query was empty" [from: cannot insert data with the PDO function]

    Now try to DELETE a record.  I select a list and go to the routine to delete.  The record appears, but when I delete, I get an error saying

    Fatal error : Eception exception 'Exception PDOException' with message ' SQLSTATE [42000]: syntax error or access violation: 1065-query was empty ' in /home1/sainttim/public_html/DeleteRec.php:53 stack trace: home1/sainttim/public_html/DeleteRec.php(53) #0: PDOStatement-> execute (Array) #1 {main} thrown in /home1/sainttim/public_html/DeleteRec.php online 53

    I do not understand why the query is empty because the data are displayed on the screen, but assume that I see on the screen is not what is in the table ($_POST ['delete']).  I'm stuck!

    My code:

    $OK = false;

    $deleted = false;

    If (isset($_GET['varpage'])) {}

    $varpageSend = $_GET ['varpage'];

    $NextPage = ' DisplayText.php? varpage = ". $varpageSend;"»

    }

    If ((isset($_GET['recid'])) & & ($_GET ['recid']! = "")) {}

    $delrec = $_GET ['recid'];

    }

    on the other

    {

    $error = "record does not exist!"

    }

    If (isset($_GET['recid']) & &! $_POST)

    {

    prepare the SQL query to view folder

    $sql = "SELECT home_key, enriched, h_date, h_seq, h_col, p_heading, p_text, h_hide FROM Homepage_text WHERE home_key =?";

    RS1 $= $sainttim-> prepare ($sql);

    $OK = $rs1-> execute (array($_GET['recid']));

    $row = $rs1-> fetch();

    $home_key = $row ["home_key"];

    $textpage is "enriched" $row;.

    $h_date = $row ["h_date"];

    $h_seq = $row ["h_seq"];

    $h_col = $row ["h_col"];

    $p_heading = $row ["p_heading"];

    $p_text = $row ["p_text"];

    $h_hide = $row ["h_hide"];

    If ($h_hide == 0) {}

    $h_hide = 'n';

    }

    else {}

    $h_hide = 'y ';

    }

    If (isset ($rs1) & &! $OK) {}

    $error = $rs1-> errorInfo();

    If (isset($error[2])) {}

    store the error message if the request fails

    $error = $error [2];

    }

    }

    }


    If (isset($_POST['delete']))

    {

    NEW code

    $deletesql = "DELETE FROM Homepage_text WHERE home_key =?';"

    $stmt = $sainttim-> prepare ($deleteSQL);

    $deleted = $stmt-> execute ($row);

    If (! $deleted)

    {

    $error = "There is a problem to remove the record.";

    }

    else {}

    Header ('Location: '. $deleteGoTo);

    "exit";

    }

    }


    Form:

    Entry < h1 > delete of <? PHP echo $varpageSend;? > Page < / h1 >

    <? PHP if (isset ($error)) {}

    echo "class < p > 'errormsg' = > error:". " $error. "< /p > ';

    } ? >

    < are method = "POST" name = "form1" id = "form1" >

    < table class = "DisplayTable" align = "center" >

    < b >

    < td align = "right" > Page: < table >

    < td > <? PHP echo $textpage? > < table >

    < /tr >

    < tr valign = 'of basic">

    < td align = "right" > Date: < table >

    < td > <? PHP echo $h_date? > < table >

    < /tr >

    < b >

    < td align = "right" > sequence: < table >

    < td > <? PHP echo $h_seq? > < table >

    < /tr >

    < b >

    < td align = "right" > Col: < table >

    < td > <? PHP echo $h_col? > < table >

    < /tr >

    < b >

    < td align = "right" > title: < table >

    < td > <? PHP echo $p_heading? > < table >

    < /tr >

    < b >

    < td align = "right" > text content: < table >

    < td > <? PHP echo $p_text? > < table >

    < /tr >

    < b >

    < td align = "right" > content hide? : < table >

    < td > <? PHP echo $h_hide? > < table >

    < /tr >

    < b >

    < display td = "hidden" > < input value = <? PHP echo $delrec? > name = 'deletekey"id ="deletekey"/ > < table >

    < display td = "hidden" > < table >

    < /tr >

    < b >

    < td align = "right" > < a href = "DisplayText.php? varpage = <?" PHP echo $Thistextpage;? > "> < span class ="Red"> CANCEL </span > < /a > < table >.

    < td align = "left" > < input name = "remove" id = 'delete' type = 'submit' class = 'GreenButton"value ="Confirm deletion"/ > < table >

    < /tr >

    < /table >

    < / make >

    The reason why the query is empty lies in the lack of uniformity in the spelling of your variable to the prepared statement:

    $deletesql = "DELETE FROM Homepage_text WHERE home_key =?";

    $stmt = $sainttim-> prepare ($deleteSQL);

    The query is stored in the form of $deletesql, but the value you pass to the prepare() method is $deleteSQL. PHP variables are case-sensitive. Use is $deletesql in both cases, or store the query as $deleteSQL.

  • Creating a collection of a query at the Apex 4.2 is not complete the data in the collection.

    I have a process that creates a collection with data from several tables. The query returns multiple lines in the tab "Sql commands". The same query is used to create the collection 'Head before' and when I create a region with the source of the region as

    Select * from apex_collections where collection_name = "load_dashboard";

    At the time of the rendering of the page, shows me "no data found".

    What could be the problem? Are there requirements before creating the collection?

    Thanks in advance,

    Sriram

    Name of the collection must be uppercase. That's your problem.

    Denes Kubicek

    -------------------------------------------------------------------

    http://deneskubicek.blogspot.com/

    http://www.Apress.com/9781430235125

    https://Apex.Oracle.com/pls/Apex/f?p=31517:1

    http://www.Amazon.de/Oracle-Apex-XE-Praxis/DP/3826655494

    -------------------------------------------------------------------

  • Select the query to select the month range based on the current date.

    It's the database 10 g oracel.

    I want to choose two months of data in the table. But these two months should be based on the current date.

    For example.

    If I run the select query on July 7, 2013, then the query must ignore the current month being July 2013 and last month, which is June 2013 and it shoud select only may 2013 and April 2013.

    Can someone help me how to make this request.

    SELECT *.

    FROM my_table

    WHERE my_date > = TRUNC (ADD_MONTHS (sysdate,-3), 'MY') - first day of the month 3 months ago

    AND my_date< trunc(add_months(sysdate,-1),'mon')="" --="" first="" day="" of="" last="">

Maybe you are looking for

  • I lost a few images of photos

    Hi all I imported a few new photos from my camera SD in Photos app. After that turn my pc off overnight I went to Photos to check my pimples in detail and modify a little, I found that none of my last import images available anywhere in the applicati

  • Error 9/4MEM/40000000: 0x7f6f9f90

    I get this error message after the Test run of equipment due to a problem with loading the images/graphics.  27 "iMAC, end 2012, 16 GB of RAM installed Apple.  Replaced RAM with two Modules of 8 GB of OWC/Mac sales and still got the error with the ex

  • can the 2133 20 "2.4 ghz mid 2007 imac use 6 GB of ram

    can the 2133 20 "2.4 ghz mid 2007 imac use 6 GB of ram

  • system using 50% cpu

    Everytime I open an application that uses my audio device system.exe changes from 2% to 50% in a few seconds. Then I checked the thread and it was a thread using all the CPU. This thread is called stdriver64.sys. any help? Rafael Nadal

  • Accounts payable: out remittances through two methods

    Hi allI have a requirement where I need a discount payment through two output formats. The reason is that the customer wants to have a paper copy classified far where a supplier has requested a transfer of funds by e-mail.Someone has met this require