Oracle Alert and sql query

Hello, I am working on an oracle alert for PO's.
goal- when a PO is not approved/rejected by the approver and is waiting on approver's queue for more than 3 business days, an email should be sent to the approver every day saying "PO waiting for +xx+ days".
Working on R:12.1.1
Here is the script I could write and get emails of all unattended PO's. I am not able to use the dates.
Please help me out. Here is my script.
SELECT distinct poh.segment1,
TO_CHAR(SUM((pll.quantity - pll.quantity_cancelled) *
pll.price_override),
'$99999990.90'),
he.full_name,
NVL(fu1.email_address, '[email protected]') approver,
NVL(he.email_address, '[email protected]') owner,
pv.vendor_name,
vd.name
INTO &PO_NO,
&PO_AMT,
&CREATED_BY,
&APPROVER_EMAIL,
&CREATOR_EMAIL,
&VENDOR,
&DB_NAME
from wf_item_activity_statuses wias,
wf_notifications wfn,
po_headers_all poh,
po_line_locations_all pll,
fnd_user fu1,
fnd_user fu2,
hr_employees he,
ap_suppliers pv,
v$database vd
where wias.notification_id is not null
and wias.notification_id = wfn.group_id
AND poh.last_updated_by = fu2.user_id
and wfn.recipient_role = fu1.user_name
AND fu2.employee_id = he.employee_id
AND pll.po_header_id = poh.po_header_id
AND poh.vendor_id = pv.vendor_id
AND poh.type_lookup_code IN ('STANDARD', 'PLANNED')
and wfn.status = 'OPEN'
and wias.item_type = 'POAPPRV'
and wias.item_key = poh.wf_item_key
and poh.org_id = 81
AND poh.type_lookup_code IN ('STANDARD', 'PLANNED')
and poh.authorization_status IN ('IN PROCESS', 'PRE-APPROVED')
Thanks
Raj
Edited by: 936248 on Sep 20, 2012 7:15 AM

Hi Sree,
I tried this below script. This results in an error- APP-ALR-04106.
Thanks for the help.
SELECT distinct poh.segment1,
TO_CHAR(SUM((pll.quantity - pll.quantity_cancelled) *
pll.price_override),
'$99999990.90'),
he.full_name,
NVL(fu1.email_address, '[email protected]') approver,
NVL(he.email_address, '[email protected]') owner,
pv.vendor_name,
vd.name,
count(gd.transaction_date)
INTO &PO_NO,
&PO_AMT,
&CREATED_BY,
&APPROVER_EMAIL,
&CREATOR_EMAIL,
&VENDOR,
&DB_NAME,
&datediff
from wf_item_activity_statuses wias,
wf_notifications wfn,
po_headers_all poh,
po_line_locations_all pll,
fnd_user fu1,
fnd_user fu2,
hr_employees he,
ap_suppliers pv,
v$database vd,
GL_TRANSACTION_DATES gd
where wias.notification_id is not null
and wias.notification_id = wfn.group_id
AND poh.last_updated_by = fu2.user_id
and wfn.recipient_role = fu1.user_name
AND fu2.employee_id = he.employee_id
AND pll.po_header_id = poh.po_header_id
AND poh.vendor_id = pv.vendor_id
AND poh.type_lookup_code IN ('STANDARD', 'PLANNED')
and wfn.status = 'OPEN'
and wias.item_type = 'POAPPRV'
and wias.item_key = poh.wf_item_key
and poh.org_id = 81
AND poh.type_lookup_code IN ('STANDARD', 'PLANNED')
and poh.authorization_status IN ('IN PROCESS', 'PRE-APPROVED')
and gd.business_day_flag='Y'
and gd.transaction_date between (sysdate-3) and poh.submit_date
GROUP BY poh.segment1

