SQL statement works with SQL/Plus - but not with ODBC

Hi all,
I have a rather copmplex SQL statement:
BEGIN
UPDATE ContentDataTable
SET SYMBOLIC_PATH_PARENT = N'/Test',
SYMBOLIC_NAME = N'HAWK01.GIF',
VERSION_NUMBER = 1 +
SELECT MAX(VERSION)
FROM
(SELECT MAX(VERSION_NUMBER) AS VERSION
FROM ContentDataTable WHERE
SYMBOLIC_PATH_PARENT = N'/Test' AND
SYMBOLIC_NAME = N'HAWK01.GIF'
UNION
SELECT MAX(VERSION_NUMBER) AS VERSION
FROM RevisedContentDataTable WHERE
SYMBOLIC_PATH_PARENT = N'/Test' AND
SYMBOLIC_NAME = N'HAWK01.GIF'))
WHERE SYMBOLIC_PATH_PARENT = N'/Test' AND SYMBOLIC_NAME = N'HAWK02.GIF' AND VERSION_NUMBER = 1;
END;
It works fine in SQL/Plus or SQL Worksheet and does what it should do ;-)
But when using it via ADO (ODBC Driver) I get the following error:
PLS-00103 found 'string' but expected one of the following: 'string'"}
Any idaes?
Thanx,
Christian
null

Pardon my ignorance, but what's the significance of the N'<string>' construction? That's not one I'm familar with.
Justin

