Problem with SQL Script in report

Post Author: danish
CA Forum: Data Connectivity and SQL
Hi
Can someone tell me why I'm not getting the right answer.Basically I want to pick up all creditors invoices that have been invoiced to the 31/12/2007 and then I don't want to count those that have been paid before the 31/12/2007 and therefore getting a listing of creditors with just the outstanding invoices up to a certain date.
This is what I'm currently got defined as my selection script, but I keep getting every invoice up to 31/12/2007.
SELECT vCreditorTransactions.InvoiceDueDate, vCreditorTransactions.InvoiceDescription, vCreditorTransactions.InvoiceNumber, vCreditorTransactions.GLFullCode, vCreditorTransactions.GLDescription, vCreditorTransactions.GLAmount, vCreditorTransactions.NameSortSequence, vCreditorTransactions.CreditorID, vCreditorTransactions.CreditorPayeeName, vCreditorTransactions.InvoiceDate, vCreditorTransactions.GrossAmount, vCreditorTransactions.TaxAmount FROM   SynergyOneFinance.dbo.vCreditorTransactions vCreditorTransactions  WHERE  InvoicePostingDate <= '31 Dec 2007' AND ISNULL(ChequePostingDate,'9999-01-01') <= '31 Dec 2007'ORDER BY vCreditorTransactions.CreditorPayeeName, vCreditorTransactions.CreditorID
Regards Torben

Post Author: pvierheilig
CA Forum: Data Connectivity and SQL
Another consideration will be to make certain all date formats used for comparisons in your SQL are in the same format.  Are you able to run the SQL statement in some other program against your database and have the desired results returned?

