query SQL (County)

Hello

DB version: 11 GR 2

I need ask help for count (*) for each table for yesterday

customers

=====

number of client_id

customer varchar2

products

======

number of client_id

prod_id number

PROD_NAME varchar2

created_date date

orders

========

prod_id number

number of order_id

created_date date

I want to find how many products placed in the last 24 hours and the number of orders placed in the last 24 hours so that the date must be used in each table

-the below gives the number of products developed based on products created date

Select client_id, client_name, count (prod_id)

customers c

Join products p on p.client_id = c.client_id

where

trunc (p. ) CREATED_DATE ) = trunc (sysdate) -1

Client_id group, client_name;

-This query gives the number of orders based on the date of the orders created

Select client_id, client_name, count (order_id)

customers c

Join products p on p.client_id = c.client_id

o orders Join on o.prod_id = p.prod_id

where

trunc(o. CREATED_DATE ) =trunc (sysdate) -1

Client_id group, client_name;

I need help /idea where I would like to join the two, but get numbers on each date of creation instead of one table create date

Thank you


You can try this. Without knowing your data and the output, I can suggest this.

SELECT T1. CLIENT_ID,

T1. CLIENT_NAME,

T1. CNT_PROD,

T2. CNT_ORD

DE)

Select client_id, client_name, count (prod_id) CNT_PROD

customers c

Join products p on p.client_id = c.client_id

where

trunc (p.created_date) = trunc (sysdate)-1

Client_id, client_name) T1.

(select client_id, client_name, count (order_id) CNT_ORD

customers c

Join products p on p.client_id = c.client_id

o orders Join on o.prod_id = p.prod_id

WHEN trunc (o.created_date) = trunc (sysdate)-1

Client_id, client_name) T2

WHERE T1. CLIENT_ID = T2. CLIENT_ID

AND T1. CLIENT_NAME = T2. CLIENT_NAME;

Tags: Database

