Dealy in query when i use timestamp

Hello all
I have a query like
" select * from table where create_date > (select max(update) from tableb) )
The above query is taking a long long time.
Createdate and update are timestamps
So i have tried the below query
" select * from table where create_date > SYSDATE"
this is pret quick. So i figured out that the inner query is causing the problem. So i have rewritten it using a join like
select * from (
(select col1, col2, createdate from table) a, (select max(update) from tableb) b
where a.createdate>b.update).
Even this is taking a long time.
Can somebod please help me how i can tune this query....

Read this post:
When your query takes too long ...

Similar Messages

  • Oracle 10.2.0.4 Index on timestamp column not used when SYSTIMESTAMP Used.

    Hi,
    I have a table A with a column B timestamp(6). The tables contains around 300000 rows..
    I have created index 'idx' on the column B.
    When i compare column 'B' with systimestamp, it does not use the index, whereas if i compare 'B' with sysdate it uses the index.
    Eg :
    select count(*) from a where b<=sysdate;
    The above used the index 'idx' and executed in 1 second
    select count(*) from a where b<=systimestamp;
    The above does not use the index and executed in 19 seconds.
    Any Clue?
    Thanks in Advance

    Oracle is using Internal functions when you use SYSTIMESTAMP:
    Work around will be to use TO_TIMESTAMP as shown below.. Or define a function based index..
    You can check performance problem querying against a "TIMESTAMP WITH TIME ZONE" column link also
    SQL> create table a(b timestamp(6));
    Table created.
    SQL> insert into a
      2  select systimestamp+(level/24) from dual connect by level <= 30000;
    30000 rows created.
    SQL> commit;
    Commit complete.
    SQL> create index ndx on a(b);
    Index created.
    SQL> explain plan for
      2  select count(*) from a where b <= sysdate;
    Explained.
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 3858831102
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |      |     1 |    13 |     1   (0)| 00:00:01 |
    |   1 |  SORT AGGREGATE   |      |     1 |    13 |            |          |
    |*  2 |   INDEX RANGE SCAN| NDX  |     1 |    13 |     1   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - access("B"<=SYSDATE@!)
    Note
       - dynamic sampling used for this statement
    18 rows selected.
    SQL> explain plan for
      2  select count(*) from a where b <= systimestamp;
    Explained.
    SQL>  select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 3918351354
    | Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |      |     1 |    13 |    20  (15)| 00:00:01 |
    |   1 |  SORT AGGREGATE    |      |     1 |    13 |            |          |
    |*  2 |   TABLE ACCESS FULL| A    |     1 |    13 |    20  (15)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - filter(SYS_EXTRACT_UTC(INTERNAL_FUNCTION("B"))<=SYS_EXTRACT_UTC(S
                  YSTIMESTAMP(6)))
    Note
       - dynamic sampling used for this statement
    19 rows selected.
    --"Just tried using TO_TIMESTAMP"
    SQL> explain plan for
      2  select count(*) from a where b <= to_timestamp(systimestamp);
    Explained.
    SQL>
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 3858831102
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |      |     1 |    13 |     2   (0)| 00:00:01 |
    |   1 |  SORT AGGREGATE   |      |     1 |    13 |            |          |
    |*  2 |   INDEX RANGE SCAN| NDX  |     4 |    52 |     2   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - access("B"<=TO_TIMESTAMP(TO_CHAR(SYSTIMESTAMP(6))))
    14 rows selected.Edited by: jeneesh on Oct 23, 2012 11:18 AM

  • Not right data when row_number used in inner-view sql query...

    Hi ,
    I use the below sql statement which displays the right data
    select CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE , SUM_POSOTITA , row_number() over(partition by code_farmakou order by sum_posotita desc) from
      (SELECT CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, TO_DATE(DATES_EKTELESIS,'DD/MM/RRRR') DATES ,SUM(POSOTITA) SUM_POSOTITA
              FROM  EKTELESI_AT_SINT_CLINIC A, MITROO_FARMAKOU B
               WHERE CODE_FARMAKOU = FARMAK_CODE
               GROUP BY CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, DATES_EKTELESIS
      UNION ALL
      SELECT CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, TO_DATE(DATES_EKTELESIS,'DD/MM/RRRR') DATES,SUM(POSOTITA) SUM_POSOTITA
              FROM  EKTELESI_AT_SINT_EX_IATR A, MITROO_FARMAKOU B
               WHERE CODE_FARMAKOU = FARMAK_CODE
               GROUP BY CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, DATES_EKTELESIS
      UNION ALL
      SELECT CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, TO_DATE(DATES_EKTELESIS,'DD/MM/RRRR') DATES,SUM(POSOTITA) SUM_POSOTITA
              FROM  EKTELESI_AT_SINT_FOREON_MS A, MITROO_FARMAKOU B
               WHERE CODE_FARMAKOU = FARMAK_CODE
               GROUP BY CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, DATES_EKTELESIS
      UNION ALL
      SELECT CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, TO_DATE(DATES_EKTELESIS,'DD/MM/RRRR') DATES,SUM(POSOTITA) SUM_POSOTITA
              FROM  EKTELESI_GEN_SINT_KLIN A, MITROO_FARMAKOU B
               WHERE CODE_FARMAKOU = FARMAK_CODE
               GROUP BY CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, DATES_EKTELESIS
      UNION ALL
      SELECT CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, TO_DATE(DATES_EKTELESIS,'DD/MM/RRRR') DATES,SUM(POSOTITA) SUM_POSOTITA
              FROM  EKTELESI_GEN_SINT_EX_IATR A, MITROO_FARMAKOU B
               WHERE CODE_FARMAKOU = FARMAK_CODE
               GROUP BY CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, DATES_EKTELESIS)The data are:
    CODE_FARMAKOU                            EMP_NAME                                                                         PACKTYPE                     PACKSIZE                  SUM_POSOTITA ROW_NUMBER()OVER(PARTITIONBYCO
    0000002419                               FACTREL INJECTION                                                                VIAL                         2 ML                                 5                              1
    0000014071                               DOPAMINE HYDROCHLORIDE                                                           VIAL                         5 ML X 25                           30                              1
    0000086289                               DETUSSIN EXPECTORANT                                                             BOT                          120 ML                               3                              1
    1000000760                               DEPON                                                                            BT                           20(BLIST2X10)                        2                              1
    1000000760                               DEPON                                                                            BT                           20(BLIST2X10)                        1                              2
    1000003279                               MOXACEF                                                                          BT                           40(BLIST10X4)                       45                              1
    1000003279                               MOXACEF                                                                          BT                           40(BLIST10X4)                        1                              2
    1000003279                               MOXACEF                                                                          BT                           40(BLIST10X4)                        1                              3
    1000014127                               DEPON VIT. C                                                                     BT                           2TUBX10                              6                              1
    1000014127                               DEPON VIT. C                                                                     BT                           2TUBX10                              2                              2
    1000016655                               KABIVEN                                                                          BT                           50ÖÕÓ.×1,7ML                        21                              1
    1000016655                               KABIVEN                                                                          BT                           50ÖÕÓ.×1,7ML                         2                              2However , when i use the below statement , in order not to display the row_number (so i use row_number function in inner-view) the data are different--in different order... why is that????
    select CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE , SUM_POSOTITA from
    select CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE , SUM_POSOTITA , row_number() over(partition by code_farmakou order by sum_posotita desc) from
      (SELECT CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, TO_DATE(DATES_EKTELESIS,'DD/MM/RRRR') DATES ,SUM(POSOTITA) SUM_POSOTITA
              FROM  EKTELESI_AT_SINT_CLINIC A, MITROO_FARMAKOU B
               WHERE CODE_FARMAKOU = FARMAK_CODE
               GROUP BY CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, DATES_EKTELESIS
      UNION ALL
      SELECT CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, TO_DATE(DATES_EKTELESIS,'DD/MM/RRRR') DATES,SUM(POSOTITA) SUM_POSOTITA
              FROM  EKTELESI_AT_SINT_EX_IATR A, MITROO_FARMAKOU B
               WHERE CODE_FARMAKOU = FARMAK_CODE
               GROUP BY CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, DATES_EKTELESIS
      UNION ALL
      SELECT CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, TO_DATE(DATES_EKTELESIS,'DD/MM/RRRR') DATES,SUM(POSOTITA) SUM_POSOTITA
              FROM  EKTELESI_AT_SINT_FOREON_MS A, MITROO_FARMAKOU B
               WHERE CODE_FARMAKOU = FARMAK_CODE
               GROUP BY CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, DATES_EKTELESIS
      UNION ALL
      SELECT CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, TO_DATE(DATES_EKTELESIS,'DD/MM/RRRR') DATES,SUM(POSOTITA) SUM_POSOTITA
              FROM  EKTELESI_GEN_SINT_KLIN A, MITROO_FARMAKOU B
               WHERE CODE_FARMAKOU = FARMAK_CODE
               GROUP BY CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, DATES_EKTELESIS
      UNION ALL
      SELECT CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, TO_DATE(DATES_EKTELESIS,'DD/MM/RRRR') DATES,SUM(POSOTITA) SUM_POSOTITA
              FROM  EKTELESI_GEN_SINT_EX_IATR A, MITROO_FARMAKOU B
               WHERE CODE_FARMAKOU = FARMAK_CODE
               GROUP BY CODE_FARMAKOU,EMP_NAME,PACKTYPE,PACKSIZE, DATES_EKTELESIS)
      )and its data are:
    CODE_FARMAKOU                            EMP_NAME                                                                         PACKTYPE                     PACKSIZE                  SUM_POSOTITA
    1000016655                               KABIVEN                                                                          BT                           50ΦΥΣ.Χ1,7ML                        21
    1000016655                               KABIVEN                                                                          BT                           50ΦΥΣ.Χ1,7ML                         2
    1000000760                               DEPON                                                                            BT                           20(BLIST2X10)                        2
    1000014127                               DEPON VIT. C                                                                     BT                           2TUBX10                              2
    1000003279                               MOXACEF                                                                          BT                           40(BLIST10X4)                       45
    0000014071                               DOPAMINE HYDROCHLORIDE                                                           VIAL                         5 ML X 25                           30
    0000086289                               DETUSSIN EXPECTORANT                                                             BOT                          120 ML                               3
    1000014127                               DEPON VIT. C                                                                     BT                           2TUBX10                              6
    1000003279                               MOXACEF                                                                          BT                           40(BLIST10X4)                        1
    1000003279                               MOXACEF                                                                          BT                           40(BLIST10X4)                        1
    0000002419                               FACTREL INJECTION                                                                VIAL                         2 ML                                 5
    1000000760                               DEPON                                                                            BT                           20(BLIST2X10)                        1NOTE :Sorry, I tried to pose some sample data using the "with" statement but i couldn't...the error ORA-32035 : unreferenced query name defined in WITH clause was displayed..
    Regards,
    Simon

    The optimizer has, well, optimized out the row_number because you never refer to its value in the outermost query.
    sql>select deptno, cnt, row_number() over (order by cnt desc) rn
      2    from (select deptno, count(*) cnt
      3            from emp
      4           group by deptno);
       DEPTNO       CNT        RN
           30         6         1
           20         5         2
           10         3         3
    3 rows selected.
    -- here because we include rn in the outermost query,
    -- the results are still ordered based on the analytical function result
    sql>select deptno, cnt, rn
      2    from (select deptno, cnt, row_number() over (order by cnt desc) rn
      3            from (select deptno, count(*) cnt
      4                    from emp
      5                   group by deptno));
       DEPTNO       CNT        RN
           30         6         1
           20         5         2
           10         3         3
    3 rows selected.
    -- but if we don't include rn in the outermost query,
    -- the optimizer leaves out the window sort and the results are in a different order
    sql>select deptno, cnt
      2    from (select deptno, cnt, row_number() over (order by cnt desc) rn
      3            from (select deptno, count(*) cnt
      4                    from emp
      5                   group by deptno));
       DEPTNO       CNT
           10         3
           20         5
           30         6
    3 rows selected.This just reinforces the point that if you want your results in a particular order, you need to provide an ORDER BY clause - don't rely on execution plans to do your sorting for you.

  • How can I remove ASCII text from a field when I use it in a query

    How can I remove ASCII text from a field when I use it in a query?
    I am running a select statement on a table that appears to have ASCII text in some of the fields. If I use these fields in the where statement like the code below nothing returns:
    SELECT FIELD1 FROM TABLE1 WHERE FIELD1 IS NULL
    But the field looks empty if I do a straight select without the where clause. Additionally, one of the fields has text but appears to be padded out with ASCII text, which I need to strip out before I can use this field in a where or join statement. I have tried using a trim, ltrim, rtrim, to_char, nvl, decode and nothing works. When I use excel to run the same query it looks as if these ASCII fields are boxes.
    I have asked our DBA team to see what they can do to prevent these from going into the table, but in the mean time I still need to run this report.
    Do you have any suggestions?

    Can you provide an example? I've been trying (for
    example) "select translate(' test one', ascii(' '),
    'X') from dual" with no luck.
    Thank you.To replace space, you should query like this:
    select translate(' test one', chr(32), 'X') from dual instead of select translate(' test one', ascii(' '), 'X') from dual Thanks,
    Dharmesh Patel

  • Error in query when using offset in variable

    Hi,
    I have a query in which I use av variable (0CWEEK) for the current week. The query works fine with this varable. But when I use an offset of for example minus 1, the query displays an error:
    (A299(BRAIN)) Terminate: System error in program SAPLRRI2 and form REP_ASSIGN_INITIAL_OPT-01
    We use offset of 0CALWEEK in other info cubes, and there are no problems with that.
    In this case we have implemented 0CALWEEK in a DSO. Perhaps this somehow causes the problem? On the other hand the variable works fine in the DSO, as long as we don't use offset.
    So - why is there a error, and how to solve it?
    BR,
    Niclas

    Managed to solve the problem. The reason was that there was no column (or row) with the variable without offset. I.e. there needs to be a column for the actual week in the query as well, not only week with offset. In this case I didn't want the actual week, only an offset to it. So I just hid the column with the actual week from presentation.
    /Niclas

  • SELECT * cannot be used in an INSERT INTO query when the source or destination table contains a multivalued field

    Hi,
    I am using Access 2013 and I have the following VBA code, 
    strSQL = "INSERT INTO Master SELECT * from Master WHERE ID = 1"
     DoCmd.RunSQL (strSQL)
    when the SQL statement is run, I got this error.
    SELECT * cannot be used in an INSERT INTO query when the source or destination table contains a multivalued field
    Any suggestion on how to get around this?
    Please advice and your help would be greatly appreciated!

    Rather than modelling the many-to-many relationship type by means of a multi-valued field, do so by the conventional means of modelling the relationship type by a table which resolves it into two one-to-many relationship types.  You give no indication
    of what is being modelled here, so let's assume a generic model where there is a many-to-many relationship type between Masters and Slaves, for which you'd have the following tables:
    Masters
    ....MasterID  (PK)
    ....Master
    Slaves
    ....SlaveID  (PK)
    ....Slave
    and to model the relationship type:
    SlaveMastership
    ....SlaveID  (FK)
    ....MasterID  (FK)
    The primary key of the last is a composite one of the two foreign keys SlaveID and MasterID.
    You appear to be trying to insert duplicates of a subset of rows from the same table.  With the above structure, to do this you would firstly have to insert rows into the referenced table Masters for all columns bar the key, which, presuming this to be
    an autonumber column, would be assigned new values automatically.  To map these new rows to the same rows in Slaves as the original subset you would then need to insert rows into SlaveMastership with the same SlaveID values as those in Slaves referenced
    by those rows in Slavemastership which referenced the keys of the original subset of rows from Masters, and the MasterID values of the rows inserted in the first insert operation.  This would require joins to be made between the original and the new subsets
    of rows in two instances of Masters on other columns which constitute a candidate key of Masters, so that the rows from SlaveMastership can be identified.
    You'll find examples of these sort of insert operations in DecomposerDemo.zip in my public databases folder at:
    https://onedrive.live.com/?cid=44CC60D7FEA42912&id=44CC60D7FEA42912!169
    If you have difficulty opening the link copy its text (NB, not the link location) and paste it into your browser's address bar.
    In this little demo file non-normalized data from Excel is decomposed into a set of normalized tables.  Unlike your situation this does not involve duplication of rows into the same table, but the methodology for the insertion of rows into a table which
    models a many-to-many relationship type is broadly the same.
    The fact that you have this requirement to duplicate a subset of rows into the same table, however, does make me wonder about the validity of the underlying logical model.  I think it would help us if you could describe in detail just what in real world
    terms is being modelled by this table, and the purpose of the insert operation which you are attempting.
    Ken Sheridan, Stafford, England

  • When to use SELECT and END SELECT in the query.

    hi all,
    When to use SELECT and END SELECT in the query.
    regads,
    Venkata Suresh Penke.

    Hi Suresh..
    When do we need to use SELECT .. ENDSELECT
    Usually we will never use SELECT .. ENDSELECT as it gives very poor performance.
    But whenever we read a single Record we will use it as an alternative for SELECT SINGLE in some scenarios.
    Eg: When the Full primary key is not specified in the WHERE clause.
    SELECT * FROM MARC INTO WA_MARC UP TO 1 ROWS WHERE MATNR = P_MATNR.
    ENDSELECT.
    And other scenario is when we perform AGGREGATE OPERATIONS.when the Result is only one row.
    SELECT SUM( LABST ) FROM MARD INTO V_LABST UP TO 1 ROWS
    WHERE MATNR = P_MATNR.
    ENDSELECT.
    Note: In The Above scenario we cannot use SELECT SINGLE..
    <b>REWARD IF HELPFUL.</b>

  • SAP Query (SQ01) who and when to use the report

    HI Experts!!!
    Is there somewhere recorded information:  who and when to use the report from SAP Query (SQ01)?
    Thanks

    Hi
    This topic doesn´t belong to the Service Marketplace Area.
    regards Martin

  • Where to check when the query was last used.

    Hi all,
    Where can we check the information when a particuler query was last used. (date ). Any table.
    Also how can we check the same from satistics queries.

    Hi..
    run a query and you will immediately see a new record in table RSDDSTAT (SE16) with your user-ID.
    Also check the Query statistics in Tcode ST03N.
    Cheers.

  • Can't kill query when I run using "statement" option

    Help! I get an "X" to kill the query when I run a query using the "script"" option, but when I use the "statement" option I have no option I can find to cancel/kill the query. What should I do? I am using SQL Developer 2.1.1.64. In prior versions the "X" was always there. This has got to be a bug but I don't see this quetions posted anywhere else.
    Please help!!! Thanks.
    Edited by: user13064034 on Jul 9, 2010 10:06 AM

    Oh... right, but that's only on SELECTs. I thought we were all referring to the still missing features discussed in-depth in 30EA2->2.1.*: Task Progress indication
    K.

  • Hibernet query returns null for XMLTYPE data when I use oracle type4 driver

    Hi,
    I am using Oracle type-4 driver, My hibernet query returns null for data type XMLTYPE. But when I use BEA type -4 driver its working fine. Please help me to retrive XMLTYPE data using oracle-4 driver through hibernet query.
    Thanks in advance.
    regards,
    Amaresh

    Hi,
    I am using Oracle type-4 driver, My hibernet query returns null for data type XMLTYPE. But when I use BEA type -4 driver its working fine. Please help me to retrive XMLTYPE data using oracle-4 driver through hibernet query.
    Thanks in advance.
    regards,
    Amaresh

  • OCCI Fractional time insertion using Timestamp class

    Hello,
    On linux with oracle 10g, I modified the demo app occidml to insert a Timestamp into a table. I print the factional time from the timestamp after it is created to verify that indeed it is the correct value. However, when I query the database using SQL, I find that the fractional time component didn't get inserted. Any ideas on how to resolve this would be highly appreciated.
    Here is the code snippet for inserting the timestamp..
    string sqlStmt = "INSERT INTO author_ag VALUES (:x, :y)";
    stmt=conn->createStatement (sqlStmt);
    try{
    Timestamp ts(env, 2008,9,10,11,12,13, c1);
    uint h,m,s,f;
    ts.getTime(h, m, s, f);
    stmt->setTimestamp (1, ts);
    stmt->setString (2, c2);
    stmt->executeUpdate ();
    cout << "insert - Success" << c1 << " " << f << endl;
    }catch(SQLException ex)
    cout<<"Exception thrown for insertBind"<<endl;
    cout<<"Error number: "<< ex.getErrorCode() << endl;
    cout<<ex.getMessage() << endl;
    I see the following output:
    insert - Success222 222
    The database table is as follows:
    SQL> desc author_ag
    Name Null? Type
    TS TIMESTAMP(3)
    AUTHOR_NAME VARCHAR2(25)

    My mistake. Didn't realize the fractional time had to be specified as NanoSeconds.

  • Can I stop a report from Re-executing the query when I go back to that page

    I have a report that has a complicated query and looks at a lot of information to display the results. This query then links of to show details of individual items that were displayed in the result. But when I hit the back button on the browser, it executes the query again and it takes a while for the page to load.
    Is there any way to stop this and only execute the query when the User pushes a Button on the page else display the previous results.
    Thanks
    Sriram

    Another alternative is to make that detail link open in a popup window using
    javascript:popupURL(...);This way, the complicated report page is always visible.

  • What query should I use to find all versions of Office 2013 64-bit installed on client computers?

    What query should I use to find all versions of Office 2013 64-bit installed on client computers? Could someone create a custom query? I need all of the client computers names and which ones have any Office 64-bit components. Thank you so much! I really
    appreciate it!

    Hi,
    You could edit the following query to meet your requirement.
    SELECT     dbo.v_R_System.Name0, dbo.v_GS_OPERATING_SYSTEM.Caption0 AS [Operating System],
                          dbo.v_GS_OPERATING_SYSTEM.CSDVersion0 AS [OS Service Pack], arp.DisplayName0,
                          CASE WHEN arp.version0 LIKE '11.0.6361.0' THEN 'SP1' WHEN arp.version0 LIKE '11.0.7969.0' THEN 'SP2' WHEN arp.version0 LIKE '11.0.8173.0'
    THEN 'SP3' WHEN
                           arp.version0 LIKE '12.0.6215.1000' THEN 'SP1' WHEN arp.version0 LIKE '12.0.6425.1000' THEN 'SP2' WHEN arp.version0 LIKE '14.0.6029.1000'
    THEN 'SP1' ELSE '' END
                           AS 'Service Pack', arp.Version0
    FROM         dbo.v_Add_Remove_Programs AS arp INNER JOIN
                          dbo.v_R_System ON arp.ResourceID = dbo.v_R_System.ResourceID INNER JOIN
                          dbo.v_RA_System_SMSInstalledSites AS ASSG ON dbo.v_R_System.ResourceID = ASSG.ResourceID INNER JOIN
                          dbo.v_GS_OPERATING_SYSTEM ON dbo.v_R_System.ResourceID = dbo.v_GS_OPERATING_SYSTEM.ResourceID
    WHERE     (arp.DisplayName0 LIKE '%Microsoft Office%edition%' OR
                          arp.DisplayName0 LIKE '%Microsoft Office Standard 2007%' OR
                          arp.DisplayName0 LIKE '%Microsoft Office Enterprise 2007%' OR
                          arp.DisplayName0 LIKE '%Microsoft Office Professional%2007%' OR
                          arp.DisplayName0 LIKE '%Microsoft Office Standard 2010%' OR
                          arp.DisplayName0 LIKE '%Microsoft Office Enterprise 2010%' OR
                          arp.DisplayName0 LIKE '%Microsoft Office Professional%2010%' OR
                          arp.DisplayName0 LIKE 'Microsoft Office 2000%' OR
                          arp.DisplayName0 LIKE 'Microsoft Office XP%') AND (arp.DisplayName0 NOT LIKE '%update%') AND
                          (arp.DisplayName0 NOT LIKE '%Microsoft Office XP Web Components') AND (dbo.v_R_System.Operating_System_Name_and0 NOT LIKE '%server%')
    AND
                          (arp.InstallDate0 NOT LIKE 'NULL')
    ORDER BY dbo.v_R_System.Name0, arp.DisplayName0, arp.Version0
    Full details:http://social.technet.microsoft.com/Forums/systemcenter/en-US/7baeb348-fb63-4115-8d76-2c884d18f708/sql-query-to-check-ms-office-service-pack-level?forum=configmgrreporting
    Best Regards,
    Joyce
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • How to pass multiple query string values using the same parameter in Query String (URL) Filter Web Part

    Hi,
    I want to pass multiple query string values using the same parameter in Query String (URL) Filter Web Part like mentioned below:
    http://server/pages/Default.aspx?Title=Arup&Title=Ratan
    But it always return those items whose "Title" value is "Arup". It is not returned any items whose "Title" is "Ratan".
    I have followed the
    http://office.microsoft.com/en-us/sharepointserver/HA102509991033.aspx#1
    Please suggest me.
    Thanks | Arup
    THanks! Arup R(MCTS)
    SucCeSS DoEs NOT MatTer.

    Hi DH, sorry for not being clear.
    It works when I create the connection from that web part that you want to be connected with the Query String Filter Web part. So let's say you created a web part page. Then you could connect a parameterized Excel Workbook to an Excel Web Access Web Part
    (or a Performance Point Dashboard etc.) and you insert it into your page and add
    a Query String Filter Web Part . Then you can connect them by editing the Query String Filter Web Part but also by editing the Excel Web Access Web Part. And only when I created from the latter it worked
    with multiple values for one parameter. If you have any more questions let me know. See you, Ingo

Maybe you are looking for

  • EXECUTE permission denied on object 'xp_sqlagent_notify', database 'mssqlsystemresource', schema 'sys'.

    I'm trying to create a new subscriptions on an existing report and get the following error. An internal error occurred on the report server. See the error log for more details. (rsInternalError) Get Online Help Get Online Help EXECUTE permission deni

  • Vendor Master Data - Bank Data Report including IBAN

    Is there anyway to pull a report out of SAP to show all vendors with a IBAN existing for their bank master data?

  • Itunes/ipod updating HELP!

    whenever i plug my ipod into the computer it updates my ipod, however once that update is done if i change a setting and hit sync or apply nothing happens..itunes say it is updating but my ipod doesn't respond and it says that it is updating for a go

  • How to Add new Manual address in ADRC?

    Hello Experts, My requirement is, I want to add new address in ADRC table, once I insert new address, I will get the new ADRNR number fot that address. I want that ADRNR to link with vendor address in delivery document. Means wants to update VBPA tab

  • Thunderbird hangs when entering addresses

    When I begin entering a name in the To: field TB 31.5.0 hangs for a few seconds. I have noticed that there is one email address in the address book that is repeated thousands of times. So many times that the computer and TB kind of time out when tryi