Similar Messages

  • BPA_DEMO - Problem With SQL Scripts

    Hi,
    In order to understand BPA functionality i have downloaded
    1.oracle_BPA_SUite_10.1.3.4_download.zip
    2.oracle BPA Suite 10.1.3.4 Sample
    I am trying to setup the BPA Suite and execute the Case Study in the sample -oracle BPA Suite 10.1.3.4 Sample.
    But the sql scripts requuired does not have create table scripts. the SQl scripta are placed in oracle_BPA_SUite_10.1.3.4_download.zip\samples\sql. The Scripts are:
    1.createSchema.sql
    2.populateSchemaTables.sql
    These scripts have the code for creating users and datas to be inserted in the tables but they donot have the code for creating these tables.
    If anyone has got the code to create those tables then please post.

    There's a specific [SQL Developer Forum|http://forums.oracle.com/forums/forum.jspa?forumID=260] where they're probably more knowledgeable of that tool, or readily available to give you an adequade response, if you don't mind reposting there.

  • Problem With SQL Query (updateable report)

    Hi,
    I have a report which I have set as type 'SQL Query (updateable report)'. I have added a 'row selector' to the report but when I run it I get the following error message:
    failed to parse SQL query:
    ORA-00904: "COL60": invalid identifier
    The report works fine if I remove the row selector. Any ideas as to why the error is being produced?
    Cheers
    Simon

    I don't have the apex_application.g_f01(i) referenced in the page source...In the page source you wouldn't find anything by that name
    Identify the tabular form's checkbox column in the page(firebug/chrome developer panel makes this easy)
    It should be like
    &lt;input id=&quot;...&quot; value=&quot;&quot; type=&quot;checkbox&quot; name=&quot;fXX&quot; &gt;we are interested in the name attribute , get that number (between 01 and 50)
    Replace that number in the code, for instance if it was f05 , the code would use
    apex_application.g_f05
    --i'th checked record' primary keyWhen you loop through a checkbox array, it only contains the rows which are checked and it is common practice to returns the record's primary key as the value of the checkbox(available as the the i'th array index as apex_application.g_f05(i) , where i is sequence position of the checked row) so that you can identify the record.

  • SHAREPOINT 2013 WITH SQL SERVER 2012 REPORTING SERVICES - NOT WORKING

    The SQL 2012 with SP1 is installed but the Reporting Services are not working and not able to connect the Sharepoint with it.
    i also TRIED TO install THE ADD-ON (rsSharePoint.msi) but it doesn't connect and show the Sharepoint Mode and cannot connect the Reporting services.
    If I install the Reporting Native feature then the reporting service config displays the Instance else doesn't show and connect to the sql server.
    But I am able to access the Configuration manager and TCP/IP are enabled.
    I have installed SQL 2012 and Sharepoint 2013. Please revert soon.
    Tks - Vinay

    Reporting Service
    http://msdn.microsoft.com/en-us/library/jj219068.aspx
    http://blogs.msdn.com/b/biblog/archive/2012/12/04/installing-and-configuring-sql-reporting-services-on-sharepoint-2013.aspx
    http://blogs.msdn.com/b/psssql/archive/2011/02/18/sharepoint-adventures-setting-up-reporting-services-with-sharepoint-integration.aspx
    http://dinesql.blogspot.in/2010/06/configuring-reporting-services-2008-r2_07.html
    http://www.codeproject.com/Articles/355461/Dynamically-Pointing-to-Shared-Data-Sources-on-SQL
    http://www.heysharepoint.com/problems-with-sql-2012-reporting-services/
    http://andrewcbancroft.com/2012/06/30/troubleshooting-sql-server-2012-reporting-services-and-sharepoint-2010-integration-part-1/
    Please find the helping URL
    Thanks
    Jaison A
    http://infomoss.blogspot.in

  • Little execution problem with the script

    declare
    i number(1):=1;
    name varchar2(10);
    id number(2);
    begin
    loop
    id:=&id;
    name:='&name';
    insert into emp values(id,name);
    i:=i+1;
    exit when id<=5;
    end loop;
    end;
    When i tried to execute the script, it is going through the loop only once..What the problem with this script...Can any body help the script work?

    if id is less or equal to 5 then loop will execute only once.
    What is the variable i for ?

  • Problem with SQL connection and a Collection

    hi all,
    I have two problems with sql...
    1. how can I assign the values of a resultset to a collection?
    2. how can I close the sql connection, because when I close the statement and connection error shows me in the resultset
    thanks!

    Hello Pablo,
    RetrivingResults In Collection:
    1)   use getObject method, and assign it to collection.
              Collection c_obj=new ArrayList();
             while(rs.next())
                    c_obj.add(rs.getInt(Project_ID), rs.getString(Project_Name));
    Closing ResultSet
    2)               The close() methos of ResultSet closes the ResultSet object, like bellow
                    ResultSet rs = stmt.executeQuery("SELECT a, b FROM TABLE2");
                    rs.close(); //Closes the result set

  • Problem with a script to remove graphics

    Hello,
    I have tried to build a javascript to remove all graphics whose extension is not ".EPS" (with "EPS" really in upper cases, as it is for Mathtype equations in Word import).
    But It doesn't work and I can't understand why.
    Here is the script:
    //The script intend to remove all graphics whose extension is not ".EPS"
    var myDoc = app.activeDocument;
    var myGraphics = myDoc.allGraphics
    //Remove graphic if graphic extension is different from ".EPS"
    for (var p = 0; p < myGraphics.length; p++) {
        var myImage = myGraphics[p]
        if (CheckExtEps(myImage) != 0){
        myImage.remove ()
    //Compare graphic extension with ".EPS" and return myExtValue = 0 if it matches exactly
    function CheckExtEps(myImage) {
        var  myString = myImage.name
        myExt = myString.substr(myString.lastIndexOf( "." ))
        myExtValue = myExt.localeCompare(".EPS")
        return myExtValue
    When I run this script, ALL the graphics are removed, ".EPS" included.
    I do have ".EPS" graphics in my document and I expected them not to be removed.
    So there is something wrong somewhere, but I don't know what to change.
    Any ideas?
    By the way, I have a more generic question as a beginner:
    I am working with ExtendScript Toolkit. How can I do to check my script step by step?
    For exemple, how can I display my variables values as "myString", "myExt", "myExtValue" at each step?
    Actually, this script is a step for a bigger script I intend to build to deal with Mathtype equations in Word import.
    After not-EPS graphics beeing removed, I wish to relink all remaining equation prewiews to eps in a selected folder, by consecutive order.
    But this is a big piece of scripting to swallow for me, so I'm working slowly, step by step.
    TIA
    Best regards
    Nicolas

    Hello Ariel
    Thank you very much for your help.
    1. I added semicolons at the end of lines, but the script result is the same.
    2. Running line by line, I could see in the Console where is the problem:
    variable "myString" is always undefined.
    Well, I have to get more inside my script...
    Thank's again
    Best regards
    Nicolas
    Nicolas BALBO  
    [email protected]
    22, rue d'Hauteville  75010 PARIS
    Tel : 33 (0)1 42 57 14 31
    Le 18 avr. 2012 à 17:36, Arïel a écrit :
    Re: Problem with a script to remove graphics
    created by Arïel in InDesign Scripting - View the full discussion
    Well, I can't see any semicolons in your script. Maybe that's just the
    email interface, but there should be semicolons at the ends of lines.
    In the ESTK, you can step through a script a line at a time. Just click
    on the downwards pointing arrow instead of the "play" arrow. Each time
    you click, the script will advance one line. In the Console window
    (Windw>Console) you can then type the name of the variable you wish to
    examine.
    Ariel
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4344039#4344039
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4344039#4344039. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in InDesign Scripting by email or at Adobe Forums
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Problem with navigation script

    Hi I'm having trouble getting a button work correctly when
    pressed it should take user to a particular label on the main
    scene. Is there a problem with my script? The button is inside a
    movie clip which is inside another movie clip. Thanks in
    advance.

    this quite difficult to explain but here goes. i have a
    complex button with a roll in roll out effect. ie. a movie clip
    acting as a button that shows different buttons (in another movie
    clip) when it is rolled over. I then want the different buttons to
    go to other parts in the main timeline. the code works fine when
    the buttons are on the main timeline but because it is within
    another two movie clips it doesnt work like it should. In fact the
    script i have used in the first movie clip also affects the button.
    This script is as follows and belongs in the first frame of the
    first movie clip. In other words, I need the button not to be
    effected by the following script but by the gotoAndPlay script.
    Thanks

  • Help me, I have a problem with font when export report to PDF?

    Hi everyone! Help me
    I have a problem with font when export report to PDF
    My report uses template .rtf with font Times New Roman (Unicode), language is VietNamese.
    when desige template no problem, error only happen when view report by PDF.
    Edited by: user10236405 on Oct 15, 2008 11:23 PM

    give it time to boot. the time depends on yr memory size n data. soon a process bar will appear indicating the boot process. if still this doesnt work. try formating the phone. but this ways u lose all data on the phone (unless u backed it). relax! the data on the memory card is safe.

  • Problem with SAP Script FAX output

    Hi Friends,
    I have problem with SAP Script Fax output.
    After I issued output using the messge type, the print preview format shows me correct alignments and the right data. But when I go to List display using the menu bar functions from the print preview screen, the list is showing me the right data, but all the alignments at the main window went wrong.
    How do I rectify this problem? I need correct alignments in both form display and list display.

    Hi Sasidhar,
    Have you tried with different fax machine.
    Regards,
    Atish

  • URL problems with SQL Server Reporting Services 2012 with wildcard SSL certificate

    Hi,
    I have single server, domain member, with SQL Server 2012 SP1 Reporting Services.
    I am trying to get work with url: https://reports.mydomain.com
    I have valid wildcard certificate (*.mydomain.com) implemented and configured URLs in Configuration Manager.
    https://reports.mydomain.com/ReportServer - works fine
    https://reports.3pro.hr/Reports/ - I got error:
    The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
    In rsreportserver.config I have:
    <Add Key="SecureConnectionLevel" Value="2"/>
    When looking my ReportServerService_date.log file I have something like:
    configmanager!DefaultDomain!3f4c!03/10/2013-20:24:34:: i INFO: Using report server internal url https://localhost:443/ReportServer.
    configmanager!DefaultDomain!3f4c!03/10/2013-20:24:34:: i INFO: Using report server external url https://serverhostname:443/ReportServer.
    configmanager!DefaultDomain!3f4c!03/10/2013-20:24:34:: i INFO: Using url root https://reports.mydomain.com/ReportServer.
    configmanager!DefaultDomain!3f4c!03/10/2013-20:24:34:: i INFO: Using report server internal url https://localhost:443/ReportServer.
    configmanager!DefaultDomain!3f4c!03/10/2013-20:24:34:: i INFO: Using report server external url https://serverhostname:443/ReportServer.
    configmanager!DefaultDomain!3f4c!03/10/2013-20:24:34:: i INFO: Using url root https://reports.mydomain.com/ReportServer.
    Also, error shown in log file:
    appdomainmanager!ReportManager_0-2!4c50!03/10/2013-20:24:53:: e ERROR: Remote certificate error RemoteCertificateNameMismatch encountered for url https://localhost/ReportServer/ReportService2010.asmx.
    ui!ReportManager_0-2!4c50!03/10/2013-20:24:54:: e ERROR: System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. ---> System.Security.Authentication.AuthenticationException:
    The remote certificate is invalid according to the validation procedure.
    Btw, is there a way to delete/disable access using https://localhost and/or servername (not FQDN) since SSL will not work in this way for me, and I want access only by full url - https://reports.mydomain.com , not localhost ..
    -- Hrvoje Kusulja

    I spent one of my 4 free support incidents with Microsoft (part of MSDN subscription) this year to get this investigated.  The tech support person helped me through several issues but had to leave to attend some training, and I got past the last hurdle
    before she called me back.  Here are the steps that resolved this issue for me.  I know for sure that step 5 was necessary.  Step 1 may not apply to you, and steps 2-4 may or may not have been necessary (they didn't immediately fix the issue,
    but I didn't roll them back either so they may have been necessary.)
    Step 1:
    Ensure you are editing the correct rsreportserver.config file.  I had been making changes to a file that was installed in C:\Program Files\Common Files\microsoft shared\Web Server Extensions\14\WebServices\Reporting, but that was a rsreportserver.config
    file for some sharepoint integration that I'm not using.  The correct path on my system was E:\MSRS11.MSSQLSERVER\Reporting Services\ReportServer\rsreportserver.config, but yours may vary. If you can't figure it out, look in the registry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft
    SQL Server\MSRS11.MSSQLSERVER\Setup in the key named SQLPath, and then go to the ReportServer subdirectory of that path.
    Step 2: 
    In rsreportserver.config, ensure that SecureConnectionLevel is set to the value 3.  Was set to 0 in my configuration.  Corrected line in your rsreportserver.confiog file should look like:
    <Add Key="SecureConnectionLevel" Value="3"/>
    Step 3:
    In rsreportserver.config, add the correct value to the <URLRoot> element (which already exists in the file.)  In my configuration, this value was blank.  The value should be the fully qualified path to your report server, with a hostname that
    is valid for your certificate.  For example, if my cert matches *.mydomain.local:
    <UrlRoot>
    https://myserver.mydomain.local/ReportServer
    </UrlRoot>
    Step 4:
    Ensure that your certificate exists in Trusted Root Certification Authorities in certmgr for the local machine.  I had the certificate installed as a Personal certificate for the local machine, which I still think was correct (the certificate wasn't actually
    the problem and worked correctly for Report Server, and the failure was caused by SSRS incorrectly making a https request to a localhost URL), but she had me remove the certificate from Personal and add it to Trusted Root Certificate Authorities.  That
    broke things and the cert was no longer listed as a cert I could bind to, so we then copied it so it existed in both Personal and Trusted Root Certificate Authorities.  This is how I left it, not sure if that was necessary.
    Step 5:
    This was the fix that finally got things to work. In rsreportserver.config, add the same value to the <ReportServerUrl> element (which also already exists in the file) that you added in step 3.  In my configuration, this value was also blank.
    The corrected value should be the same as in step 3, for example:
    <ReportServerUrl>
    https://myserver.mydomain.local/ReportServer
    </ReportServerUrl>
    Then restart your report server (stop & then start in Report Server Configuration Manager), and the problem should go away.  At least it did for me.
    Good luck!

  • XL Reporter problem with SQL 2005

    Hi,
    We just migrated our SQL Server from 2000 to 2005. Everything seemed OK, until we tried to run XL Reporter addon. Our SQL 2005 is 64bit edition, and I heard the 64bit version has some problem with transferring data to Excel, for example.
    has anybody had the some problem? How can we solve this?
    Thanks.
    Andre

    Hi Andre,
    Check this thread: Re: XLR - Terminal Server
    It should be a problem if your PL is upgrade to new.
    Thanks,
    Gordon

  • Problem saving SQL Scripts

    Has anyone has this problem:
    1) I log onto my database (Oracle XE 10.2.0).
    2) I open a SQL Script that I previously created and saved. The script is about 1700 bytes.
    3) I edit the script. I run the script. I click "Edit Script" button on results screen.
    4) Everything is fine.
    5) I repeat these steps (1-4) 10 or 20 times and then all of a sudden all edits to my script stop saving.
    A) When I run the script without explicitly saving the script, it runs the unedited version of the script.
    B) When I explicitly save the script, the edits do not save.
    C) If I log off the database and back on again, the effects are the same (beginning here with "5)" from the get-go).
    D) I I log off the database, shut down IE 7.0, reboot IE, log back on to the database I begin here at "5)" again.
    E) I mark all my script and copy it to clipboard. I replace script with 3 bytes: "aaa". I click "Save". The three bytes save.
    F) I replace the 3 bytes with my original 1700 bytes of code. The 1700 bytes do not save; only the three bytes remain.
    6) In summary, I would ask, "Is there a size limit to the amount of SQL script you can save using this application?". However, the problem with this question is that everything worked fine for me for one and one-half hours of using the app.
    I will go now to reboot my machine to see if that resolves it.
    I will report back here with the results of that experiment.
    Anybody has any insight, I would be grateful 'cause this is frustrating!!
    Thank you,
    Mike Kemp
    St. Petersburg, FL

    OK problem started right off the bat today.
    But then again the computer had been up and running overnight, multiple users during that time, etc.
    So I rebooted.
    Script is up to 2120 bytes now.
    Problem was not resoved by reboot.
    No matter what I do I can't edit my script and have it save (I edit it, copy and paste to Notepad and move back and forth as needed ... however problem is that when I click "Run" it never recognizes the new script; it always runs the old one).
    Let me take my 2120-byte script and paste it into a brand-new Script Editor window and see if it will run from there (thinking that maybe this Apex thing just can't run long scripts at all)....
    OK that works!!
    Hmmmm...so looks to me like Apex Script Editor can't edit long scripts (I started running into problems when my script exceeded 1700 bytes).
    I'll keep posting back here in case somebody big in Oracle Apex World (I just heard Tom Kyte talking about the guy who created Apex ... can't remember his name now) cares.
    I know, I know they'll probably tell me it's user error :-)
    -Mike

  • Still problem with SQL Between... Help me GURUS!

    I've already posted this, but I will try to put it more simple:
    Imagine these Tables:
    Absentee Table
    ID_TRABALHADORES (Number PK) (Trabalhadores=Worker in english)
    DAT_INI_AUS (Date) - Initial date of absence
    DAT_FIM_AUS (Date) - End of Absence
    Justification Table
    ID_TRABALHADORES (Number PK)
    DAT_INI_JST (Date)
    DAT_FIM_JST (Date)
    Now imagine that an user (Thru a Oracle Form) inputs one absence from 2005/12/13 to 2005/12/29.
    Now the user must input the specified Justification for that absence. Suppose there's 2 Justifications for one SINGLE Absence.
    From 2005/12/13 to 2005/12/20 as justified as ilness and from 2005/12/21 to 2005/12/29 as Death of a relative.
    If I want to find out if someone forgot to fill in a justification, or if it's wrong justified (wrong dates, etc...), how can I work the SQL with Between? It doesn't work if an user puts 1 Absence to 2 Justifications, because it reports it as being an error, but it's not, because the period is correct. It works fine if an user puts the example above like this:
    Absentee Form:
    2005/12/13 to 2005/12/20 (Ilness)
    2005/12/21 to 2005/12/29 (Death of relative)
    Justific Form:
    2005/12/13 to 2005/12/20 - Ilness
    2005/12/21 to 2005/12/29 - Death of relative
    With this I don't catch it because it's not an error and the date periods are correct, but using this way:
    Absentee Form:
    2005/12/13 to 2005/12/29 (Ilness and Death of relative)
    Justific Form:
    2005/12/13 to 2005/12/20 - Ilness
    2005/12/21 to 2005/12/29 - Death of relative
    1 Absence to 2 Justific I catch it as error, but the period is also correct...
    There's any SQL script that can turn around this problem?
    PS- I don't want to use any sort of code in FORMS or PL/SQL

    If I understand the question correctly, you are trying to find out if the justification data matches the absence data or not. Also, if the user puts in two absences then there should be two justifications, right?
    Also, the date range of absence should match date range of justification.
    The two tables are linked by ID_TRABALHADORES column.
    One approach could be:
    Figure out if the number of absence records and justification records match or not:
    select ID_TRABALHADORES , count(*) from Absentee
    group by ID_TRABALHADORES
    MINUS
    select ID_TRABALHADORES , count(*) from justification
    group by ID_TRABALHADORES
    This will give a list of all those IDs where :
    1. There are more records in Absentee but fewer justifications, e.g. 2 date ranges but a single justification
    2. User forgot to enter a justification
    Now let's take it further ... I understand that you want to catch cases where the dates do not match for the IDs identified above.
    select id, min(dat_ini_aus), max(dat_fim_aus) from absentee group by id
    minus
    select id, min(dat_ini_aus), max(dat_fim_aus) from justification group by id
    If the date ranges match then the query above will eliminate further records as the date range identified by min/max would match.
    Anything that does not match could be due to missing records, bad dates etc.
    I think it will help if we can see more data samples and some more explanation of the problem you are trying to solve. A BETWEEN clause may not be needed here.
    Shakti
    http://www.impact-sol.com
    Developers of Guggi Oracle - Tool for DBAs and Developers

  • Sharepoint 2013 SSRS Interaction with Sql Server 2012 Reporting Services connecting to Sql Server 2008 R2 database

    Hi
    I'm working on upgrading sharepoint 2010 to sharepoint 2013 with sql server 2008 r2. I've ran into some problems but have been able to get a test farm upgraded. However to run SSRS 2013 it seems Sql Server 2012 Reporting Services are required. Upgrading
    to a full sql server 2012 database isn't an option. I know that sql server 2012 reporting services can use sql server 2008 r2 as a catalog and content database so I was wondering could this be a workaround? Importantly would I need a separate machine/virtual
    machine to host sql server 2012 reporting services? or could it live on the sql server 2008 r2 machine? Any pointers appreciated. Thanks Dan

    Remember that SSRS must be deployed on the SharePoint server. Having said that, yes you can install SSRS 2012 SP1 on a server running SQL 2008 R2. And yes, you can use 2008 R2 as your Database Engine server while SSRS 2012 SP1 runs on the SharePoint server.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