Similar Messages

  • Modes and Methods in Tag Query and SQL Query

    Hi,
    Can someone explain me about the modes available in <b>TAG Query and SQL Query.</b>
    TAG Query has modes such as <b>Current, CurrentWrite, GroupList, History, HistoryEvent, ModeList, Statistics and TagList</b>
    SQL Query i still have doubt on <b>FixedQuery with output , Modelist and TableList</b>
    I also need to know why methods are used?
    Thanks in advance
    Regards
    Muzammil

    I'll try to  explain to the best of my knowledge :
    <u><b>TagQuery</b></u>
    <b>Current</b> : Gives you the current value of the Tag you are reading.
    <b>CurrentWrite</b> : Let you write a Value as the Current Value of the Tag.
    <b>GroupList</b> : Generally Tags are grouped under different groups. Returns you the name of the Groups.
    <b>From the xMII Help Document :</b>
    <b>History</b> : History Mode returns interpolated data.  Interpolation can be accomplished by specifying either the # of rows desired or the retrieval resolution.  If the mode is "History" and a value is provided for the Resolution parameter (which is in seconds), the connector will retrieve evenly-spaced values starting at the beginning of the time interval, up to the maximum # of rows specified in the RowCount parameter.  If no value is provided for the Resolution parameter, the connector will return an evenly-spaced number of values based on the value of the RowCount parameter.
    For example, if the time interval is 1 hour, Resolution is 15, and RowCount is 240, the connector will return evenly spaced values each 15 seconds, up to 240 values (which would span the entire hour).
    If the time interval is 1 hour, Resolution is not provided or is set to zero, and RowCount is 120, the connector would return 120 evenly spaced values, at an effective interval of 30 seconds.
    <b>HistoryEvent Mode</b> : The connector can provide historical values "as they were stored" the database.  This mode provides no interpolation of values.
    <b>Statistics Mode</b> : When retrieving data for statistical calculations, the connector utilizes the same techniques as in the "HistoryEvent"  mode.  It is important to note that the first two returning columns in the HistoryEvent query must be the timestamp and the value, in that order.  The SAP xMII Statistical processor expects that order, or errors will occur.  This ensures precision of statistical measurements, particularly time-weighted average, by using the exact storage time and values from the historical database.  The SAP xMII system provides the statistical calculations.
    <b>Modelist</b> : Basically returns the modes of the Query Available. The Data returned is same as the data in the Modes list in the Quert Template Editor.
    <b>Taglist</b> : Returns all the Tags in the Datasource.
    <u><b>SQL Query</b></u>
    <b>Modelist</b> : Same as above.
    <b>TableList</b> : List of all the tables in the database to which the connector connects.
    Again from SAP xMII Help Documentation :
    <b>FixedQueryWithOutput</b> : This mode is used to execute an Oracle stored procedure or function that returns a REF CURSOR as output.  The position of the REF CURSOR is marked by a "?" in the query.  For example:
    <b>Create a table.</b>
    <i>create table usage (id int, name varchar(50));
    insert into usage (id, name) values (1, 'test1');
    insert into usage (id, name) values (2, 'test2');
    insert into usage (id, name) values (3, 'test3');
    insert into usage (id, name) values (4, 'test4');
    insert into usage (id, name) values (5, 'test5');
    insert into usage (id, name) values (6, 'test6');
    insert into usage (id, name) values (7, 'test7');
    insert into usage (id, name) values (8, 'test8');</i>
    <b>Define the stored procedure.</b>
    <i>DROP PACKAGE foopkg;
    CREATE PACKAGE foopkg IS
      TYPE cursortype is ref cursor;
      PROCEDURE test (mycursor in out cursortype);
    END foopkg;
    CREATE PACKAGE BODY foopkg IS
      PROCEDURE test (mycursor in out cursortype) AS
      BEGIN
         open mycursor for select * from usage;
      END;
    END foopkg;
    </i>
    Define a query template for calling the stored procedure.  Enter the following in the FixedQuery tab:
    <b>call foopkg.test(?)</b>
    This template returns all rows from the Usage table.

  • How to provide joins between oracle tables and sql server tables

    Hi,
    I have a requirement that i need to generate a report form two different data base. i.e Oracle and Sql Server.
    how to provide joins between oracle tables and sql server tables ? Any help on this
    Regards,
    Malli

    user10675696 wrote:
    I have a requirement that i need to generate a report form two different data base. i.e Oracle and Sql Server. Bad idea most times. Heterogeneous joins do not exactly scale and performance can be severely degraded by network speed and b/w availability. And there is nothing you can do in the application and database layers to address performance issue at the network level in this case - your code's performance is simply at the mercy of network performance. With a single glaring fact - network performance is continually degrading. All the time. Always. Until it is upgraded. When the performance degradation starts all over again.
    If the tables are not small (few 1000 rows each) and row volumes static, I would not consider doing a heterogeneous join. Instead I would rather go for a materialised view on the Oracle side, use a proper table and index structure, and do a local database join.

  • Is it possible to install Oracle 9i and SQL server on same machine

    1. Is it possible to install Oracle 9i and SQL server on same machine ?
    2. If yes, what are the problems i may encounter during installation
    3. What should be hardware configuration for installing both databases in same machine like hard disk space, RAM speed etc,

    Hi,
    1. Yes you can do it.
    2. There shouldn't be any problems
    3. Depends on your needs
    Jarek

  • Installing Oracle Database and SQL Developer

    Hi, I was looking for some help/advice in regards to installing an Oracle Database and SQL Developer onto a Windows 7 32bit machine. I have been asked to create a database to store data that I create through reports in Excel so I am required to create a local database but not sure how to go about doing this. Also not sure if I install the Express Edition or Oracle Database 11g R2. If somebody could please advise on how I can get this started or even any links/tutorials that would guide me in how to get this installed with a localhost.
    Thanks in advanc.

    318f20b8-a3d0-4fb4-bb0f-73785250b7d4 wrote:
    Thanks guys, I have managed to install Oracle 11gR2 and I have setup a database using the dbca tool and I can connect to my new database. One thing that I have noticed is that when i look into my tables in sql developer i see loads of different tables i.e. def$_, logmnr_, etc and I am not sure why this is as I expected an empty tablespace.
    Thanks btw for all your help.
    One of the key principles of relational databases is that they use their own facilities to manage themselves.  That means the database management system uses the database to manage data about the database using exactly the same facilities (tablespaces, tables, user accounts, procedures, etc) that an application uses to keep data for the application. See "data dictionary"   So there is no such thing as a completely empty database.
    As said by others, you do NOT want to be creating your own tables under oracle's schemas (users) or in oracle's own tablespaces (esp. SYSTEM and SYSAUX).  Create your own user account/schema.  Create your own tablespace. Make that tablespace the default for that user.

  • APEX,PDF's, BI Publisher and SQL Query returning SQL code..

    I don't know if I should be posting this in this Forum or the BI Publisher forum, so I am posting in BOTH forums..
    I love APEX, let me say that first.. And appreciate the support offered here by the group, but am running int a confusing issue when BI Publisher tries to build a report from the above type APEX report..
    Here is my dilemma:
    I have a number of reports that are part of a Oracle package. They return an SQL Query back to a reports region on a page. I am having to deal with the column names returned are col01, col02..
    The issue I have is, when building the Application Level query to download the XML sample from in building RTF layouts in Word, you can not use this code, you MUST use a standard SQL Select.
    I have taken the sql from the function returning sql, and copied into the application query, supplying the required data values for bind variables being used in the query.
    An XML file is produced, and I use this to build the RTF format file that I load back into APEX and try to use it for the PDF rendering of the report. I can view the output as a PDF in the Word add on, but when I try using it with the report, it is returning an empty PDF file.
    Can anyone tell me what error log files on the bi publisher side I can look at to see what error is happening?
    Thank you,
    Tony Miller
    UTMB/EHN
    Title adjusted to allow people to know what I am talking about...
    Message was edited by:
    Tony Miller

    Tony,
    You can find the log as follows:
    - go to http://[yourserver]:[yourport]/em
    - logon to OC4J EM: oc4jadmin/[yourpassword]
    - click on "logs" at the bottom of the page
    - in the hgrid/tree, expand OC4J->home->Application
    xmlpserver
    - click on view log icon
    You can also observe what's going on in BI Publisher
    by going to the command prompt from where you started
    it.
    Or, as a third option, you can locate the file on
    your file system, depending on your setup, the path
    would be something similar to this:
    \oracle\product\10.2.0\bip\j2ee\home\application-deplo
    yments\xmlpserver\application.log
    With that said though, I don't expect you'll find
    much in there that would help with your particular
    problem. I suspect you either get no rows in your XML
    at runtime, due to some session state issues, or your
    XML structure does in fact not match your RTF
    template.
    I'm not quite following your problem description,
    i.e. when did you do what and are you associating
    your report layout with a report query or report
    region. So just some general notes, your query needs
    to be parseable at design-time, when exporting the
    XML, so that you get the XML file with the proper
    column names derived from your query. If you want to
    use your RTF template with a standard report region,
    you must export the XML file first using the advanced
    XML structure option. And of course the column names
    in your report query need to match the column names
    in your report region.
    Perhaps this helps you further diagnose what's going
    on, if you have additional information that could
    help, let me know. And if you could stage this on
    apex.oracle.com, I'd be happy to take a look.
    Regards,
    MarcMarc,
    Thanks for looking at this issue. Below find my remarks to your questions..
    Re: your query needs
    to be parseable at design-time, when exporting the
    XML, so that you get the XML file with the proper
    column names derived from your query.At the start of this process, the query code was a function in a package. The function was returning an SQL select statement, for a report region on a page. I took the select statement, built an application query to build a sample of the xml for BI Publisher desktop (Add-on for Word). The code was producing the usual Col01, Col02.. since at design time that is were the column names.
    When I then took the xml from this and built the rtf for loading into my APEX application.
    When testing the Application Query with this RTF report layout, I am getting PDF's. When using it with the report region sending an xml feed to BI Publisher I am getting nothing back.
    I have since taken the sql code and moved it back into the report region, and set the region to have a type of straight SQL Query. I have even tried to hard-code the parameters I was getting from the page to limit data returned.
    Is it possible to see the xml being produced by the APEX page?
    Re: Stage this on apex.oracle.com.. I would love to, but we would have HIPPA issues if I posted the data on a public website.
    Can I send you the RTF file and the xml file that the application query is creating to see if there something weird about them?
    Thank you,
    Tony Miller
    UTMB/EHN

  • APEX, BI Publisher and SQL Query (PL/SQL Function returning SQL Query)..

    I don't know if I should be posting this in this Forum or the BI Publisher forum, so I am posting in BOTH forums..
    I love APEX, let me say that first.. And appreciate the support offered here by the group, but am running int a confusing issue when BI Publisher tries to build a report from the above type APEX report..
    Here is my dilemma:
    I have a number of reports that are part of a Oracle package. They return an SQL Query back to a reports region on a page. I am having to deal with the column names returned are col01, col02..
    The issue I have is, when building the Application Level query to download the XML sample from in building RTF layouts in Word, you can not use this code, you MUST use a standard SQL Select.
    I have taken the sql from the function returning sql, and copied into the application query, supplying the required data values for bind variables being used in the query.
    An XML file is produced, and I use this to build the RTF format file that I load back into APEX and try to use it for the PDF rendering of the report. I can view the output as a PDF in the Word add on, but when I try using it with the report, it is returning an empty PDF file.
    Can anyone tell me what error log files on the bi publisher side I can look at to see what error is happening?
    Thank you,
    Tony Miller
    UTMB/EHN
    Title changed, maybe SOMEONE has an idea on this??
    Message was edited by:
    Tony Miller

    Hi,
    1/ first check you are passing the bind variables and
    appropriate values in the call to your report - if
    the query returns no data then you get an empty page
    So if your query takes :P10_USERNAME variable then
    pass it to the report in the URL
    f?p=&APP_ID.:0:&SESSION.:PRINT_REPORT=YOUR_REP_QUERY_N
    AME:::P10_USERNAME:MYUSER
    2/ try to use the Default layout first to check your
    report query really returns the data when called
    3/ if you defined a header in your rtf template check
    there is no & (ampersand) - if using & in the header
    and preview the template from word it displays data
    OK, but if you use this template in the report query
    it fails to render the data (bug in Apex-> Bi
    Publisher integration maybe?)
    4/ If using the table in the rtf template check its
    width does not overflow the page margins - there is a
    problem with pdf export
    5/ check
    /oc4j/j2ee/home/application-deployments/xmlpserver/app
    lication.log forthe information on BI Publisher runs
    RadoIssue was in the APEX page having issues.. I recoded a new page and am able to generate BI Publisher based PDF files..
    Thank you,
    Tony Miller
    UTMB/EHN

  • Creating A New Oracle Database And Sql Developer

    Hi,
    I'm a newbie to Oracle and and a not so newbie to Sql Server and Visual Studio.
    I am trying to learn Oracle on my local machine. I want to create a new Oracle Database and start learning from there.
    I have downloaded sql developer, the data modeler, and the Oracle Client. Could someone please provide some guidance on how to create a Oracle Database?
    From the responses, it appears that none of the items I mentioned actually creates a database. Sql Server provides a free download, also a developer version for a minimal fee. What specific Oracle product would be best to provide this type of service?
    Thanks,
    Mark
    Edited by: user8948230 on Jan 7, 2010 9:50 AM

    user8948230 wrote:
    Hi,
    I'm a newbie to Oracle and and a not so newbie to Sql Server and Visual Studio.
    I am trying to learn Oracle on my local machine. I want to create a new Oracle Database and start learning from there.
    I have downloaded sql developer, the data modeler, and the Oracle Client. Could someone please provide some guidance on how to create a Oracle Database?
    From the responses, it appears that none of the items I mentioned actually creates a database. Sql Server provides a free download, also a developer version for a minimal fee. What specific Oracle product would be best to provide this type of service?
    Thanks,
    Mark
    Edited by: user8948230 on Jan 7, 2010 9:50 AMIn addition to downloading and installing the database software to create a database, might I also suggest you start getting familiar with the documentation.
    Learning where to look things up in the documentation is time well spent investing in your career. To that end, you should drop everything else you are doing and do the following:
    Go to tahiti.oracle.com. Drill down to your product and version.
    Spend a few minutes just getting familiar with what is available here. Take special note of the "books" and "search" tabs. Under the "books" tab you will find the complete documentation library.
    Spend a few minutes just getting familiar with what kind of documentation is available there by simply browsing the titles under the "Books" tab.
    Open the Reference Manual and spend a few minutes looking through the table of contents to get familiar with what kind of information is available there.
    Do the same with the SQL Reference Manual.
    Do the same with the Utilities manual.
    You don't have to read the above in depth. They are reference manuals. Just get familiar with what is there to be referenced. Ninety percent of the questions asked on this forum can be answered in less than 5 minutes by simply searching one of the above manuals.
    After you have familiarized yourself with what is available, read the "2-Day DBA" manual to help get you started.
    Then set yourself a plan to dig deeper.
    - Read a chapter a day from the Concepts Manual.
    - Look in your alert log and find all the non-default initialization parms listed at instance startup. Then read up on each one of them in the Reference Manual.
    - Take a look at your listener.ora, tnsnames.ora, and sqlnet.ora files. Go to the Network Administrators manual and read up on everything you see in those files.
    - When you have finished reading the Concepts Manual, do it again.
    Give a man a fish and he eats for a day. Teach a man to fish and he eats for a lifetime.

  • How to replicate data  between Oracle db and SQL server dbs in real time?

    Hello,
    Anyone has idea that what tool we can use to do data replication in real time between Oracle and SQL sever or Oracle and Sybase or Sql server and Sybase?
    This is topic is brought by a project manager?
    I only know Oracle to Oracle dbs by streams or GoldenGate.
    Thanks
    Jerry

    Since GoldenGate's bread and butter was (and is) replicating data between heterogeneous data sources, and since Oracle has purchased GoldenGate, that would seem like a natural place to start.
    Beyond that, it depends on the architecture you want and how you define "real time." Just about any ETL tool on the market, whether Oracle's ODI or OWB or any number of third party products (Informatica, DataStage, etc) can handle "trickle feeds" from various data sources to a database target of your choosing. Different tools will have different sorts of integration with the source database, many will require that a bunch of triggers are created to track changes on the source systems.
    If you want Oracle to control the replication process (which doesn't really make sense if we're talking about replication from a non-Oracle database to another non-Oracle database), you can use the Oracle Transparent Gateway products to create database links from Oracle to the non-Oracle databases and query data on the source database periodically.
    Justin

  • Oracle Alert and subquery

    I am using sub query in oracle alert it is not working fine any person guide me

    select distinct
    employee_number,
    full_name,
    c.proposed_salary decode(substr(HR_GENERAL.DECODE_PEOPLE_GROUP(b.people_group_id),instr(HR_GENERAL.DECODE_PEOPLE_GROUP(b.people_group_id),'.')1,9),'Allowance',c.proposed_salary*25/100,'None%',0,0)+
    decode(substr(HR_GENERAL.DECODE_PEOPLE_GROUP(b.people_group_id),instr(HR_GENERAL.DECODE_PEOPLE_GROUP(b.people_group_id),'.',1,2)+1,4),'Allo',c.proposed_salary*15/100,'None',0,0) +
    decode(substr(HR_GENERAL.DECODE_PEOPLE_GROUP(b.people_group_id),instr(HR_GENERAL.DECODE_PEOPLE_GROUP(b.people_group_id),'.',1,4)+1,4),'None',0,200) as net
    INTO
    &EMPNO,
    &EMPNAME,
    &NET
    from per_all_people_f a , Per_all_assignments_f b,PER_PAY_PROPOSALS_v c
    where a.person_id = b.person_id
    and b.assignment_id = c.assignment_id
    AND c.element_name = 'Basic Salary'
    and c.pay_proposal_id = (select max(pay_proposal_id) from PER_PAY_PROPOSALS_v where ASSIGNMENT_ID =b.assignment_id
    and element_name = 'Basic Salary'
    and approved = 'Y')
    and
    DECODE (b.assignment_type,
    'E', hr_general.decode_lookup ('EMP_CAT', b.employment_category),
    'C', hr_general.decode_lookup ('CWK_ASG_CATEGORY',
    b.employment_category
    )='Labor'
    and TRUNC(sysdate) between a.effective_start_date and a.effective_end_date
    AND TRUNC(sysdate) between b.effective_start_date and b.effective_end_date
    and c.proposed_salary decode(substr(HR_GENERAL.DECODE_PEOPLE_GROUP(b.people_group_id),instr(HR_GENERAL.DECODE_PEOPLE_GROUP(b.people_group_id),'.')1,9),'Allowance',c.proposed_salary*25/100,'None%',0,0)+
    decode(substr(HR_GENERAL.DECODE_PEOPLE_GROUP(b.people_group_id),instr(HR_GENERAL.DECODE_PEOPLE_GROUP(b.people_group_id),'.',1,2)+1,4),'Allo',c.proposed_salary*15/100,'None',0,0) +
    decode(substr(HR_GENERAL.DECODE_PEOPLE_GROUP(b.people_group_id),instr(HR_GENERAL.DECODE_PEOPLE_GROUP(b.people_group_id),'.',1,4)+1,4),'None',0,200) >= 3000

  • Installing Oracle 10G and SQL Developer for Windows 7 Home Premium

    Hi Folks,
    I need your helping me in getting the correct Database installed for my Windows 7 .
    Can you please help me out in sending me the correct url for Oracle 10G Database & SQL Developer URL
    So i can install both and get on with it...
    Thanks ,
    satish.p

    user4789048 wrote:
    Hi Folks,
    I need your helping me in getting the correct Database installed for my Windows 7 .
    Can you please help me out in sending me the correct url for Oracle 10G Database & SQL Developer URL
    So i can install both and get on with it...
    Thanks ,
    satish.pWith the caveat (as already pointed out by Srini in this thread) that no Oracle product has ever been certified on any "home" edition of any version of Oracle ...
    If I were looking to download any product, I'd start by going to that company's web site (like, www.oracle.com) and look for a tab or link called "download". I'll bet if you did that, you'd find all sorts of goodies.
    But, again, since you are dealing with a "home" edition of Windows, you'll need to start by installing a virtual machine product -- VM Ware's "VMworkstation" or "VMplayer", or Oracle's VirtualBox. Then you can create a virtual machine running a supported OS. Oracle's own Linux (derived from Red Hat Linux) is also free.

  • Looking for and SQL query to match CTI OS agent login ID with the Directory Number (instrument)

    Hi All,
    I am looking for an SQL query to request the HDS database to find out which Directory Number / instrument  was associated with a specific CTI OS agent login ID.
    Has anyone done such a query before ?
    Thanks and Regards
    Nick

    Hi,
    this should work in 8.0 and 8.5:
    SELECT
    ag.PeripheralNumber AS [LoginID],
    al.Extension,
    al.LogoutDateTime
    FROM [instance]_hds.dbo.Agent_Logout al
    JOIN [instance]_awdb.dbo.Agent ag ON al.SkillTargetID = ag.SkillTargetID
    Of course, replace [instance] with the ICM instance.
    The query returns a table with three columns, first is the login ID aka PeripheralNumber, Extension is... well, the agent's extension, and LogoutDateTime is the timestamp when the agent logged out.
    G.

  • Discrepancy between Select Expert and SQL Query

    Greetings.  I am having an issue with a report, but I think it's more cosmetic and may not be causing a functional issue...
    When I go into the Report...Select Expert...Record, I see that my criteria for the report is .AND. logic.
    When I go into the SQL Query view, it shows .OR. logic...
    After I verify the database, the SQL query still does not get updated.  Saving and re-opening the report still does not update. 
    Is there any reason this will never match?  Thanks in advance.

    Sorry.  I am on Crystal 12.  Database is SQL 2005.
    I didn't think the detail mattered much, but the select expert shows:
    isnull({NONCONFORMANCE.CLOSED_DATE}) and
    not isnull({NONCONFORMANCE.PRODUCT_ID}) and
    not({NONCONFORMANCE.PRODUCT_ID}= '') and
    not({NONCONFORMANCE.PRODUCT_ID}= ' ')
    SELECT N.NCM_ID, N.NCM_DATE, N.PRODUCT_ID, N.CLOSED_DATE, N.ENTITY_ID
    FROM   NONCONFORMANCE N
    WHERE  N.CLOSED_DATE IS  NULL  AND N.PRODUCT_ID IS  NOT  NULL  AND  NOT (N.PRODUCT_ID='' OR N.PRODUCT_ID=' ') AND N.ENTITY_ID='CHI'
    Now that I look at how the SQL is generated (after cleaning up the statement), it's the negatives that got me.  I originally had a problem with the report that was pulling back blanks and spaces.  I made changes and I didn't pay close enough attention to what exactly changed in the SQL...  It appears to be the way the logic in the Select Expert is converted to SQL.
    I just need to start using Command more often and write my own SQL instead of using the Select Expert!!!

  • Transfering information between Oracle 8 and SQL Server 2000

    I want to transfer some of the data stored in 4 different tables in my Oracle database and easy as possible to my SQL Server 2000 database. I found the import option in SQL2k which uses ODBCconnection to the Oracle but it needs the migration suit as far as I know. At the downloadarea there are only plug-ins for SQL Server 7 but not 2000.
    Am I even on the right track or is there any other way of accomplishing this?

    is there any known problem if I install Oracle 10g EE
    on the same machine where Sql Server 2000 EE is
    install?It's presently undocumented, but some of the ORACLE.EXE process threads are known to get stuck in an infinite loop whenever a SQL Server database is running on the same box. The infinite loops cause the SQL Server database to eventually shutdown, and then the loops are broken and Oracle returns to normal. Stack traces have revealed something like this, which would suggest that the Oracle process is actually communicating with SQL Server:
    Oracle:  laughAtGirlieDatabase()  /* infinite loop */
    SQL:     exit();-)

  • HSODBC connectivity between ORACLE 10g and SQL Server 2008 R2

    Hi,
    I'm getting below error when using the DB link between Oracle (10.2.0.2 which is on Sun Sparc) and MS Sql server 2008 R2.
    ERROR at line 1:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Generic Connectivity Using ODBC][Microsoft][ODBC Driver Manager] Data source
    name not found and no default driver specified (SQL State: IM002; SQL Code: 0)
    ORA-02063: preceding 2 lines from SCOPEX.WORLD
    My Config files:
    On Sun Sparc 5.9 where Oracle server is running.
    TelemetryDB1 =
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=172.16.6.48)(PORT=1522))
    (CONNECT_DATA=(SID=TelemetryDB1))
    (HS=OK)
    Listener.ora file on Windows machine:
    TelemetryDB1 =
    (ADDRESS_LIST=
    (ADDRESS=(PROTOCOL=tcp)(HOST=172.16.6.48)(PORT=1522))
    (ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY))
    SID_LIST_TelemetryDB1 =
    (SID_LIST=
    (SID_DESC=
    (SID_NAME=TelemetryDB1)
    (ORACLE_HOME=C:\oracle\product\10.2.0\db_1)
    (PROGRAM=hsodbc)
    Tnsnames.ora file:
    TelemetryDB1 =
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=172.16.6.48)(PORT=1522))
    (CONNECT_DATA=(SID=TelemetryDB1))
    (HS=OK)
    initTelemetryDB1.ora file under ORACLE_HOME\hs\admin\
    HS_FDS_CONNECT_INFO = TelemetryDB1
    HS_FDS_TRACE_LEVEL = OFF
    We have created DNS with TelemetryDB1.
    I'm getting the above error for DB links between Oracle 10.2 and SQL Server 2008 R2. But the same, when configured for MS SQL server 2000 works fine without any issues.
    Please advise me to rectify the error. We've been working for the last couple of weeks.
    Regards,
    Sunil

    Sunil,
    You don't need an Oracle ODBC driver.
    The way it works is that in the gateway init<sid>.ora file, in your case initTelemetryDB1.ora, the parameter HS_FDS_CONNECT_INFO points to a system DSN. This DSN should then be configured to use an ODBC driver to connect to the non-Oracle database. So, in your setup when you want to access the SQL*Server 2008 database then the DSN should use an ODBC driver that can connect to a SQL*Server 2008 database. If you still use the initTelemetryDB1.ora file for the connection then the TelemetryDB1 DSN should be configured to access the SQL*Server 2008 database.
    However, there are a couple of problems with your actual setup -
    - the configuration you have - 10.2 RDBMS on a Sun machine and HSODBC on Windows - is not supported. HSODBC should only be used from a RDBMS that is in the same ORACLE_HOME as HSODBC.
    - 10.2 HSODBC is now desupported and has been replaced by the 11g Database Gateway for ODBC (DG4ODBC) and the configuration you want is supported. That is because unlike HSODBC the DG4ODBC gateway can be installed standalone with a RDBMS being installed.
    I recommend that you download and install 11.20.2 DG4ODBC on your Windows machine in a new Oracle_home and access that from the 10.2 RDBMS on Sun - which is a supported configuration. But to do this, you will need to apply either the 10.2.0.4 or 10.2.0.5 patchset to your RDBMS.
    There is more information in the following note available on My Oracle Support (MOS) -
    Note.1083703.1 Master Note for Oracle Gateway Products
    The 11.2.0.2 DG4ODBC can be downloaded from MOS as patch and for the gateways on Windows 32-bit you just need to download -
    p10098816_112020_platform_4of6.zip
    However, to check the HSODBC ou need to confirm that the DSN used by HSODBC points to a System DSN configured to access SQL*Server 2008.
    Have a look at -
    Note 109730.1 How to setup generic connectivity (HSODBC) for Windows NT
    But remember this is not a supported version or configuration and you should be using Dg4ODBC.
    Regards,
    Mike

Maybe you are looking for

  • Illustrator CS4 big files

    Hello, I've encountered issues with illustrator cs4 when creating banners or posters of 1mx2m, especially when exporting to jpg it says not enough memory. There are a number of problems with blurs even on small file sizes such as A4 documents. I neve

  • HT204053 icloud question

    hello there i have problem to sign in to icloud it says "the maximum number of free accounts have been activated on this iphone "please help me out of this

  • Problem to import file P2 (.mxf)

    Hi,  I have a problem during the import of P2 file: I go to file, import, i choose the folder, during the import, the progress screen shot crashes; I tried to import few clip at time and I found that only one clip makes the crash, it's the last clip

  • Source file for java.util.Vector not found ?

    Hi ! In the Source Editor, hold down the Ctrl key and move the mouse over a class identifier belonging to the NetBeans APIs. A hyperlink appears. Click on the hyperlink and the cursor jumps to the related NetBeans API class. (Alt--O) Can anybody tell

  • How do I backup shared folders in SIMS 4.0 with Legato NetWorker?

    They are not included in backup directory structure by 'mkbackupdir' tool.