Similar Questions

  • Please, help me to query SQL Construct.


    Hi Experts,

    Could you please help me to query SQL Construct.  Please find the details

    HOSTNAME HOSTTYPE DEM R1 R2
    RS123 P ABC 24.5 265,5

    RS123 P CYC 24.5 265,5

    RS123 P ADDS 24.5 265,5

    RS123 P ADE 24.5 265,5

    RS123 P SRC 24.5 265,5

    EXPECTED RESULTS

    HOSTNAME      HOSTTYPE                              MNE                                                                      R1          R2
    RS123 P ABC, CYC, ADD, ADE, CBC 24.5 265,5

    Concerning

    See you soon

    with t as)

    Select "RS123' hostname 'P' hosttype, 'ABC' dem, 24.5 r1, r2 265,5 Union double all the

    Select 'RS123', 'P', "CYC", 24.5, 265,5 double Union all

    Select 'RS123', 'P', 'ADD', 24.5, 265,5 double Union all

    Select "RS123', 'P', 'ADE', 24.5, 265,5 double Union all

    Select 'RS123', 'P', 'SRC', 24.5, 265,5 double

    )

    Select the host name,

    HostType,

    RTrim (XMLAGG (XmlElement(e,MNE,','). (Extract ('//Text ()')), ',') DEM,.

    R1,

    R2

    t

    Group hostname,

    HostType,

    R1,

    R2

    /

    HOSTN H DEM R1 R2
    ----- - -------------------- ---------- ----------
    RS123 P ABC, CBC, ADE, ADD, CYC 24.5 265,5

    SQL >

    SY.

  • Create a simple query (SQL)

    Hi experts,

    I have a table with data as follows:

    Database version: 10.2.0.4
    Table name: TRANSACTION_HIST_TAB
    TRANS_ID      LOT_NO    PART_NO    QTY    TRANSACTION         LOCATION_NO    ROWVERSION
    ---------     -------   --------   ----   -----------------   ------------   ----------------------
    T00000X1      L001     ABC         10     CHANGE LOCATION     WRH_1          01/01/13 08:00:00 AM
    T00000X2      L001     ABC        10     CHANGE LOCATION     WRH_2          01/02/13 10:00:00 AM
    T00000X3      L002     XYZ        20     CHANGE LOCATION     WRH_3          01/03/13 11:00:00 AM
    and I want to create a single query (SQL) which can get data grouped by LOT_NO and only the first transaction by LOT_NO

    Expected results:
    TRANS_ID      LOT_NO    PART_NO    QTY    TRANSACTION         LOCATION_NO    ROWVERSION
    ---------     -------   --------   ----   -----------------   ------------   ----------------------
    T00000X1      L001     ABC         10     CHANGE LOCATION     WRH_1          01/01/13 08:00:00 AM
    T00000X3      L002     XYZ        20     CHANGE LOCATION     WRH_3          01/03/13 11:00:00 AM
    Someone has an idea?

    Kind regards

    Rob

    Hi, Rob.

    Here's one way:

    WITH     got_r_num     AS
    (
         SELECT     t.*     -- or list columns you want
         ,     ROW_NUMBER () OVER ( PARTITION BY  lot_no
                                   ORDER BY          rowversion
                           )  AS r_num
         FROM    transaction_hist_tab  t
    )
    SELECT       *     -- or list all columns except r_num
    FROM       got_r_num
    WHERE       r_num     = 1
    ;
    

    Depending on your data and your needs, match Sub like Manik suggested, might work. I think that you want to GROUP BY lot_no only, no transid.

    I hope that answers your question.
    If not, post a small example data (CREATE TABLE and only relevant columns, INSERT statements), and the results you want from this data.
    Explain, using specific examples, how you get these results from these data.
    Always say what version of Oracle you are using (for example, 11.2.0.2.0).
    See the FAQ forum {message identifier: = 9360002}

  • query sql delicate... date of the created object.

    friends...
    I am trying to solve this query sql delicate for some time, but unable to progress when it comes to this day...

    Q.
    Query dba_objects and list all tables created yesterday ' sysdate - 1' and in another column of the list all the tables created ' sysdate - 7'.

    -query below gives me to yesterday, but don't know how to have 'Last_week' column filled... maybe I join?
    select owner, object_name, to_char(created, 'MM-DD-YYYY HH24:MI:SS') "Yesterday", to_char(created, 'MM-DD-YYYY HH24:MI:SS') "Last_Week"
    from dba_objects
    where object_type = 'TABLE'
    and created >=trunc(sysdate - 1)
    and created < trunc(sysdate)
    appreciate your time and effort in looking at this...

    Thank you

    Published by: khallas301 on March 19, 2013 09:27
    typo edited... Thanks to frank

    khallas301 wrote:
    Query dba_objects and list all tables created yesterday ' sysdate - 1' and in another column of the list all the tables created ' sysdate - 7'.

    Well, sysdate - 7 ways months ago, not last week. If this is what you want, then:

    select  owner,
            object_name,
            case
              when trunc(created) = trunc(sysdate - 1) then to_char(created,'MM-DD-YYYY HH24:MI:SS')
            end "Yesterday",
            case
              when trunc(created) = trunc(sysdate - 7) then to_char(created, 'MM-DD-YYYY HH24:MI:SS')
            end "Week Ago"
      from  dba_objects
      where object_type = 'TABLE'
        and (
                trunc(created) = trunc(sysdate - 1)
             or
                trunc(created) = trunc(sysdate - 7)
            )
    /
    

    SY.

  • Query SQL Report with condition (multiple settings) at the point of the apex?

    Hi all

    I have a small problem and cannot find a solution.

    I need to create reports based on a query, SQL or I.R. Nothing hard here.
    I need to add the WHERE clause dynamically with javascript to an element of the Apex.
    Even once is not very difficult. I set the agenda of the Summit, put my query like this "SELECT * FROM MYTAB WHERE COL1 =: P1_SEARCH" then I call the page by setting the P1_SEARCH value. For example, COL1 is rowid. It works very well.

    But here's my problem. Consider that P1_SEARCH contains several ROWID, and I don't know the number of these values,
    (no I don't create a large number of items and create a query with so much GOLD!), I would sotheming like "SELECT * FROM MYTAB WHERE ROWID IN (: P1_SEARCH) with something like: ROWID1, ROWID2 in P1_SEARCH."

    I also tried: 'ROWID1, ROWID2' and 'ROWID1', 'ROWID2 '.
    but I can't get anything else than the mistake of filter. It works with a value, but as soon as there are two values or more, it seems that the Apex is unable to read the string.


    How can I do it please?

    Thanks for your help.

    Max

    mnoscars wrote:

    But here's my problem. Consider that P1_SEARCH contains several ROWID, and I don't know the number of these values,
    (no I don't create a large number of items and create a query with so much GOLD!), I would sotheming like "SELECT * FROM MYTAB WHERE ROWID IN (: P1_SEARCH) with something like: ROWID1, ROWID2 in P1_SEARCH."

    I also tried: 'ROWID1, ROWID2' and 'ROWID1', 'ROWID2 '.
    but I can't get anything else than the mistake of filter. It works with a value, but as soon as there are two values or more, it seems that the Apex is unable to read the string.

    For a standard report, see + {message identifier: = 9609120} +.

    For an IR - and improve safety by avoiding the risk of SQL Injection, use a collection containing the values in a column instead of a CSV list:
    {code}
    SELECT * FROM MYTAB WHERE ROWID IN (SELECT c001 FROM apex_collections WHERE collection_name = "P1_SEARCH")
    {code}
    (Please close duplicate threads spawned by your original question.)

  • Validation of a region defined as a QUERY SQL type (updated report)

    Hello

    I am trying to perform validation on a region defined as type of QUERY SQL (editable report). The report has two columns.
    One of the columns is a Select list and I want to make sure that the user can select the same value twice
    in the report. For example, if the selection list has 5 values A, B, C, D, E, I don't want a user to be able to select
    B twice in the report. Will it use javascript to perform validation? If Yes, could someone provide some guidance on
    where to embed the javascript? Are there other alternatives than javascript? I create an element that came from a sql query
    counts the number of lines where the value of the column is the same. I then used the item in my validation logic. The problem with this logic
    is that a user can enter the same value and it is not until the 3rd attempt to select the same value that the validation works using the number of lines which is why I think that I need to somehow capture the value of the selection list when a user selects and then compare it to what is already in the database column Select.

    I hope that my question and explanations are clear.

    Thanks in advance for your help,

    Michael

    Hello

    This can be managed using javascript or a validation of the page. Here is an example of use of javascript: [http://htmldb.oracle.com/pls/otn/f?p=267:7]

    To do this, I have:

    1 - a model of button which does not send the page but just runs javascript. The model will depend on your theme, but should include:

    <a href="#BUTTON_ATTRIBUTES#">#LABEL#</a>
    

    If #BUTTON_ATTRIBUTES # appears on the template, delete it as we need it only once. You must create a new button model based on a copy of your existing across models, shared components. Normally, he would show href = "" #LINK # "-we do not want that this would become doSubmit('buttonname')." If your model does not use tags for buttons, you might need to create one from scratch.

    2 - I have updated the button on my page to use this template and then assign the setting button attributes:

    javascript:check();
    

    3. in the header of the HTML page, I added:

    <script type="text/javascript">
    function check()
    {
     var e = 0;
     var f = document.getElementsByName("f02");
     var k1;
     var k2;
     var v1;
     var v2;
     if (f)
     {
      for (k1 = 0; k1 < (f.length - 1); k1++)
      {
       v1 = f[k1].value;
       for (k2 = (k1 + 1); k2 < f.length; k2++)
       {
        v2 = f[k2].value;
        if (v1 == v2)
        {
         e = 1;
        }
       }
      }
     }
     if (e > 0)
     {
      alert("Duplicates found!");
     }
     else
     {
      doSubmit("SUBMIT");
     }
    }
    </script>
    

    In this example, SUBMIT is the name of the button and "f02" is the name attribute of the select list items that we want to check - change these needs by your page.

    Now, when the Submit button is clicked, instead of directly submit the page, the javascript function is called. This function loops through each selection list and gets its value. Then, he compared it to the remaining items. If there is a match, the e flag is set to 1. After all the items have been verified, if e is not 0, then a message appears. Otherwise, the page is sent.

    Andy

  • Need help with query SQL Inline views + Group

    Hello gurus,

    I would really appreciate your time and effort on this application. I have the following data set.

    Reference_No---Check_Number---Check_Date---description---Invoice_Number---Invoice_Type---Paid_Amount---Vendor_Number
    1234567 11223 - 05/07/2008 -paid for cleaning- 44345563-I-* 20.00 *---19
    1234567 11223 - 05/07/2008 - 44345563 -a--10,00---19 ofbad quality adjustment
    7654321 11223 - 05/07/2008 - setting the last billing cycle - 23543556 - A - 50.00 - 19
    4653456 11223 - 05/07/2008 - paid for cleaning - 35654765 - I - 30, 00-19

    Please ignore '-' added for clarity

    I'm writing a paid_amount based on Reference_No, Check_Number, Payment_Date, Invoice_Number, aggregate query Invoice_Type, Vendor_Number and display description with Invoice_type 'I' when there are multiple records with the same Reference_No, Check_Number, Payment_Date, Invoice_Type, Invoice_Number, Vendor_Number. When there are no more records I want to display the respective Description.

    The query should return the following data set

    Reference_No---Check_Number---Check_Date---description---Invoice_Number---Invoice_Type---Paid_Amount---Vendor_Number
    1234567 11223 - 05/07/2008 -paid for cleaning- 44345563-I-* 10.00 *---19
    7654321 11223 - 05/07/2008 - setting the last billing cycle - 23543556 - A - 50.00 - 19
    4653456 11223 - 05/07/2008 - paid for cleaning - 35654765 - I - 30, 00-19
    Here's my query. I'm a little lost.

    Select b., A.sequence_id, A.check_date, A.check_number, A.invoice_number, A.amount, A.vendor_number
    de)
    Select sequence_id, check_number, check_date, invoice_number, sum (paid_amount) sum, vendor_number
    of the INVOICE
    Sequence_id group check_date, check_number, invoice_number, vendor_number
    ) A, B OF INVOICE
    where A.sequence_id = B.sequence_id


    Thank you
    Nick

    It seems that this is a duplicate thread - correct me if I am wrong in this case->

    Need help with query SQL Inline views + Group

    Kind regards.

    LOULOU.

  • SQL Query Execute County tkprof

    Hi all

    I have the query that is slow.
    SELECT MAX(ID) FROM ID_TAB WHERE R_ID = :B1 
    
    call     count       cpu    elapsed       disk      query    current        rows
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    Parse        0      0.00       0.00          0          0          0           0
    Execute 649574    117.93     127.29          0          0          0           0
    Fetch   649574     20.40      20.85          0    1948722          0      649574
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    total   1299148    138.33     148.14          0    1948722          0      649574
    
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 65     (recursive depth: 2)
    
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      cursor: pin S wait on X                       133        0.03          2.13
      cursor: pin S                                1179        0.00          0.01
      
    I know that this may be a bug or something else. But I have another question, then this

    Why is he running count so much. I think that run County increase when you DML? If this is not the case, what are the other scenerios where it can increase run County.

    Nico wrote:
    Thanks for the reply. Another instance

    The index is here:

    recursive depth: 2
    

    * SQL executed directly by a user runs in the recursive depth: 0
    * SQL in a PL/SQL procedure called by SQL run directly by a user runs in the recursive depth: 1
    * SQL executed within a trigger that executes automatically in response to SQL run directly by a user runs in the recursive depth: 1
    * SQL executed directly by a user who calls a PL/SQL procedure that then causes a trigger is a way to get a recursive depth: 2
    * SQL executed directly by a user who calls a PL/SQL procedure that then calls a second PL/SQL procedure is another way to get a recursive depth: 2

    Possible cause: suppose you have a trigger that fires at each change of rank. A user session wishes to insert a large number of rows into a table, then it calls a PL/SQL procedure to handle the task. The PL/SQL procedure running insert statements, and after each insert statement is triggered, a trigger is activated for the sequential number next to a column in the table (or a separate record) by running "SELECT MAX (ID) OF ID_TAB WHERE R_ID =: B1" in the database.

    Charles Hooper
    Co-author of "Expert Oracle practices: Oracle Database Administration of the Oak Table.
    http://hoopercharles.WordPress.com/
    IT Manager/Oracle DBA
    K & M-making Machine, Inc.

  • Query SQL to split the lines based on the amount

    I have the data in the following format in the table.

    ORDER_ID PRODUCT_ID QUANTITY

    O1 A1   3

    I need to write the sql query to divide the data in following format:

    ORDER_ID PRODUCT_ID QUANTITY

    O1 A1   1

    O1 A1   1

    O1 A1   1

    Query must split the data based on the value in the quantity column.

    Thank you

    Developer

    Hello

    create table order_items (
      order_id varchar2(2),
      product_id varchar2(2),
      quantity number
    )
    ;
    insert into order_items values ('O1', 'A1', 3)
    ;
    -- Recursive Subquery Factoring
    with item(order_id, product_id, quantity) as (
      select
        order_id, product_id, quantity
      from order_items
      union all
      select
        order_id, product_id, quantity - 1
      from item
      where quantity > 1
    )
    select
      order_id, product_id, 1 quantity
    from item
    order by order_id
    ;
    drop table order_items purge
    ;
    
    Table ORDER_ITEMS created.
    
    1 row inserted.
    
    OR PR   QUANTITY
    -- -- ----------
    O1 A1          1
    O1 A1          1
    O1 A1          1
    
    Table ORDER_ITEMS dropped.
    
  • -You also get an invalid identifier error when executing this query sql for a data model, but not in TOAD/SQL Developer?

    Hello OTN.

    I don't understand why my sql query will pass by in the data model of the BI Publisher. I created a new data model, chose the data source and type of Standard SQL = SQL. I tried several databases and all the same error in BI Publisher, but the application works well in TOAD / SQL Developer. So, I think it might be something with my case so I'm tender hand to you to try and let me know if you get the same result as me.

    The query is:

    SELECT to_char (to_date ('15-' |)) TO_CHAR(:P_MONTH) | » -'|| (To_char(:P_YEAR), "YYYY-DD-MONTH") - 90, "YYYYMM") as yrmth FROM DUAL


    Values of the variable:

    : P_MONTH = APRIL

    : P_YEAR = 2015

    I tried multiple variations and not had much luck. Here are the other options I've tried:

    WITH DATES AS

    (

    Select TO_NUMBER (decode (: P_MONTH, 'JANUARY', '01',))

    'FEBRUARY', '02',.

    'MARCH', '03'.

    'APRIL', '04'

    'MAY', '05'.

    'JUNE', '06'.

    'JULY', '07',.

    'AUGUST', '08'.

    'SEPTEMBER', '09'.

    'OCTOBER', '10',.

    'NOVEMBER', '11'.

    "DECEMBER", "12."

    '01')) as mth_nbr

    of the double

    )

    SELECT to_char (to_date ('15-' |)) MTH_NBR | » -'|| (TO_CHAR(:P_YEAR), 'DD-MM-YYYY') - 90, "YYYYMM")

    OF DATES

    SELECT to_char (to_date ('15-' |: P_MONTH |)) » -'|| ((: P_YEAR, 'MONTH-DD-YYYY')-90, "YYYYMM") as yrmth FROM DUAL

    I'm running out of ideas and I don't know why it does not work. If anyone has any suggestions or ideas, please let me know. I always mark answers correct and useful in my thread and I appreciate all your help.

    Best regards

    -Konrad

    So I thought to it. It seems that there is a bug/lag between the guest screen that appears when you enter SQL in the data model and parameter values, to at model/value data.

    Here's how I solved my problem.

    I have created a new data model and first created all my settings required in the data model (including the default values without quotes, i.e. APRIL instead "Of APRIL") and then saved.

    Then I stuck my sql query in the data model and when I clicked ok, I entered my string values in the message box with single quotes (i.e. "in APRIL' instead of APRIL)

    After entering the values of string with single quotes in the dialog box, I was able to retrieve the columns in the data model and save.

    In the data tab, is no longer, I had to enter the values in single quotes, but entered values normally instead, and the code worked.

    It seems the box prompted to bind the values of the variables when the SQL text in a data model expects strings to be wrapped in single quotes, but no where else. It's a big headache for me, but I'm glad that I solved it, and I hope this can be of help to other institutions.

    See you soon.

  • When I filled a form field using a query SQL result is displayed but not registered in the table.

    I write in the topic, I have created a form and in some of their fields, I used a SQL query to get information from a table based on the user who has been logging.

    The information displayed well, but when I press "Send button" loses information and the field in the table is shown empty.


    Anyone know what is happening?

    I enclose below a picture of the problem

    Concerning

    Problema DB APEX.jpg

    Hi ANTHONY,.

    ANTHONY wrote:

    I give you the credentials of my database, I hope you could do it works and most importantly, showing me what the error care...

    Feel free to change what you want in the application

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

    BANCO_PRUEBAS

    ADMIN

    password

    It is interesting that, when I use APEX 5.0.1.00.06, I have some errors form appearing not using APEX 4.1.0.00.32

    Check your 77569 application-> Page 1. I have modified the page element attributes. Now it's working.

    Here are the changes (I will explain for P1_NOMBRE, did the same for the P1_APELLIDOS and P1_CATEGORIA):

    • 'Source' has become article attributed to him include:

    Source: Replacement always, value that exists in session state

    Source type: column database

    Source of value or an expression: NUMBER

    • The "Default" article now the following attributes:

    By default of Type: PL/SQL function body

    Default value:

    DECLARE
    
      L_NOMBRE B_LISTA_EMPLEADOS.NOMBRE%TYPE;
    
    BEGIN
    
      select NOMBRE
      into   L_NOMBRE
      from   B_LISTA_EMPLEADOS
      where  USERNAME = :APP_USER;
    
      RETURN L_NOMBRE;
    
    EXCEPTION
      WHEN NO_DATA_FOUND THEN
      RETURN NULL;
    
    END;
    

    Kind regards

    Kiran

  • How to optimize the performance of this query SQL

    Hello

    I need to find the age for each day, but I need for all previous dates in a single query. So I used the following query:

    Select trunc (sysdate) - level + 1 DATE

    trunc (sysdate) - level + 1 - created_date AGE

    elements

    connect by trunc (sysdate) - level + 1 - created_date > 0

    I get output (FOR the DATE and AGE) that is fine and correct:

    DATE AGE           

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

    6 JULY 15 22

    5 JULY 15 21

    4 JULY 15 20

    3 JULY 15 19

    2 JULY 15 18

    JULY 1, 15 17

    JUNE 30, 15 16

    JUNE 29, 15 15

    JUNE 28, 15 14

    JUNE 27, 15 13

    JUNE 26, 15 12

    25 JUNE 15 11

    24 JUNE 15 10

    Now I need to calculate the average age for each day and I added the average in the following query:

    Select trunc (sysdate) - level + 1 DATE .

    AVG (trunc (sysdate) - level + 1 - created_date) AVERAGE_AGE

    elements

    connect by trunc (sysdate) - level + 1 - created_date > 0

    Group of trunc (sysdate) - level + 1


    This query is correct? When I add the aggregate (avg) function to this query, it takes 1 hour to retrieve the data. When I remove the average request function that gives the result in 2 seconds? What is the solution to calculate the average without affecting performance? Help, please

    Maybe you are looking for something like this...

    SQL > ed
    A written file afiedt.buf

    1 with t (point, created_date) :)
    2 Select 1, date '' 2015-06-24 from all the double union
    3 select 2, date ' 2015-06-29 the Union double all the
    4 Select 3, date ' 2015-06-17' of the double
    5        )
    6  --
    7. end of test data
    8  --
    9. Select item
    10, trunc (sysdate) - level + 1 as dt
    11, trunc (sysdate) - level + 1-created_date age
    12, round (avg (trunc (sysdate) - level + 1 - created_date) on (trunc (sysdate) partition - level + 1), 2) as avg_in_day
    13 t
    14 connect by level<=>
    15-point point = prior
    sys_guid() 16 and prior is not null
    17 * order by 1.2
    SQL > /.
    POINT DT AGE AVG_IN_DAY
    ---------- ----------- ---------- ----------
    1 JUNE 24, 2015 0 3.5
    1 25 JUNE 2015 1 4.5
    1 26 JUNE 2015 2 5.5
    1 27 JUNE 2015 3 6.5
    1 28 JUNE 2015 4 7.5
    1 29 JUNE 2015 5 5.67


    1 30 JUNE 2015 6 6.67
    1 1 JULY 2015 7 7.67
    1-2 JULY 2015 8 8.67
    1-3 JULY 2015 9 9.67
    1 TO 4 JULY 2015 10 10.67
    1 5 JULY 2015 11 11.67
    1 6 JULY 2015 12 12.67
    2 JUNE 29, 2015 5.67 0
    2 30 JUNE 2015 1 6.67
    2 1 JULY 2015 2 7,67
    2 2 JULY 2015 3 8.67
    2-3 JULY 2015 4 9.67
    2-4 JULY 2015 5 10.67
    2-5 JULY 2015 6 11.67
    2-6 JULY 2015 7 12.67
    3 JUNE 17, 2015 0 0
    3 18 JUNE 2015 1 1
    3 19 JUNE 2015 2 2
    3 20 JUNE 2015 3 3
    3 21 JUNE 2015 4 4
    3 22 JUNE 2015 5 5
    3 23 JUNE 2015 6 6
    3 24 JUNE 2015 7 3.5
    3 25 JUNE 2015 8 4.5
    3 26 JUNE 2015 9 5.5
    3 27 JUNE 2015 10 6.5
    3 28 JUNE 2015 11 7.5
    3 29 JUNE 2015 12 5.67
    3 30 JUNE 2015 13 6.67
    3 1 JULY 2015 14 7.67
    3 2 JULY 2015 15 8.67
    3 3 JULY 2015 16 9.67
    3-4 JULY 2015 17 10.67
    3-5 JULY 2015 18 11.67
    3 6 JULY 2015 19 12.67

    41 selected lines.

  • Query SQL with DB data across links

    Hi Experts,

    Please give some guidance on below question.

    I have a pre-built SQL that I use to develop a report of BI Publisher and this query uses a database link to get values from another database instance.

    Now when I try to create a data set, I get the error "ORA-02019: description of the connection to the remote database not found. '

    I'm assuming that when I try to point to a data source, the editor of BI is pick the link of database as another data source and he could not find it and as well throw this error.

    Let me know how we can manage the links of the db in the data set.

    Thank you

    Thanks for the reply KKT.

    I solved the problem. It was related to the issue of access to the db link. The BI user in the JDBC connection did not have access to the db link.

    The DBA team gave related and resulting access fixed.

    Thank you

  • Query SQL report filtered RDI

    Hi guys,.

    There are simple IRR "select * from emp" on my page.

    End-user put filters on the report on the Actions menu. I can somehow (on click of a button, etc.) get the new SQL which is registered by the user now?

    Thank you

    Sunil Bhatia

    See this:

    http://www.deneskubicek.blogspot.de/2013/05/getting-interactive-report-query.html

    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

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

  • ORA-28500 and ORA-02063 when querying sql server tables.

    Hello

    I am getting below error when querying (also with oracle reports) talbes of MS SQL 2008 database who have more lines. There is no problem with tables with less number of lines.
    ORA-28500: connection between ORACLE and a non-Oracle system has sent this message:
    ORA-02063: preceding line from SQLSERVER

    When I asked "select *"Areas"@sqlserver;", it is retriving 195 lines and then the display above error.» This table contains 10716 lines.

    Here are the details of our environment:

    Database Oracle 11 G RAC (2 knots) on RHEL 5 64 Bit, MS SQL 2008

    ODBC. INI
    [oracle@proddb1 ~] $ cat /etc/odbc.ini
    [ODBC data sources]
    MSSQL = MS SQL Server

    [mssql]
    Driver=/opt/Microsoft/SQLNCLI/lib64/libsqlncli-11.0.so.1790.0
    Database = Ksa_Fakieh_SFA
    LogonID = OracleUser
    Password=0r@cle999
    Server = SJSQLV01.fakiehgroup.com
    QuotedId = YES
    AnsiNPW = YES
    [ODBC]
    IANAAppCodePage = 4
    Trace = 0
    UseCursorLib = 0
    UseCursorLib = 0


    INIT FILE:

    [oracle@proddb1 ~] $ cat $ORACLE_HOME/hs/admin/initDG4ODBC.ora
    # This is an example of initialization file of the agent that contains the HS settings
    # necessary for the database to ODBC gateway

    #
    # HS init parameters
    #
    HS_FDS_CONNECT_INFO = mssql
    HS_FDS_TRACE_LEVEL = off
    HS_FDS_SHAREABLE_NAME = /usr/lib64/libodbc.so
    HS_FDS_SUPPORT_STATISTICS = FALSE
    HS_LANGUAGE = AMERICAN_AMERICA. AR8MSWIN1256
    HS_NLS_NCHAR = UCS2
    #
    # ODBC specific environment variables
    #
    Set ODBCINI=/etc/odbc.ini
    #


    Listener.ora:

    # ###############################################################

    #

    TRACE_FILE_LISTENER_PRODDB1 = fakieh1

    LISTEN_DG4ODBC =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP (PORT = 1511))(HOST = proddb1.fakiehgroup.com))
    )
    )
    SID_LIST_LISTEN_DG4ODBC =
    (SID_LIST =
    (SID_DESC =
    (ORACLE_HOME = u01/oracle/fakieh/db/tech_st/11.1.0) (SID_NAME = DG4ODBC)
    (ENV="LD_LIBRARY_PATH=/usr/lib64:/u01/oracle/fakieh/db/tech_st/11.1.0/lib')
    (PROGRAM = dg4odbc)
    )
    )

    #
    # Definition of RAC database listener
    #

    LISTENER_PRODDB1 =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADRESSE = (PROTOCOL = TCP) (HOST = proddb1 - vip.fakiehgroup.com) (PORT = 1521)(IP = FIRST)))
    (ADDRESS_LIST =
    (ADRESSE = (PROTOCOL = TCP) (HOST = proddb1) (PORT = 1521)(IP = FIRST)))
    )
    )

    SID_LIST_LISTENER_PRODDB1 =
    (SID_LIST =
    (SID_DESC = (ORACLE_HOME = /u01/oracle/fakieh/db/tech_st/11.1.0)(SID_NAME = fakieh1))
    )

    STARTUP_WAIT_TIME_LISTENER_PRODDB1 = 0
    CONNECT_TIMEOUT_LISTENER_PRODDB1 = 10
    TRACE_LEVEL_LISTENER_PRODDB1 = OFF

    LOG_DIRECTORY_LISTENER_PRODDB1 = /u01/oracle/fakieh/db/tech_st/11.1.0/network/admin
    LOG_FILE_LISTENER_PRODDB1 = fakieh1
    TRACE_DIRECTORY_LISTENER_PRODDB1 = /u01/oracle/fakieh/db/tech_st/11.1.0/network/admin
    TRACE_FILE_LISTENER_PRODDB1 = fakieh1
    ADMIN_RESTRICTIONS_LISTENER_PRODDB1 = WE
    SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER_PRODDB1 = OFF


    IFile=/U01/Oracle/Fakieh/DB/tech_st/11.1.0/Network/admin/fakieh1_proddb1/listener_ifile.ora


    Thank you
    Mohammed.

    Mohammed,
    Without seeing the tracing information, it is difficult to say why this problem occurs.
    However, could you add the following to the file initDG4ODBC.ora gateway -.

    HS_RPC_FETCH_REBLOCKING = OFF
    HS_FDS_FETCH_ROWS = 1

    and try to select it again again SLQPLUS session and see if the same problem occurs?

    Kind regards
    Mike

Maybe you are looking for

  • How can I change the size of the address bar in firefox 18?

    I want to make the address bar much smaller and much bigger search bar (I want still allows them to use the full width of the toolbar). I read elsewhere in the forums that you can change the size of the bar by going to CUSTOMIZE and once the cursor t

  • T61p wireless card update possible?

    Greetings all this; I have an Intel 4965 AGN (with work of N) and a double router Strip WD750N. I am currently getting 300Mbs speed but I was wondering if there is a Lenovo updated map that would get the Mbs 450 side 5 GHz? Is there a way to get thes

  • Multitouch 511 Acer e5 does not work after update bio

    I've decided to update my BIOS on my laptop Acer E5 511 and afer that my touchpad lost the abilitiy to work on mutlitouch gestures. I can't scroll, zoom, or do the right-click by pressing with two fingers at the same time. I tried isntaling the touch

  • I need to configure my computer so that I need to use a password to connect to use

    When my computers on anyone can use it I want to password protect

  • New Audio Hp-1534

    Two weeks old computer... Unable to get his right... using 4 speakers LF - RF LR - RR... Difficult to explain what is happening... Some examples using WinAmp media player play at normal volume and I came to this site an audio pop up of page under thi