Similar Messages

  • Same SQL Statement Works in Data Service but not in its Input Port

    Hi Experts,
    I am using this query in one of my data service. Test execute success which returned:
                                            E      U      H     M      L
    2     Less Than 1 Week     0     0     0     0     0
    3     1 - 2 weeks          0     0     0     0      0
    4     2 - 4weeks          0     0     0     0      0
    5     More Than 1 Month     0     0     6     0     0
    However, when i copy the same query to the input port, enclosing it with "[my query]"
    Deployed and run it. I get an "Unspecified Error" message box prompted in the iView, and null pointer exception error in the log file.
    #1.5 #001A64CA3F5600660000034400001140000487DBB6D27A4D#1275277641800#com.sap.portal.visualComposer_NWBIKit_logger#sap.com/irj#com.sap.portal.visualComposer_NWBIKit_logger#TOMAS004#89896##n/a##37c590906c6711df8503001a64ca3f56#SAPEngine_Application_Thread[impl:3]_32##0#0#Error#1#/System/Server#Java###null
    [EXCEPTION]
    #1#java.lang.NullPointerException
         at com.sap.portal.guimachine.bikit.query.relational.impl.BIRelationalQuerySql.processTemplateParams(BIRelationalQuerySql.java:40)
         at com.sap.portal.guimachine.bikit.query.relational.impl.BIRelationalQuerySql.<init>(BIRelationalQuerySql.java:31)
         at com.sap.portal.guimachine.bikit.query.relational.impl.BIRelationalFactory.newRelationalQuery(BIRelationalFactory.java:59)
    Any idea what is the mistake?
    Thanks in Advance,
    Sarah

    Hi Experts,
    I am using this query in one of my data service. Test execute success which returned:
                                            E      U      H     M      L
    2     Less Than 1 Week     0     0     0     0     0
    3     1 - 2 weeks          0     0     0     0      0
    4     2 - 4weeks          0     0     0     0      0
    5     More Than 1 Month     0     0     6     0     0
    However, when i copy the same query to the input port, enclosing it with "[my query]"
    Deployed and run it. I get an "Unspecified Error" message box prompted in the iView, and null pointer exception error in the log file.
    #1.5 #001A64CA3F5600660000034400001140000487DBB6D27A4D#1275277641800#com.sap.portal.visualComposer_NWBIKit_logger#sap.com/irj#com.sap.portal.visualComposer_NWBIKit_logger#TOMAS004#89896##n/a##37c590906c6711df8503001a64ca3f56#SAPEngine_Application_Thread[impl:3]_32##0#0#Error#1#/System/Server#Java###null
    [EXCEPTION]
    #1#java.lang.NullPointerException
         at com.sap.portal.guimachine.bikit.query.relational.impl.BIRelationalQuerySql.processTemplateParams(BIRelationalQuerySql.java:40)
         at com.sap.portal.guimachine.bikit.query.relational.impl.BIRelationalQuerySql.<init>(BIRelationalQuerySql.java:31)
         at com.sap.portal.guimachine.bikit.query.relational.impl.BIRelationalFactory.newRelationalQuery(BIRelationalFactory.java:59)
    Any idea what is the mistake?
    Thanks in Advance,
    Sarah

  • My firewire port works with ext hd but not with audio interface

    2010 Imac 21.5 running 10.8.5. My firewire port works with ext hd but not with audio interface. The local authorized Apple tech said that I need a new motherboard, but my firewire ext drive works perfectly. I don't understand. Thanks.

    You must go to the website of the audio interface manufacturer and look for, download and install updated drivers for the audio device you are using.
    This is not, neccessarily, an Apple issue.

  • Have Sony reader 505, ADE doesn't recognize when attached to mac OX 10.6.8. works with reader library but not with ADE

    Have Sony reader 505, ADE doesn't recognize when attached to mac OX 10.6.8. works with reader library but not with ADE

    YEAY!
    I just got the solution (that worked for me, anyway) from a Sony support rep. No PC or VMWare needed.
    OK, you've installed Sony eBook Library v3, and Adobe Digital editions, you've set up your acocunts and authorized your computer on both of them, and you've authorized your Reader with the Sony Library application.
    You go to the public library ebook download page, either through the Sony Library or just through a bookmark.
    You check out a book, and open it in Adobe Digital Editions, which still won't recognize your Reader.
    BUT, in the Sony Library app, you can now click "File, Import.." and go find the pdf you downloaded with the Adobe app.
    On my Mac, it was in ~/Documents/Digital Editions
    Import it, and drag it to your Reader.
    The first time you do this, it will ask you to authorize the Reader with your Adobe ID.
    Worked like a charm.

  • ITunes library stored on an external hard drive which is connected to my airport extreme, I wish to share my iTunes library over my network, I can do this with my laptop, but not with my iPad, can anyone tell me if it is possible

    I have my iTunes library stored on an external hard drive which is connected to my airport extreme, I wish to share my iTunes library over my network, I can do this with my laptop, but not with my iPad, can anyone tell me if it is possible

    You can't connect directly to the external drive, but should be able to use iTunes Home Sharing via the laptop.
    http://support.apple.com/kb/PH1453

  • My Printer (samsung clx-3185fw) says it connects to my network but I can't seem to print wirelessly.  I could with my netgear but not with my airport extreme, any ideas?

    My Printer (samsung clx-3185fw) says it connects to my network but I can't seem to print wirelessly.  I could with my netgear but not with my airport extreme, any ideas?
    I have restarted all units, disconnected and reconnected

    Hi ryanfromstockbridge,
    I apologize, I'm a bit unclear on exactly what you are seeing when you try to add the printer or print to the printer. If you continue to have issues printing to this wireless printer, you may find the information and troubleshooting steps outlined in the following articles helpful:
    OS X Yosemite: Printing troubleshooting
    Troubleshooting printer issues in OS X - Apple Support
    OS X Yosemite: Add or remove a printer
    Sincerely,
    - Brenden

  • Using iCloud my iCloud calendar is syncing with my iPhone but not with the Outlook calendar on my PC (Windows 7)

    Using iCloud, my iCloud calenda is syncing with my iPhone but not with the Outlook calendar on my PC (Windows 7)

    smurfanda wrote:
    I agree. What I see is that it is creating an icloud calendar in Outlook but I want it to sync to Outook itself.
    That is what it does. There is no sync, you have a new calendar.

  • Windows 8.1 64bit. Webcam works with "Camera" app but not with Skype.

    I've spent a few hours googling and trying out various things - all listed below. I give up - any ideas??? OS: Windows 8.1 64bitMemory: 32GBWebCam: Microsoft VX-7000. As per subject - the webcam works with the "Camera" app but not with Skype for desktop or for Modern UI (or the Microsoft Lifecam software for that matter).  Already attempted: 1) Uninstall webcam drivers - download latest from microsoft (Windows 7) and install in Windows 7 compatibility mode.2) Close (from taskmgr) anything that looks like it might use Webcam. 3) Run Skype for Desktop in Windows 7 and 8 compatibility modes None of the above work. In Skype for Modern UI the webcam doesn't appear in the drop down in Settings - so I can't even select it. In Skype for desktops (version 6.11.32.102) the webcam is found but instead of image I get "Can't start video. Try closing other programs that might be using your webcam". I see from a bit of googling that various people seem to have the same issue (i.e. Webcam works with Camera app but not Skype) - so I'm hopeful someone has found a workaround / fix to this issue and I've just not had the googling skills to find it  Thanks, - Matt Symes

    OK - I appear to have resolved the issue.  I restricted my google terms to [vx-7000 site:microsoft.com "windows 8.1"] Which uncovered this article: http://support.microsoft.com/kb/933311 I noticed there were a couple of Windows 7 x64 specific registry settings that were mentioned so I checked these and they weren't as per the article. In fact - one of the Registry Keys was already used by other software "AI Charger+" which is some ValueAdd software that came with my motherboard. I uninstalled AI Charger+, uninstalled LifeCam driver. Reinstalled LifeCam driver in Windows 7 compatibility mode. Still not working. I returned to the registry and noticed the settings still differed from the above article. I corrected them (which involved not just amending Data but having to add new Values). I then disabled and reenabled the LifeCam from dvcmgmt.msc I was then able to get video from the webcam in the Skype for Desktop preview screen.    

  • ESR,ID working with 8000 port but not with 50000

    Hi experts,
    I am working with PI 7.1. I am working with SOAP to ABAP SERVER Proxy scenario. I have downloaded the WSDL from ID and using XMLSPY sent a SOAP request to PI server and I got an error in SXMB_MONI under the Call Adapter step saying CLIENT_RECEIVE_FAILED.
    We cross checked the services in  SMICM transaction, and we missed the HTTP port 8000 for the parameter icm/servr/port_xx.
    Then basis team changed the port 8000 in SMICM for the same parameter and restarted the Java stack.we checked the icm/HTTP/j2ee parameter which is having 50000 port.
    Now ESR,ID,SLD,RWB... etc are working with ABAP port 8000 but not with 50000 java port and also I am getting an error in SXI_ CACHE while doing my delta refresh if_http_client receive http_communication_failure : http_communication_failure:ICM_HTTP_CONNECTION_FAILED. Kindly suggest me to resolve this error.
    Naveen

    Hi,
    Re: Architecture of PI 7.1
    NW PI 7.1 - ICM is not binding to port 5$$00
    from the above two threads it is very clear that from PI 7.1 both the ABAP and J2EE ports are same.
    Now we maintained both the ICM and j2ee port as 50000. Now ESR,ID,SLD are working with port 50000.
    But in my SOAP to Proxy scenario I  am getting the same error. When I try to send request to XI server using Altova xmlspy I am getting following error in SXMB_MONI under Call Adapter
    <SAP:Code area="INTERNAL">CLIENT_RECEIVE_FAILED</SAP:Code>
      <SAP:P1>400</SAP:P1>
      <SAP:P2>ICM_HTTP_CONNECTION_FAILED</SAP:P2>
    When i click that HTML error It shows
    404 Resource not found
    I am getting the following error in CC monitoring .
    com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.interfaces.messaging.api.exception.MessagingException: XIServer:CLIENT_RECEIVE_FAILED
    My reciever communication channel is in green status CC monitoring.
    I tested my server proxy in my end system which is successfully fetching data.
    I am using the following URL format for generating the WSDL from Integration directory.
    http://host:port /XISOAPAdapter/MessageServlet?channel=p:s:c
    Do we need to maintain the Fully qualified host name  in the above URL?
    I tried with a test scenario which is an asynchronous communication with the above mentioned URL format. I got a success message in SXMB_MONI.
    Since I am using PI 7.1 I tried the following URL also  but i this case,the XML spy itself throws error. I couldnt see any messages in SXMB_MONI.
    http://host:port/XISOAPAdapter/MessageServlet?senderParty=&sender
    Service=FS&interface=IF&receiverParty=&receiverService=TS&interfa
    ceNamespace=IFNamespace
    I have seen many threads in SDN for this same error but I didn't get an answer for my scenario.
    Lakshman and Manjusha
    Thanks for the quick responses.
    Regards
    Naveen
    Edited by: naveen perumal on Jul 24, 2009 8:00 PM

  • Wireless video link example works with antenna only but not with SMA to SMA cable

    I am trying to run wireless video link example https://decibel.ni.com/content/docs/DOC-22728 . It works fine if I use install antennas on my Tx and Rx USRPs. But it does not work if I use SMA to SMA cable to connect Tx and Rx USRPs. Can somebody guide me what is the reason why it is only workng with antennas but not with SMA to SMA cable. 
    Thanks 
    JK

    I connect the 30 dB attenuator at RF input port of Rx USRP. But it does not work completely.
    Without connecting attenuator i was not able to receive any thing on my Rx VI although it shows waveform. But after connecting attenuator receiver some times receive text messages and some times not. Also it does not work at all for images and for video it works partially but gives some error related to memory full after few mins.
    I want to know why this example works completely without any problem if I use antennas, and why it does not work perfectly if i use sma to sma cable for connecting transmit and receive usrps.
    Please guide
    Thanks 
    JK

  • Macbook Pro 7,1 (mid 2010?) boot with 6GB mem, but not with 8GB

    Hello,
    I bought a Macbook Pro 13" equipped with 4GB RAM at Apple Store on Oct-2010, and it says it's Macbook Pro 7,1 in profiler.
    I tried to upgrade the RAM from 2GBx2 to 4GBx2, but the MBP freezed in boot sequence with 8GB RAM.
    After some tests, including swap and change the combination of memory modules, I found my MBP can boot with 2+4GB configuration, but not with 4+4GB.
    Does anyone know similar issue on the latest MBP 13"?

    This is a memory speed problem - check here: http://discussions.apple.com/thread.jspa?messageID=13154160#13154160
    When using 2+4 gb, memory speed is choosen, based on the slowest dimm - the 2gb one (1066mHz), when using single/double 4gb - speed is 1333mHz).
    You can see the memory speed in diagnostic mode. I'm trying some stuff, if I succeed, I'll post my way.
    ps. Changing 4gb memory sodimms to 1066mHz will solve your problem. Or if apple fixes the efi to downclock the 1333mhz ones (which btw every pc can do from the bios).

  • Executing a procedure - Works on Isql Plus but not SQL Developer??

    Hi folks.
    I am playing around with some design and structure stuff, mostly just passing values around procedures. I have one procedure (procedure1) which takes a sysdate and then passes it to another procedure (procedure2) which takes the parameter and does a dbms_output.put_line.
    Both objects are valid, and compile correctly. I use
    exec procedure1;
    in iSql Plus and it works perfectly. It prints the dates out and all.
    However if I use the exact same command in SQL Developer it gives me error "ORA-00900: invalid SQL statement"
    I don't understand why this happens?? The code executes perfectly in one but not the other...

    Remember that SQL*Plus commands don't work in the worksheet. So, this would fail
    exec my_procIn the worksheet you have to declare an anonymous block....
    begin
        my_proc;
    end;
    /If you right-click on the procedure in the Navigator and select Run then SQL*Dev will throw up a harness for you. Very handy if you want to get DBMS_OUTPUT, set variables, etc.
    Cheers, APC
    http://radiofreetooting.blogspot.com

  • Datasource works with java code but not with sql:query dataSource=...

    Hello everyone! I have a small problem with binding a DataSource object via JNDI and retrieving it in a web application. This is the case:
    I did not wish to make the DataSource available through the server.xml, because I want to create applications that can be bundled in a simple .war file. So I create the DataSource when the context is created in the contextInitialized() method of ServletContextListener like this:
    InitialContext initialContext = new InitialContext();
    Properties properties = new Properties();
    properties.setProperty( "driverClassName", "com.mysql.jdbc.Driver" );
    properties.setProperty( "factory",   "org.apache.commons.dbcp.BasicDataSourceFactory" );
    properties.setProperty( "username", servletContext.getInitParameter( "dbUser" ) );
    properties.setProperty( "password", servletContext.getInitParameter( "dbPass" ) );
    properties.setProperty( "url",      servletContext.getInitParameter( "dbUrl" ) );
    properties.setProperty( "defaultAutoCommit", "false" );
    properties.setProperty( "maxActive",         "25" );
    properties.setProperty( "initialSize",       "15" );
    properties.setProperty( "maxIdle",           "10" );
    properties.setProperty( "testOnBorrow",      "true" );
    properties.setProperty( "testOnReturn",      "true" );
    properties.setProperty( "testWhileIdle",     "true" );
    properties.setProperty( "validationQuery",   "SELECT 1" );
    properties.setProperty( "removeAbandoned",   "true" );
    DataSource dataSource = BasicDataSourceFactory.createDataSource( properties );
    initialContext.rebind( "daers", dataSource );Please comment if you think this is a bad idea!
    All the above seems to work fine. When I try to retrieve the DataSource in a .jsp file then it all works fine like this:
    <% try {
            javax.naming.InitialContext initialContext = new javax.naming.InitialContext();
            java.sql.Connection conn = ( ( javax.sql.DataSource )initialContext.lookup( "daers" )).getConnection();
            java.sql.Statement statement = conn.createStatement();
            java.sql.ResultSet resultSet = statement.executeQuery("SELECT users.name FROM users;");
            while (resultSet.next()) {
                System.out.println(resultSet.getString(1));
        } catch ( java.sql.SQLException e ) {
            e.printStackTrace();
        } catch ( javax.naming.NamingException e ) {
            e.printStackTrace();
    %>But when I try to execute the same sql query through the appropriate JSTL taglib I get a:
    javax.servlet.ServletException: Unable to get connection, DataSource invalid: "java.sql.SQLException: No suitable driver"The JSTL code I use is this:
    <sql:query dataSource = "daers" var = "query" scope = "page">
            SELECT users.name
            FROM users
        </sql:query>I do put both of the two above pieces of code in the same .jsp page and the first works but the second causes the exception...
    Any clues..?
    Is it illegal to lookup a DataSource in <sql: dataSource=...> if the DataSource is not registered in the server.xml file..?
    If so, do I have any alternatives (like putting the DataSource as a servlet context variable)..?

    I added a response in your original message:
    http://forum.java.sun.com/thread.jspa?messageID=9629812
    Let's keep to it since splitting things across two posts might be confusing.

  • SQL Query works in Simulator VC but not in flash deploy

    Hi:
    This is the select that works in VC's simulator:
    SELECT
    "t1"."VUELO", "t1"."HORA SALIDA", "t1"."DURACION", "t1"."ORIGEN", "t1"."DESTINO", "t1"."DIAS"
    FROM
    "RPADMIN"."VUELOS_SEMANAL_EPN_VIRGO" "t1"
    WHERE
    "t1"."DIAS" LIKE <b>'%1%'</b>
    ORDER BY "t1"."HORA SALIDA" ASC
    The big problem seems to be the LIKE clause, I need to find all records that have the number one.
    If I select the Simulator tab the data is bring on but If I perform a flash deploy a null message is display at app's execution. The system is well define and If I change the LIKE clause for LIKE <b>'1'</b> the flash app brings data (not all the records that contains the number 1).
    Thanks a lot for the time on this thread.
    RLS

    Thanks Prakash Darj.
    I read that PDF before starting the thread but I can't make it work...I read it once again and no luck...
    My app is a basic one: start point with a link to a SQL statement linked to a result table
    <b>The SQL sentences that work at the simulator don't work for a flex app, Did you know the reason?</b>
    Often I get this error when deploying as flash app:
    Error in executing a process for Flex compilation, Error 1103: There is no property with the name 'NEUQUEN'.
          (D:\usr\sap\PD0\JC00\j2ee\cluster\server0\GUIMachine_Business_Packages\ModelName_20931\FLEX_COMPILATION_FOLEDR\AAD1W1.mxml:205)
    Failed to compile AAD1W1.mxml
    Is it that my VC is not working fine?
    I want to know the reason for what the Simulator display the data and not the flex app...is the same app....
    any Idea?
    Thanks so much for the time on this thread and for your answer.
    RLS

  • Why does my Web Handler work with Internet Explorer, but not with Firefox

    I am trying to develop a web page that uses the Simile Timeline (http://code.google.com/p/simile-widgets/wiki/Timeline) with data from SQL Server.
    In initial testing of my timeline I tested it with Example.xml, a static XML file in the correct format to be event data. I wrote the following in the appropriate place within mytimeline's Javascript: -
    var WebHandler = "Example.xml"
    tl.loadXML(WebHandler, function (xml, url) { eventSourceFamily.loadXML(xml, url) });
    This worked fine with both Firefox and Internet Explorer. I then changed the assignment to
    var WebHandler = "GDBTimeline.ashx?Type=Family&Userid=" + getControlValue("input", "hdnUser");
    so that invoked a web handler that could look up the SQL database and return the XML that I wanted, and wrote this web handler.
    This works perfectly with Internet Explorer, but with FireFox the timeline band is blank. Yet when I examine the http traffic with Fiddler2 (http://www.fiddler2.com/fiddler2/) I see that with either browser there is a response from URL
    /GDB_pages/GDBTimeline.ashx?Type=Family&Userid=robertb
    that returns the XML that it is supposed to.
    I have previously used web handlers with Firefox before, with no problems. The Fiddler results conclusively show that the web handler is invoked, and returns the appropriate XML, and this XML is identical to the XML from the static test with Example.xml.
    Where do I start looking for answers? I don't even know if this is a Simile problem, a Firefox problem, or an ASP.NET problem.
    Thank you, Robert.

    Problem solved. The issue: Content Type was not correct.
    Visual Studio creates the web handler with dummy code like this: -
    Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
    context.Response.ContentType = "text/plain"
    context.Response.Write("Hello World")
    End Sub
    I wrote a database query that set a string variable to the XML I wanted: -
    Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
    Dim Outstring as string
    ' my logic to fill Outstring with XML
    context.Response.ContentType = "text/plain"
    context.Response.Write(Outstring)
    End Sub
    This works with Internet Explorer. However it's not strictly correct: to make it work with other browsers as well,
    context.Response.ContentType = "text/plain"
    should be
    context.Response.ContentType = "text/xml"
    It now works with IE, FF, and Chrome, and presumably all others.

Maybe you are looking for