SQL Report data Open link in URL

Hi,
Select 'Google' from dual
My requirement is when i click on Google Lable //http://www.google.com url must populate how to proive this using sql in apex please suggest.
Thanks
Sudhir.

Change the item to 'Display as text (does not save state)'.
Under 'Source' section, use 'static assignment'.
If you want 'Google' in seperate new window then put
<a href="http://www.google.com" target="_blank"> Google </a>as source value.
Or if you want 'Google' as Pop-up window then put
<a href="#" onclick="javascript:popupURL('http://www.google.com'); return false;" >Google </a>as source value.
This will do the trick :-)
Cheers,
Hari
Edited by: Hari_639 on Oct 9, 2009 12:36 PM

Similar Messages

  • Add Image column in classic sql report to open a pop page

    I have sql report I want to add a new column which will have image to click, Once user clicks the image a popup page should open.

    Hi Vikram,
    Sorry to bother you, I am very new to apex. Here is my sql query for sql report. Can you please help me.
    <xmp>select
    case
    when ISUPPORT_NUMBER is null or ISUPPORT_NUMBER = 'N/A' then '<a href="javascript:myFunc3(''' || MACHINE_NAME || ''')"><p style="font-weight:bold;color:#04B404;font-size:12px;">Enter SR Number</p></a>'
    else '<span style="background-color:red;font-weight:bold">'
    || ISUPPORT_NUMBER
    || '</span>'
    end ISUPPORT_NUMBER,
    case
    when ISUPPORT_NUMBER is not null and ISUPPORT_NUMBER != 'N/A' then '<a href="javascript:myFunc4(''' || MACHINE_NAME || ''')"><p style="font-weight:bold;color:#FF0000;font-size:14px;">'|| MACHINE_NAME ||'</p></a>'
    else '<a href="javascript:myFunc4(''' || MACHINE_NAME || ''')"><p style="font-weight:bold;color:#04B404;font-size:14px;">'|| MACHINE_NAME ||'</p></a>'
    end MACHINE_NAME,
    FUNCTION,
    VERSION,
    VENDOR_CLUSTER,
    case when used_by is null then '<a href="javascript:myFunc2(''' || MACHINE_NAME || ''')"><p style="font-weight:bold;color:#04B404;font-size:12px;">Avaliable</p></a>'
    when upper(used_by)=v('APP_USER') then '<a href="javascript:myFunc5(''' || MACHINE_NAME || ''')"><p style="font-weight:bold;color:blue;font-size:12px;">' || used_by || '</p></a>'
    else used_by
    end used_by,
    case
    when loaned_to is null and ( upper(used_by)=v('APP_USER') or used_by is null) then '<a href="javascript:myFunc(''' || MACHINE_NAME || ''')"><p style="font-weight:bold;color:#04B404;font-size:12px;">Avaliable</p></a>'
    when upper(used_by)=v('APP_USER') then '<a href="javascript:myFunc6(''' || MACHINE_NAME || ''')"><p style="font-weight:bold;color:blue;font-size:12px;">' || loaned_to || '</p></a>'
    else loaned_to
    end loaned_to,
    LOANED_TO_EXPIRY_DATE,
    LOAN_INFO,
    decode(SCAN_NAME,null,'<a href="javascript:myFunc3(''' || MACHINE_NAME || ''')"><p style="font-weight:bold;color:#04B404;font-size:12px;">More Details</p></a>','<a href="javascript:myFunc3(''' || MACHINE_NAME || ''')"><p style="font-weight:bold;color:#04B404;font-size:12px;">More Details</p></a>') SCAN_NAME,
    USERNAME,
    VNC_PASSWORD,
    LAST_UPDATED_BY , </xmp>
    <b>Here I want to add a image column where I can give a link like above to open popup </b>
    from install_dbqa_machines
    Edited by: Sivaramaraju on Jun 19, 2012 9:06 AM
    Edited by: Sivaramaraju on Jun 19, 2012 9:07 AM
    Edited by: Sivaramaraju on Jun 19, 2012 9:08 AM

  • SQL report link to another report

    Hello,
    I am using Apex 4 and trying to link an sql report with another report. If I were able to use an interactive report I could easily link that to another page, but that would require me to have a primary key. The problem is that I need to link a few tables. So two questions:
    1.) Can I link these via an HTML link to my other page? I would have a HTML link in my report that would link via URL parameter passing. So can I use HTML in a report?
    2.) What is the syntax for a parameter passing via URL? Here is my link that would be:
    a href= f?p=107:40:&APP_SESSION::::P40_NAME:MARK: Are there any other ways to accomplish this?
    Thanks,
    Mark
    Edited by: LondonMark on 23-May-2011 04:18
    Edited by: LondonMark on 23-May-2011 04:20

    I am using Apex 4 and trying to link an sql report with another report. If I were able to use an interactive report I could easily link that to another page
    It's easy in standard reports< /a>. (Ignore the "Interactive Report" typo in step 1.)
    1.) Can I link these via an HTML link to my other page? I would have a HTML link in my report that would link via URL parameter passing. So can I use HTML in a report?You can, but it's better practice to keep data retrieval and HTML structure separate when possible&mdash;in this case by using declarative Column Links.
    2.) What is the syntax for a parameter passing via URL?This is also covered in the documentation.
    Here is my link that would be: a href= f?p=107:40:&APP_SESSION::::P40_NAME:MARK:
    {quote}
    That looks to have the order of the parameters correct, but it's missing some syntax:<a href="f?p=107:40:&APP_SESSION.::::P40_NAME:MARK">...</a>
    The static text exact substitution method of referencing the value of an APEX item requires a terminating dot ("."): <tt>&APP_SESSION.</tt>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • When i open my SQL reporting URL it says this page cannot be displayed

    Hi All,
    I am using SQL Server 2008 with SP3. When i open my open my reporting manager URL. i get the error as "This page cannot be displayed" HTTP Error 500 internal server error. I read few blogs posted below. Tried both but could not help me out
    http://social.technet.microsoft.com/Forums/en-US/1a03196f-f8ee-4a66-b08b-b2e02447a25e/can-not-open-page-for-report-manager-url-httplocalhost8080reports-for-sql-server-2008?forum=sqlreportingservices
    and 
    http://ashwaniashwin.wordpress.com/2014/02/28/the-url-has-already-been-reserved-error-while-configuring-the-report-server-url-in-reporting-services-configuration-manager/
    But none of them helped.
    I tried deleting the reserved URL and re reserved but still did not help.
    Tried changing the port number but still no luck.
    I analysed the sql reporting error log and found the below.
    ===============================================
    library!ReportServer_0-1!ad4!06/07/2014-03:30:52:: Call to GetSystemPropertiesAction().
    ui!ReportManager_0-2!fbc!06/07/2014-03:30:54:: e ERROR: Unable to validate data.
    ui!ReportManager_0-2!fbc!06/07/2014-03:30:54:: e ERROR: HTTP status code --> 500
    ===============================================
       at ReportingServicesHttpRuntime.BaseWorkerRequest.FilterAndThrowException(Exception e, String message)
       at ReportingServicesHttpRuntime.RsWorkerRequest.GetUserToken()
       at System.Web.HttpContext.get_ImpersonationToken()
       at System.Web.ClientImpersonationContext.Start(HttpContext context, Boolean throwOnError)
       at System.Web.HttpApplication.ThreadContext.SetImpersonationContext()
       at System.Web.HttpApplication.ThreadContext.Enter(Boolean setImpersonationContext)
       at System.Web.HttpApplication.OnThreadEnterPrivate(Boolean setImpersonationContext)
       at System.Web.HttpApplication.ApplicationStepManager.ResumeSteps(Exception error)
    library!ReportServer_0-1!e0c!06/07/2014-03:30:49:: Call to GetItemTypeAction(/).
    library!ReportServer_0-1!f10!06/07/2014-03:30:49:: i INFO: Catalog SQL Server Edition = Enterprise
    library!ReportServer_0-1!e0c!06/07/2014-03:30:49:: i INFO: Catalog SQL Server Edition = Enterprise
    crypto!ReportServer_0-1!e0c!06/07/2014-03:30:49:: i INFO: Initializing crypto as user: E2K\Lg161489
    crypto!ReportServer_0-1!e0c!06/07/2014-03:30:49:: i INFO: Exporting public key
    crypto!ReportServer_0-1!e0c!06/07/2014-03:30:49:: i INFO: Performing sku validation
    crypto!ReportServer_0-1!e0c!06/07/2014-03:30:50:: i INFO: Importing existing encryption key
    library!ReportServer_0-1!e0c!06/07/2014-03:30:50:: Call to ListParentsAction(/).
    library!ReportServer_0-1!e0c!06/07/2014-03:30:50:: Call to ListChildrenAction(/, False).
    webserver!ReportServer_0-1!e0c!06/07/2014-03:30:50:: i INFO: Processed folder '/'
    library!ReportServer_0-1!ad4!06/07/2014-03:30:51:: Call to GetPermissionsAction(/).
    library!ReportServer_0-1!f10!06/07/2014-03:30:51:: Call to GetPropertiesAction(/, PathBased).
    library!ReportServer_0-1!ad4!06/07/2014-03:30:52:: Call to GetSystemPermissionsAction().
    library!ReportServer_0-1!f10!06/07/2014-03:30:52:: Call to ListChildrenAction(/, False).
    library!ReportServer_0-1!ad4!06/07/2014-03:30:52:: Call to GetSystemPropertiesAction().
    library!ReportServer_0-1!f10!06/07/2014-03:30:52:: Call to GetSystemPropertiesAction().
    library!ReportServer_0-1!ad4!06/07/2014-03:30:52:: Call to GetSystemPropertiesAction().
    ui!ReportManager_0-2!fbc!06/07/2014-03:30:54:: e ERROR: Unable to validate data.
    ui!ReportManager_0-2!fbc!06/07/2014-03:30:54:: e ERROR: HTTP status code --> 500
    I have also attached all the logs in a FTP for further analysis. Please download it from the below link.
    https://depositfiles.com/files/cfe6af33b
    Can any one please help me. Seems to be a never ending issue to me.

    Take a look on link
    http://pcsupport.about.com/od/findbyerrormessage/a/500servererror.htm
    In case If you rebuilt the server then then linking will break , go in encryption keys option if only delete button is enabled, and backup button is disabled the delete the keys .close the report configuration manager and reopen the manager .Now try
    to open report manager url. 
    Please click "Propose
    As Answer" if a post solves your problem, or "Vote
    As Helpful" if a post has been useful to you

  • "Open sql" report no data sourced defined in windows

    when I want to import data from sql database, the Open sql window report error
    "There are no data sourced defined. Please create one to continue",
    but I have defined the odbc data source using windows 's odbc administrator, why the error?
    chuliang

    A couple of possibilities.
    First are you licensed for Sql interface? If not, you might get that message.
    Second, where did you create the ODBC connection on your computer or the server. It has to be on the server.
    Third, did you create the odbc as a system driver? it needs to be so
    Fourth, what operating system? If it's unix or AIX there is a hole bunch more you need to do to get odbc connections working. If it's windows, it's pretty easy.
    Fifth, did you test the connection before trying it in Essbase?

  • Insert a link on xml report. The link should open up a document(PDFS).

    Is it possible to insert a link in the report? The value would come from a sql query. The link when clicked on would open up the pdf or doc.
    Is this done thru a href or by inserting a dynamic hyper link.
    The release Release 5.6.2 documentation references how to insert a hyperlink. NOt sure if this will work for me.
    I tried it but in the documentation it states:
    >
    If your input XML data includes an element that contains a hyperlink or part of
    one, you can create dynamic hyperlinks at runtime. In the Type the file or Web page
    name field of the Insert Hyperlink dialog box, enter the following syntax:
    {URL_LINK}
    where URL_LINK is the incoming data element name.
    >
    However the dialog box I am getting when I insert the hyperlink does not have a place to enter the element name. That is, there is no 'TYPE the file or Web page' area that I can see.

    hi ashalon,
    I did it this way in MS Word.
    1. create placeholder for value
    2. highlight it and make it a hyperlink
    3. enter the url into the address line
    So If you have a complete hyperlink in xml element URL_LINK you just have to enter {URL_LINK} into the address line. If you have only a part of the link, i.e only a product name, you can enter "http://www.oracle.com?product={PRODUCT_NAME}".
    Hope this helps.
    Regards
    chrissy

  • Service manager console can't connect to Service manager data warehouse SQL reporting services

    When I start Service manager console, it gives this kind of error:
    The Service Manager data warehouse SQL Reporting Services server is currently unavailable. You will be unable to execute reports until this server is available. Please contact your system administrator. After the server becomes available please close your
    console and re-open to view reports.
    Also in EventViewer says:
    cannot connect to SQL Reporting Services Server. Message= An unexpected error occured while connecting to SQL Reporting Services server: System.Net.WebException: The request failed with HTTP status 401: Unauthorized.
    at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
    at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
    at Microsoft.EnterpriseManagement.Reporting.ReportingService.ReportingService2005.FindItems(String Folder, BooleanOperatorEnum BooleanOperator, SearchCondition[] Conditions)
    at Microsoft.EnterpriseManagement.Reporting.EnterpriseReporting.FindItems(String searchPath, IList`1 criteria, Boolean And)
    at Microsoft.EnterpriseManagement.Reporting.EnterpriseReporting.FindItems(String itemPath)
    at Microsoft.EnterpriseManagement.Reporting.EnterpriseReporting.FindItem(String itemPath, ItemTypeEnum[] desiredTypes)
    at Microsoft.EnterpriseManagement.Reporting.EnterpriseReporting.GetFolder(String path)
    at Microsoft.EnterpriseManagement.Reporting.EnterpriseReportingGroup.Initialize()
    at Microsoft.EnterpriseManagement.Reporting.ServiceManagerReportingGroup..ctor(DataWarehouseManagementGroup managementGroup, String reportingServerURL, String reportsFolderPath, NetworkCredential credentials)
    at Microsoft.EnterpriseManagement.Reporting.ServiceManagerReportingGroup..ctor(DataWarehouseManagementGroup managementGroup, String reportingServerURL, String reportsFolderPath)
    at Microsoft.EnterpriseManagement.UI.SdkDataAccess.ManagementGroupServerSession.TryConnectToReportingManagementGroup() Remediation = Please contact your Administrator.
    We have a four server set-up where SCSM, SCDW, and sqls for both are on different servers. Also I have red that this could be a SPN problem, but this has  been worked on last week without the SPNs.

    On the computer you get the "SQL Reporting Services server is currently unavailable" message please open the Internet Explorer and try to connect to the URL <a href="http:///reports">http://<NameOfReportingServer>/reports
    This should open the reporting website in IE. If this isn't working you should check the proxy settings in IE. If the URL doesn't work in IE it won't work in the SCSM console as well (and vice versa).
    Andreas Baumgarten | H&D International Group
    Actually I can't access to the reporting website. It asks me credentials 3 times and then return a blank page. Also error message comes to the EventViewer System log with id 4 and source Security-Kerberos.
    The Kerberos client received a KRB_AP_ERR_MODIFIED error from the server "accountname".
    The target name used was HTTP/"reporting services fqn". This indicates that the target server failed to decrypt the ticket provided by the client.
    This can occur when the target server principal name (SPN) is registered on an account other than the account the target service is using.
    Ensure that the target SPN is only registered on the account used by the server.
    This error can also happen if the target service account password is different than what is configured on the Kerberos Key Distribution Center for that target service.
    Ensure that the service on the server and the KDC are both configured to use the same password.
    If the server name is not fully qualified, and the target domain (domain.com) is different from the client domain (domain.com), check if there are identically named server accounts in these two domains,
    or use the fully-qualified name to identify the server.
    I can access the website directly from the server which hosts Reporting Services.
    Also I query "setspn -Q HTTP/"reporting services fqn" whit result NO SUCH SPN FOUND.

  • Sharepoint 2013 Reporting services not fetching data via linked server

    We have a functional SharePoint 2013 farm in production with WFE (Server 1 , windows server 2012) and WFE ( Server 2 , windows server 2012) and SharePoint databases including report server databases on  (Server 3, which SQL Server 2012 on windows
    server 2012)
    Kerberos Authentication is enabled and Windows Authentication happens. Claims to Windows Service seems to work correctly too. No double hop issue. The SharePoint Reporting Services seem to be configured correctly and Reports get generated as expected
    in the following cases.
     1. If data is being pulled from Server A (SQL Server 2008 R2 Server on Windows Server 2008), Report gets generated no issues.
     2. If data is being pulled from Server B (SQL Server 2008 R2 Server on Windows Server 2008), Report gets generated no issues.
    The problem:-
    We have a view on Server A, which is fetching data from Server B. This report does not get generated. Gives an NT/Authority logon failure. Server B is created as a linked Server on Server A. The setting to run under users security context is checked.
    If I execute Query Builder from Report Builder 3.0, the query on the view gets the data and data is displayed in the report for next 10-15 min but after that the connections gets lost or if the user logs out and logs back in, the connection is lost
    again.
    Has some one experienced a issue like this? Can a report not work on a view getting data from linked server? Or I have missed  some thing really important.
    Any help is highly appreciated?
    cheers!
    Rachna
    Rachna

    Hi,
    From your description, my understanding is that you got an error when you clicked System settings after configuring Reporting Services service application.
    What size did you use for the memory? Please make sure the server has enough memory to run SharePoint and all services.
    In addition, please open
    http://localhost:xxxxx/SecurityTokenServiceApplication/securitytoken.svc to check if there is something about this issue.
    Here is a similar post about this issue, please take a look at:
    http://whitepages.unlimitedviz.com/2012/07/setting-up-reporting-services-2012-with-sharepoint-2013/
    As this issue is about Reporting Services, I suggest you create a new thread on SSRS forum, more experts will assist you with SSRS.
    SSRS forum:
    https://social.technet.microsoft.com/Forums/office/en-US/home?forum=sqlreportingservices
    Best Regards,
    Wendy
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Show prompts before opening a new report using action links

    Hi,
    I have a report that's grouped on a particular GROUP_ID and the current month. On clicking the GROUP_ID on the report, I need to open a new report that displays data for that month but on date level. Since we have a lot of data at date level (>100,000), I wanted a drop down on the top of the report that has all dates in that month and clicking on a particular date, the data in the pivot table is fetched.
    I tried using the pivot table prompt but that seems to fetch all the data first and then creates a drop down prompt. Is there a way where we could fire the query only on choosing a particular date.
    Is there any other way we could do this?
    Regards.

    You're saying to add a dashboard prompt for Month and Date? When opening reports using Action links, I am not able to see the prompts.
    I am using Go URLs in Action links and that data for a month is >100,000. So, I want to show the data for the month and the first date of that month.
    I really don't know whether such thing is possible or not. I just want to restrict the data to the first day of the month. Rest of the data is queried when user selects a different date from the drop down.

  • Pop up text on clicking link on a sql report

    Hi
    I'm using apex 3.2
    I've a sql report like below
    taskId(edit) Task_details Notes owner .....
    What I want to do is if I click on taskId which is edit link ,pop up text box should open where I can add notes to that row.
    How can I achive this?
    Thanks in advance

    Hi,
    Take a look at the following blog posts and see if they can help you get what you are looking for (there are sample applications in them showing the functionality):
    http://monkeyonoracle.blogspot.com/2010/07/modal-pop-up-with-dynamic-actions.html
    http://www.danielmcghan.us/2008/12/popup-in-report.html
    Hope that's useful for you.
    Regards,
    Sergio

  • Date syntax for MySql query in SQL Reporting Services

    I am currently trying to link a mysql Stored Procedure to a Microsoft SQL Reporting Server. It is coming up with a Syntax error. I believe this is down to the
    Date_from and Date_to Parameters. The query is below any help would be appreciated 
    DELIMITER $$ 
    USE `mydb`$$ 
    DROP PROCEDURE IF EXISTS `DTI`$$ 
    CREATE DEFINER=`linkeduser`@`%` PROCEDURE `DTI`(IN date_from DATETIME, 
    IN date_to DATETIME) 
    BEGIN 
    SELECT title,gender,firstname,lastname,address1,town,postcode,dob,IF(co.start_date = '00-00-0000', '', CAST(DATE(co.start_date) AS DATE)) AS 'StartDate' 
    FROM cf_user AS us 
    JOIN ca_compliance AS co ON co.user_id = us.user_id 
    WHERE co.start_date BETWEEN date_from AND date_to; 
    END$$ 
    DELIMITER ;

    Hello,
    The dataset query runs on the external data source.
     In your case, you create a report by retrieve data from MySQL database with a stored procedure. The stored procedure will run on MySQL Server and return the result in the Report designer or Report Builder. To solved this issue, please execute the stored
    procedure on the MySQL database and check the syntax error.
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Need Help in opening a Link or URL

    Hi,
    I need help in opening a URL (on the same server where CLM application is deployed). I have added a Button on ToolBar and added the code. but it's not working. the same java program is working on my local system. below is the code.
    import java.io.*;
    import java.util.*;
    public class FileOpen
           public static void main(String[] args)       
                 FileOpen deleteList = new FileOpen();
                 String url="http://www.google.com/";
                   try {
                        String[] cmd = new String[4];
                        cmd[0] = "cmd.exe";
                        cmd[1] = "/C";
                        cmd[2] = "start";
                        cmd[3] = "c:
    amd_SCCMLog.txt";
                        System.out.println(" cmd"+cmd);
                        Process p = Runtime.getRuntime().exec(cmd);
                        System.out.println(" cmd1"+cmd);
                        Process process = Runtime.getRuntime().exec("notepad");
                        System.out.println(" cmd2"+cmd);
                        } catch (IOException ioe)
                             ioe.printStackTrace();
                 //System.out.println("Memberfarm: " + memberFarm);       
    Regards,
    Puneet Aggarwal

    Hi Puneet,
    What exactly are you trying to do? Can you describe where in the system you are doing it? There are different options....
    What about a document report with a link to the Web site URL you want to open?
    What about a read-only URL field on the document, populated with the URL you want to open?
    What about the desktop links channel?
    Lots of different ways to skin that cat (sorry cat lovers) ..your code looks like it might be the most difficult approach.
    -Howie Wexler
    www.craftysystems.com

  • Using firefox 14.0.1. Loading a link using right-click and "Open Link In New Window", results in new window opening but address bar does not show URL..

    Using firefox 14.0.1. Loading a link using right-click and "Open Link In New Window", results in new window opening but address bar does not show URL. However, if I right click on a link and select "Open Link In New Tab", the Tab shows URL in address bar. So it's working when it's a New Tab but not a New Window.

    The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information.
    Note: ''This will cause you to lose any Extensions, Open websites, and some Preferences.''
    To Reset Firefox do the following:
    #Go to Firefox > Help > Troubleshooting Information.
    #Click the "Reset Firefox" button.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
    Did this fix your problems? Please report back to us!

  • How to compare two tables data...need sql report or utility to find differe

    Hi,
    We have a requirement where we are asked to find data differences between two tables and one of the tables reside on remote database. The database version is same ( 10g ) and datatypes for the tables are similar.
    The client is looking for a sql report or kind of utility to display the data differences for each column ( if possible count differences ) with some meaningful error messages.
    Could anyone let me know the best possible way of doing it..?
    Thanks
    Hitarth

    Hi,
    I found something for tables comparison but getting one error...can you check this please and let me know what is wrong
    Here is the function:
    CREATE OR REPLACE FUNCTION compare_query_results (
    p_query1 IN VARCHAR2
    , p_query2 IN VARCHAR2
    , p_raise_error_if_not_equal IN BOOLEAN DEFAULT FALSE
    , p_raise_error_if_no_rows IN BOOLEAN DEFAULT FALSE
    RETURN NUMBER
    IS
    -- Constants
    c_query_results_equal CONSTANT PLS_INTEGER := 0;
    c_query_results_not_equal CONSTANT PLS_INTEGER := 1;
    oracr CONSTANT VARCHAR2 (1) := CHR (10);
    -- Variable Declaration
    v_sql_stmt VARCHAR2 (32767);
    v_record_count PLS_INTEGER;
    v_return_code PLS_INTEGER;
    v_record DUAL.dummy%TYPE;
    v_result_set_has_rows BOOLEAN;
    -- Ref Cursors
    v_cursor sys_refcursor;
    -- Custom Defined-Exceptions
    result_sets_do_not_match EXCEPTION;
    query_returns_no_rows EXCEPTION;
    BEGIN
    -- Get the count of differing records between p_query1 and p_query2
    dbms_output.put_line('Start-1');
    v_sql_stmt :=
    ' (SELECT /*+ materialize */'
    || SUBSTR (p_query1, INSTR (UPPER (p_query1)
    , 'SELECT'
    , 1
    , 1
    ) + 6)
    || ')
    , (SELECT /*+ materialize */'
    || SUBSTR (p_query2, INSTR (UPPER (p_query2)
    , 'SELECT'
    , 1
    , 1
    ) + 6)
    || ')
    SELECT ''X''
    FROM (
    (SELECT * FROM test1 MINUS SELECT * FROM test2)
    UNION ALL
    (SELECT * FROM test2 MINUS SELECT * FROM test1)
    dbms_output.put_line('Start-2');
    OPEN v_cursor
    FOR v_sql_stmt;
    dbms_output.put_line('Start-3');
    FETCH v_cursor
    INTO v_record;
    dbms_output.put_line('Start-4');
    v_result_set_has_rows := v_cursor%FOUND;
    dbms_output.put_line('Start-5');
    CLOSE v_cursor;
    dbms_output.put_line('Start-6');
    -- If there are rows - the result sets do NOT match...
    IF v_result_set_has_rows
    THEN
    v_return_code := c_query_results_not_equal;
    IF p_raise_error_if_not_equal
    THEN
    RAISE result_sets_do_not_match;
    END IF;
    -- If there are no rows - the result sets do match...
    ELSIF NOT v_result_set_has_rows
    THEN
    IF p_raise_error_if_no_rows
    THEN
    -- Check to make sure that the queries contain rows if desired...
    v_sql_stmt := 'SELECT ''X''
    FROM (' || oracr || p_query1 || oracr || ')';
    OPEN v_cursor
    FOR v_sql_stmt;
    FETCH v_cursor
    INTO v_record;
    IF v_cursor%NOTFOUND
    THEN
    CLOSE v_cursor;
    RAISE query_returns_no_rows;
    END IF;
    CLOSE v_cursor;
    END IF;
    v_return_code := c_query_results_equal;
    END IF;
    RETURN v_return_code;
    EXCEPTION
    WHEN result_sets_do_not_match
    THEN
    raise_application_error (-20101, 'The Queries'' result sets do NOT match. Error returned
    as requested.');
    WHEN query_returns_no_rows
    THEN
    raise_application_error (-20102, 'The Queries'' result sets match, however they contain no
    rows. Error returned as requested.');
    WHEN OTHERS
    THEN
    -- Raise the error
    raise_application_error (-20103
    , 'There is a syntax or semantical error in one or both queries
    preventing comparison.'
    || oracr
    || 'Error Stack :'
    || oracr
    || DBMS_UTILITY.format_error_stack ()
    || oracr
    || 'Error_Backtrace:'
    || oracr
    || DBMS_UTILITY.format_error_backtrace ());
    END compare_query_results;
    I have created two tables ( test1 and test2 ) with few columns and with the same datatypes and executed the above function...I am getting error as folliowing:
    DECLARE
    ERROR at line 1:
    ORA-20103: There is a syntax or semantical error in one or both queries
    preventing comparison.
    Error Stack :
    ORA-00900: invalid SQL statement
    Error_Backtrace:
    ORA-06512: at "ORAOWNER.COMPARE_QUERY_RESULTS", line 53
    ORA-06512: at "ORAOWNER.COMPARE_QUERY_RESULTS", line 121
    ORA-06512: at line 12
    Could someone please help me fixing this error..It would be really appreciated
    Thanks
    Hitarth

  • Sql report, How to access current rows 6 columns data

    I have one page having page items & SQL report having 8 columns.
    First column of report is a link for editing.
    on clicking first column, that record gets displayed on page items, which are opn same page.
    Now my problem is i have used link column of report and set 3 page items value on click of link column.\
    But i need to set values for 2 more page items.
    I tried to create computation & process but not working. i am confused about which process point to select & whether onclick page gets submitted or not.
    I tried to write jscript but not succeeded. I dont know how to get current row id in jscript & different column values of current rowid.
    any help.

    Hi,
    Thanks for reply.
    in 5 items, first three are numeric and last two are timestamp fromtime, totime.
    as I mentioned earlier if i interchange 4 & 5 items i.e. now ITEM4 is totime & ITEM5 is fromtime
    and their values. I get value for totime & not for fromtime. all records contain values for all 5 columns. no null.
    So basically their is no problem in value or data, The only problem is whatever sequence is maintained first 4 items get value & 5th item remains blenk.
    Either I type all 5 ITEM NAMES in one Item name-value pair of link or use all three pairs, 5th ITEM remain blank.

Maybe you are looking for

  • Not sure if i should get one

    I want a macbook,i really do. But its getting closer and closer to the time that im planning on buying one, and im not sure if i should get one yet. Im a sophmore in highschool, and i need a computer for highschool. I know im going to end up getting

  • I movie  "The operation could not be completed. No other information is available about the problem." any suggestions?

    Bought i movie for my macbook pro. it crashed, now i can't use it "The operation could not be completed. No other information is available about the problem." any suggestions?

  • IPod is like not working..PLEASE HELP!

    OK--my iPod was working FINE yesterday..and today I turned it on..and BAM..nothing works..well almost nothing..I can lay music..but the MENU button doenst work...so basically I cant "go back" at all...and it wont even turn off...does anyone know what

  • Hi! My Iphone 4 is showing no service

    Dear Officer Since last 3-4 days, I am facing problem with Signal. Suddenly i am receiving NO SERVICE. I have check with service provider change the sim card too. But still the problem remain same. Requesting you to kindly guide us. with regards, Pav

  • Contacts not deleting -- how to erase?

    There are about 1000 contacts on my iPhone that won't delete no matter what I do. Some are duplicates of contacts I have, others are contacts I've deleted from my Address Book -- but they persist on the iPhone. I've restored the iPhone software sever