Maybe you are looking for

  • How to add table in SAP Non interactive forms in webdynpro java

    Hi Experts, I have a requirement in webdynpro java.I have a print button.On clicking print button a pdf will be opened. This pdf will have data from the webdynpro view.I want to know how to add table in the adobe pdf.The webdynpro view will have many

  • Dep Run Error

    Hi Experts, Cany any one suggest me to solve my issue with teh depreciation run. When i am running depreciation run for the period 001-2008 (Apr-2008) to CC ABCD, system is giving the follwing error. According to posting cycle, you should post period

  • Final Cut Studio 2 on iMac to be purchased

    I am a first-time computer buyer, so I'm trying to make sure this purchase is going to be worth it. I'm looking to purchase the iMac off the shelf, but I'm uncertain if I need extra accessories to make Final Cut Studio 2 run. The Mac says it has "ATI

  • How to create a link for pirnting

    I have some jspx pages and taskflow pages and I need to create a link or button for printing them friendly. How to do that? Is there any document about pinting jspx pages?

  • FCP 7 "Merge Clips" Lost Audio

    I export my audio from soundtrack (needed to fix noise) and I create an AIF file.. exports fine and plays in its entirety (in multiple different programs).. Import the AIF file into FCP 7 and the file plays fine in its entirety also... Then when I "M