Variable does not work for sqlplus (command line)

Here is an select:
variable x number;
variable y number;
variable a number;
define x = 2000;
define y = 2*1000;
define a = &x+&y;
select ener from adding where ener = &a;
When I execute it under SQL*Plus Worksheet (client installed on my PC) then I get output:
ENER
4000
1 row selected
When I execute this same under command line sqlplus (under unix shell) then I get output
old 1: select ener from adding where ener = &a
new 1: select ener from adding where ener = 2000+2*1000
no rows selected
What is worng ?

Nothing.
Sqlplus is correct and sql worksheet is buggy.
Define works with strings only. You cannot use it to calculate an expression.
Apparently sql worksheet did calculate the expression, and sqlplus didn't, submitting it as a string.
This is the expected behavior.
This behavior can likely vary by version, so thank you for not providing version info.
Will anything awful happen when you do, or is this just the lazyness epidemia in this forum?
Sybrand Bakker
Senior Oracle DBA
Experts: those who did read documentation.

Similar Messages

  • CF10 64bit  Apache connector (mod_jk.so) does not work for Apache2.4.3 (windows)

    CF10 64bit  Apache connector (mod_jk.so) does not work for Apache2.4.3 (win64), where can I get a module that works?
    I get this error from Apache :
    C:\www\Apache2.4\bin>httpd -t
    httpd: Syntax error on line 741 of C:/www/Apache2.4/conf/httpd.conf: Syntax error on line 2 of C:/www/Apache2.4/conf/mod_jk.conf: Cannot load C:\\ColdFusion10\\config\\wsconfig\\1\\mod_jk.so into server: The specified procedure could not be found.
    I have already tried manually extracting the pre-built mod_jk22.so from the wsconfig.jar with same results.
    If I switch to Apache 2.2.22 64bit, it does work.  what I need is to be able to run on Apache 2.4.

    Please check out this link.
    http://rob.brooks-bilson.com/index.cfm/2012/2/21/Installing-ColdFusion-10-with-Apache-on-W indows
    In this link, they are configuring with Apache 2.2 only.
    When we were working colfusion 9 with Linux and apache, we had the same problem, it will work when it connect to Apache 2.0 but not with Apache 2.2 version.

  • I have an event in my calendar that was sent by someone who does not work for the company anymore and I am reminded 2 times a week. How can I remove it?

    I have an event in my calendar that was sent by someone that does not work for the company anymore and I am reminded 2 times a week. How do I delete it?

    Tap on the event to open the event. Click the 'Edit' button in the event bubble, then press the 'Delete Event' button at the bottom of the Edit pop-up. It's a little different for events that come through Microsoft Exchange, you tap the event to bring up bubble and click the 'Details' button, and then press 'Decline' to remove the event.

  • Select All in a table does not work for Drag and Drop

    Hi. I am using Jdeveloper 11.1.1.2 but have also reproduced in 11.1.1.3.
    I am trying to implement drag and drop rows from one table to another. Everything works fine except when I do a Select All (ctrl-A) in a table, the table visually looks like all rows are selected, but when I try to click on one of the selected rows to drag to the other table, only the row I click on is dragged.
    I tried setting Range Size -1, fetch mode to FETCH_ALL, content delivery to "immediate" but nothing works.
    I even have reproduced not using a view object but just a List of beans with only 5 or 10 beans showing in the table.
    Does anyone know how to get Select All to work for a Drag Source?
    Thanks.
    -Ed

    Frank-
    OK, thanks for looking into that. I also submitted this service request, which includes a simple sample app to demonstrate the problem:
    SR #3-2387481211: ADF Drag and Drop does not work for rows in table using Select All
    Thanks again for the reply.
    -Ed

  • I have an apple ID which I use to sign into icloud for my iPad and iPhone.But when I use the same ID for setting up iCloud on my Macbook it says INCORRECT ID or password, try again. I tried changing my passwords but it does not work for the macbook.

    I have an apple ID which I use to sign into icloud for my iPad and iPhone.But when I use the same ID for setting up iCloud on my Macbook it says INCORRECT ID or password, try again. I tried changing my passwords several times but it does not work for the macbook.

    You will have to provide the correct password to delete the existing account, if you have tried but are not getting the password reset email, contact Apple for assistance by going to https://expresslane.apple.com, then click More Products and Services>Apple ID>Other Apple ID Topics>Lost or forgotten Apple ID password.

  • HT5557 The ibooks dictionary works fine for my iPhone 5, but it does not work for my iPad 2. Is this fixable?

    The iBooks dictionary works fine for my iPhone 5, but it does not work for my iPad 2. Is this fixable?

    I went to the Audio store to see about getting a surround sound and the salesperson asked me why I wasn't using AirPlay, he said it was better than the Bluetooth, better quality. So I do have AirPlay on my Sony and I installed the app on my iPhone 5 but they can't find eachother.......when I try looking for my iPhone on my receiver it does not show it. The Sony display works through my TV, the set up screen is there but it says no devices found. Like I said, the Bluetooth finds the iPhone and works ok, but the AirPlay does not.....looking at the manuel it says that the AirPlay will recognize my device (iPhone 5) but it does not..........

  • GUI_DOWNLOAD does not work for background printing

    Hi,
    Need some help urgently.
    Function moduel GUI_DOWNLOAD does not work for background printing. I want to know how this issue can be handled or we have to use some other function module.
    We are using this in a report and i get the error dump OBJECTS_OBJREF_NOT_ASSIGNED when we run this report in background.
    Kindly suggest.
    Best Regards,
    Abbasi

    you can not use gui_download in background.
    Try searching first, this thing has been posted a thousand times already

  • BUG in iOS7: Post iOS7 upgrade, search option does not work for "Messages". If you want to search a contact name in Messages who is way below the list, the search will not yield any result.

    BUG in iOS7: Post iOS7 upgrade, search option does not work for "Messages". If you want to search a contact name in Messages who is way below the list, the search will not yield any result.

    These are user forums. You are not speaking to Apple here. Report your problem at Apple Feedback.

  • Link does not work for-End-of-Sale and End-of-Life Announcement for the Cisco Secure Access Control System 5.4

    Link does not work for
    End-of-Sale and End-of-Life Announcement for the Cisco Secure Access Control System 5.4
    How do we get Cisco to fix?
    see attachment

    Give it a couple of days - it looks like they just sent out the notification before the notice was published on the public page.
    Once the ACS 5.4 EoS/EoL notice is published you should see it linked from this page.

  • In Robohelp 9, search does not work for some Vietnamese characters.

    In Robohelp 9, search does not work for some Vietnamese characters.

    I don't think there is anything we can do on a user to user forum. I suggest you report this to Adobe as a bug. Please follow this link.
    http://www.Adobe.com/cfusion/mmform/index.cfm?name=wishform&product=38
    If you need a more immediate response, you would need to take that up with Adobe support.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • ODI 11g 11.1.1.7 with Win64 bit OS : Starange problem : Right click does not work for Create new data server in Topology.

    ODI 11g 11.1.1.7 with Win64 bit OS : Strange problem : Right click does not work for Create new data server in Topology.
    On right click nothing happens at all. I have  reinstall the ODI multiple times with right installer. issue persist.
    Please help.

    Hi,
    Did you use the generic installer or the win32 one ? You should use the former with Win64.
    You can also check that your version of Java is supported in the certification matrix.
    Regards,
    JeromeFr

  • SM36/37: Specification "After Job" does not work for Daily "periodcity"

    I reviewed http://help.sap.com/saphelp_nw04/helpdata/en/20/2d513897110872e10000009b38f889/content.htm, which states what I am trying to do should work, but it does not.
    Here's the deal:
    1.  I have two jobs: "A" and "B".
    2.  "A" runs Daily.
    3.  I set-up job "B" to run "After job" "A" in my SM36 definition.
    Job "B" will run the next day, but never runs again after that even though job "A" continues to run "Daily" as it should.
    Further info:
    1.  We have "Event-triggered" jobs that run fine, but the "After Job" designation doesn't seem to work ongoingly.
    2.  I can review both jobs "A" and "B" for any "Predecessor" or "Successor" jobs, and, the first jobs to run after the initial set-up DO reference each other (in other words, let's say I schedule job "B" to run "After job" "A" on Tuesday.  After Tuesday's run, Job "A" sees job "B" as it's "Successor" job and job "B" sees job "A" as it's "Predecessor" job), but the definition doesn't last into the next day ONLY FOR JOB "B" (as I mentioned, job "A" always runs fine).
    3.  I can't set the "periodcity" for job "B" because, once I flag it to run "After Job" "A", the "period" options disappear.
    4.  One final tidbit: the variant for job "B" has a "key date" specified so the date is dynamic for each day the job runs.  I can set up job "B" to run "Daily" with this variant and it runs fine, but I wanted it to run AFTER job "A" so it never runs if job "A" doesn't run.  (At this point, it's becoming a matter of principal!)
    Here's my question:
    Why won't job "B" continue to run "Daily" after job "A" (a "Daily" job) runs?
    Thanks in advance,
    Lara

    Please close this thread since you posted the same question here:
    [SM36/37: Specification "After Job" does not work for Daily "periodcity"|SM36/37: Specification "After Job" does not work for Daily "periodcity";

  • My laptops QWERTY row of keys does not work for long periods at random intervals and only after pushing all the buttons on the row does it eventually turn back on and then will still cut out every now and again, anyone know how to solve this?

    My laptops QWERTY row of keys does not work for long periods at random intervals and only after pushing all the buttons on the row does it eventually turn back on and then will still cut out every now and again, anyone know how to solve this? If not is there any way to actually get a genuis appointment lol to get one of them to have a look at the hardware on the keyboard?

    Apple Support (formerly ExpressLane):
    https://getsupport.apple.com/GetproductgroupList.do
    https://getsupport.apple.com/GetSASO?SG=SG001&locale=en_US

  • ITunes does not work for Asia ( Hong Kong )

    I just purchased my first iPod Nano ( 2nd Generation) was was told by store staff all I have to do is register and download apple itunes software and then I could download MP3 songs from iTunes...paying for songs of course.
    I was shocked to learn that iTunes does not work for Hong Kong residents, nor does napster,yahoo music unlimited, etc.
    I am a Canadian living in Hong Kong, so can not read write or understand chinese, does anyone know of a English subscibtion mp3 download service that works for Hong Kong, and not emusic, tried that one, not for me .
    Please Help !
    BullDogHK

    Do you still have a Canadian credit card and Canadian billing address? If so, you should still be able to use the Canadian store.

  • TableView : sort = "SERVER" ...does not work for "TIME"

    Hi,
    TableView sort = "Server" works automatically for "Date" Fields and "Text" Fields.
    But it does not work for "Time" field with data element "CDUZEIT". It shows the below error message:
    Note
    The following error text was processed in the system IFD : Invalid sort field type in "SORT ... AS TEXT".
    The error occurred on the application server ifdmain_IFD_01 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Form: IF_HTMLB_ELEMENT_DELEGATED~DO_AT_END of program CL_HTMLB_TABLEVIEW============CP
    Form: DELEGATED_END of program CL_HTMLB_ELEMENT==============CP
    Form: IF_BSP_ELEMENT~DO_AT_END of program CL_HTMLB_TABLEVIEW============CP
    Form: ONLAYOUT of program CLO27OLHO7EA9KVWPONPDC2NLTDFHCP
    Form: %_ONLAYOUT of program CL_O27OLHO7EA9KVWPONPDC2NLTDFHCP
    Form: DO_REQUEST of program CL_BSP_PAGE===================CP
    Form: CALL_VIEW of program CL_BSP_PAGE_BASE==============CP
    Form: CALL_VIEW of program CL_BSP_CONTROLLER=============CP
    Form: DO_REQUEST of program ZCL_ZPR_C_ACTION_LOG==========CP
    Form: DO_REQUEST of program CL_BSP_CTRL_ADAPTER===========CP
    Thanks and Regards,
    Bindiya

    Welcome to SDN.
    This problem and solution to it is exaplined in the following oss note number.
    <a href="https://service.sap.com/~form/handler?_APP=01100107900000000342&_EVENT=REDIR&_NNUM=893210&_NLANG=E">893210</a>
    Regards
    Raja

Maybe you are looking for