A very basic but trick problem--can u handel it

hi guys
i have a very small but tricky problem
u see i want to get the value of a mathamatical expression (stored in a variable -varchar2) and wants to get the mathamatical value of the expression
eg
declare
a varchar2;
begin
a:='12*12';
etc....
end ;
so here i want to get 144 as the output ..
lets see how u handel it
thanx
dg

you can change the value assigned to variable S1 to whatever operation you need to perform.
DECLARE
     V_HANDLE     INTEGER;
     STMT          VARCHAR2(100);
     S1               VARCHAR2(50) := '12/2';
     RES               INTEGER;
BEGIN
     V_HANDLE := DBMS_SQL.OPEN_CURSOR;
     STMT := 'SELECT '||S1||' FROM DUAL';
     DBMS_SQL.PARSE(V_HANDLE, STMT, DBMS_SQL.NATIVE);
     DBMS_SQL.DEFINE_COLUMN(V_HANDLE, 1, 1);
     RES     := DBMS_SQL.EXECUTE(V_HANDLE);
     LOOP
          EXIT WHEN DBMS_SQL.FETCH_ROWS(V_HANDLE) = 0;
          DBMS_SQL.COLUMN_VALUE(V_HANDLE, 1, RES);
          DBMS_OUTPUT.PUT_LINE('RES = '||RES);
     END LOOP;
     DBMS_SQL.CLOSE_CURSOR (V_HANDLE);
END;

Similar Messages

  • Having trouble figuring out how to save the original photo after I've cropped it - i.e. I want to create a headshot of my husband from a photo of the two of us, but I also want to keep the original. Seems very basic, but can't seem to figure it out. Any h

    Having trouble figuring out how to save the original photo after I've cropped it - i.e. I want to create a headshot of my husband from a photo of the two of us, but I also want to keep the original. Seems very basic, but can't seem to figure it out. Any help would be great!

    Use File >> Save As
    Choose a different file name so as not to overwrite the original and don't save any changes when closing the original.

  • Very basic question... can photoshop overwrite the original file?

    Very basic question... can Photoshop Elements 13 overwrite the original file?

    You will need to check the Photoshop Elements for any particulars about that software.
    For Photoshop, if I make changes and exit saving those changes, yes the original is overwritten.
    Keep backups at all times and don't work off flash external drives. When people tell me their original 500 layer file got corrupted, and they didn't keep copies, I hate to tell them their weeks of work is down the bucket.
    In Photoshop, we use Image > Duplicate to work on a copy if we don't want the original touched, or File > Save as... where we give the file a different name. We save image.psd as image1.psd and image.psd is closed. We then have a copy, "Image1" opened.
    Gene

  • A small but tricky one -- can u handel it

    hi guys
    i have a very small but tricky problem
    u see i want to get the value of a mathamatical expression (stored in a variable -varchar2) and wants to get the mathamatical value of the expression
    eg
    declare
    a varchar2;
    begin
    a:='12*12';
    etc....
    end ;
    so here i want to get 144 as the output ..
    lets see how u handel it
    thanx
    dg

    Yeap, Execute Immediate is only available on 8.1.?.
    Try following.
    declare
    cursor_no integer;
    a varchar2(20);
    sqlstr varchar2(128);
    rowno integer;
    rs integer;
    ResVal number;
    begin
    a := '12 * 12';
    sqlstr := 'SELECT ' | | A | | ' FROM DUAL';
    cursor_no := dbms_sql.open_cursor;
    DBMS_SQL.PARSE(cursor_no, sqlstr,dbms_sql.native);
    DBMS_SQL.DEFINE_COLUMN(cursor_no, 1, ResVal);
    rs := DBMS_SQL.EXECUTE(cursor_no);
    rowno := DBMS_SQL.FETCH_ROWs(cursor_no);
    DBMS_SQL.COLUMN_VALUE(cursor_no, 1, ResVal);
    DBMS_SQL.close_cursor(cursor_no);
    DBMS_OUTPUT.PUT_LINE(ResVal);
    END;
    Steve

  • Question about stereo vs. mono tracks. (Very basic, but appreciate help)

    I’m still a little confused about Stereo Vs. Mono tracks when recording in Logic. (This might sound stupid, but I’m still getting confused by this stuff.)
    When first recording a track, do you guys usually do it in mono or stereo?
    Secondly, I’m still confused about the benefits or stereo tracks. Why not just record mono and then pan a track left or right when mixing? I’m just not getting the concept of stereo recording. I know these are very basic questions, but I’ve read numerous books and I’m still a little in the dark on this. Thanks for the help!

    Most of the things I record are done on mono tracks. Each piece of a kit goes to its own channel, then I pan things accordingly later (Overhead L & R, etc.).
    You only need to record in stereo if you actually have a source that is stereo, i.e. a keyboard with stereo fx and L&R outputs, but even then I usually just set up two mono tracks, one for L and one for R. I would do a similar thing if I was using a stereo pair to mic something.
    You can always make a mono track stereo later as well using a variety of plug-ins.

  • Face time was working very good but suddenly I can't make any call ! I have iPad mini

    face time was working very good but suddenly befor 3  days I can't make or receiv any call. I have iPad mini  iOS 8.1.3

    Hi Sunlightbm,
    Sorry to hear that you cannot make any FaceTime calls. If you have not done so already, take a look at the article below to go over some general troubleshooting to get it back up and working again. Check the settings on your iPad for things like Date & Time is set correctly to making sure your connection to the internet is good. 
    If you can't make or receive FaceTime calls
    http://support.apple.com/en-us/TS3367
    Take it easy,
    -Norm G. 

  • My MacBook2,1 10.6.8 has been running very slow and I have tried all the basics but what else can I try to help speed it up?

    My Macbook is running so slow like it drives me crazy, it freezes up a lot either on the internet or offline as well. I Have a  MacBook2,1 Intel Core 2 Duo processor speed 2.16 GHz. The hard drive has 160.04GB with 16.34GB available  and the RAM  is1GB  DDR2 SDRAM 667MHr. I have tried using Disk Utility to repair permissions, I deleted a bunch of apps, I've done other maintenance and I don't know what else to do. I would really appreciate anyone that could  help me figure what to do or show me where to go to fi d out what to do. 

    You might consider upgrading the RAM. 1GB is the bare minimum to run Mac OS X 10.6.8. See this page for RAM information for your Mac: http://www.everymac.com/systems/apple/macbook/specs/macbook-core-2-duo-2.16-whit e-13-mid-2007-specs.html.
    You are also running low on free disk space, so consider moving files over to an external drive or delete files you no longer need.
    Also, please explain what "done other maintenance" involves.

  • Love this tool, but one problem: can't see beach balls on remote machines!

    Hi, I have the lastest OSX and ARD on the machines on our small biz lan, and I have one problem: when controlling or observing other machines I can't see the beach ball when it occurs...making it look like ARD is hung (or something). It's very disconcerting...is there a switch somewhere to make this right? Thx
    coocoo

    I'd be very surprised if ARD is ever able to display the spinning beach ball on the managing Mac.
    A couple of tips that may help:
    1. Set the client computers to display seconds on the clock in the menubar. If the seconds are counting, you at least know that you are receiving visual updates. If you can't access a menu in the hung app, but can still see the seconds counting, you likely have a beach ball.
    2. Run Activity Monitor on the client machine. A quick glance at the process list will show if an app is hung (and how much CPU it's gobbling).
    3. Select "Force Quit" from the Apple menu. This will also show which apps are hung.
    4. Peek into the /Library/Logs/HangReporter/ folder.
    Cheers.

  • Very Basic, but this puzzles me, Button's parameters...

    Hi, I 'm new to Flash, I have some understanding of it such as if I make a button, I go to the parameters part and then I can add my action code to my button to make it a link.
    I was following this guide and I get confused at step 2! http://www.bellaonline.com/articles/art52102.asp
    Here is my .swf http://play2improve.kevreillyland.com/logo.swf I want the user to be able to click the "Twitter" button and the text and so on and it will change the browser page to Twitter.com/Play2Improve and so on (also for the links below those icons). However when I click my Twitter button to edit the parameters this comes up:
    http://play2improve.kevreillyland.com/Untitled.png
    It doesn't let me edit the parameters part to add the bits I need. I know I'm not using a standard Flash "button" but I selected the "convert to symbol" option and chose "button" on each graphic. Is this is what is stopping me, and if so, can I get around it? Thank you for your help!
    Here is my .fla if it's useful! http://play2improve.kevreillyland.com/logo.fla Thanks!
    Message was edited by: salemfox (I forgot a link)

    1. On stage, select twitter button. Go to 'properties' tab and enter "twitter_btn" in instance name text field
    2. Insert new layer in timeline.
    3. Press 'F9' or open 'actions' window
    4. Copy the following code:
    import flash.events.MouseEvent;
    import flash.net.URLRequest;
    // Twitter Button click event
    twitter_btn.addEventListener(MouseEvent.CLICK, handleTwitterButtonClick);
    function handleTwitterButtonClick(e:MouseEvent):void {
        navigateToURL(new URLRequest("http://twitter.com/Play2Improve"), "_self");
    In navigateToURL, second parameter can be "_self" (open url in same browser window) and "_blank" (open url in new browser window)
    You do same stuff for all other buttons and links.
    Regards,
    Karthikeyan R.

  • I have an ipod either 1st or 2nd generation,very old but my problem is that i forgot the password and i need to reset it. The problem is i cant reset it because my sleep button doesnt work

    I need to reset my ipod but i cant do that because my sleep button doesnt work any more and plus i dont remember my password.HELP

    Place the iPod in recovery mode using one of these programs and then restore via iTunes:
    For PC
    RecBoot: Easy Way to Put iPhone into Recovery Mode
    If necessary:
    Download QTMLClient.dll & iTunesMobileDevice.dll for RecBoot
    and                                           
    RecBoot tip
    For MAC or PC       
    The Firmware Umbrella - TinyUmbrella

  • Can someone tell me the problem with this (very basic) code

    I know it's very basic but here goes
    public class MilesAndFurlongs
    // the constructor
    public MilesAndFurlongs (int Furlongs, int Miles)
    amountFurlongs = Furlongs;
    amountMiles = Miles;
    // method to add one to furlong
    public void increment()
    amount = (amount + 1);
    // method to print out total number of furlongs and miles
    public void displayLength()
    system.out.println("Furlongs: " + amountFurlongs);
    system.out.println("Miles: " + amountMiles);
    bluej says theres an illegal start of expression in displaylength()
    i know its going to be something stupid :D

    this is all of it updated...
    public class MilesAndFurlongs
    // the constructor
    public MilesAndFurlongs (int Furlongs, int Miles)
    amountFurlongs = Furlongs;
    amountMiles = Miles;
    // method to add one to furlong
    public void increment()
    amount = (amount + 1);
    // method to print out total number of furlongs and miles
    public void displayLength()
    system.out.println("Furlongs: " + amountFurlongs);
    system.out.println("Miles: " + amountMiles);
    Message was edited by:
    jaytabbmeister

  • VERY basic - how to decide what type of architectu​re to use?

    Forgive me if I'm breaking any forum rules with this post - I'm very new to this.
    I'm trying to write a Labview program to perform a functional test on an electronic product.  The test is fairly sequential - plug in the unit, apply a certain voltage, step up the voltage until the unit turns on, then turn on an electronic load, measure the load voltage, then step up the input voltage again, etc.  The power supply and electronic load that I'm using both have Labview drivers. 
    I'm brand new to Labview, and I have no resources in my company to help me out.  I have taken the Core 1 and 2 training class.  The problem is, I'm not really sure how to start.  Would this be a producer/consumer architecture?  A QSM?  I've been scouring these forums the past couple of days, but most of the discussions are advanced.  I don't understand all the acronyms.  A lot of the replies here assume you have some knowledge of Labview, and I don't.  Part of the problem is that I don't even know enough to ask a specific question, and that's why this post is so vague.
    I'm a competent PLC/HMI programmer but don't have any experience in other languages.
    I also want to be able to use variables for my limits so that I can easily change the pass/fail limits.  (For instance, I want the voltage and current pass/fail limits to be configurable from a "maintenance" screen on the Labview interface, but I don't know how to create multiple screens or password protect them).

    I have stated my opinion reagarding the QSM* design pattern previously and will not repeat it again here aside from "I avoid them like the plague".
    Architecture questions are good question but hardly "very basic" although some architectures can be very basic.
    I would recomend a State Machine that uses Action Engines to control your widgets.
    in this thread AND this thread I wrote extensively and included design documents for apps I developed. I invite you to look those over and start developing your own design that meets your needs.
    Ben
    * It is imposible to fully document all of the possible transitions of a QSM and since my application all are fully documented, the QSM is not an option. A Queued Message Handler on the other hand is different.
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Very Basic Question c:out

    I can't seem to get a very simple "HelloWorld.jsp" file to work in Tomcat. I have the file helloworld.jsp with the following:
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <html>
    <head>
         <title>helloworld.jsp</title>
    </head>
    <body>
         <c:set var="hello" value="Hello World!" />
         <c:out value='${hello}' />
    </body>
    </html>But when I view the page I see the output:
    ${hello}
    I thought this was very basic, but it doesn't work. I know that tomcat is running well, but the problem seems occur when I use a tag library. Otherwise the server and jsp works well. Thanks for any help.

    Thanks to you both, however, I am well aware of my option to use out.println..., but what I was trying to achieve is using the JSTL, and that is where I am having problems. Also, switching the order of my arguments in the taglib declaration made no difference. Anybody else have an idea on how to get the JSTL working?

  • Help with Project Management setup from very basics...

    hi all!
    i am new to e-business suite and now i have installed vision demo database successfully on a Quad Core with 320 GB hard and 4 GB ram...now i need help to setup Project Management (PM) module for a hypothetical construction company with the required functionalities (just limited functionalities and Not complete functionalities as in EBS).i need help in setting up Project Management module from the very basics...so can you help me out in this...thanks in anticipation

    Hi,
    Please post only once (do not post same thread across multiple forums).
    help with Financials setup from very basics...
    Re: help with Financials setup from very basics...
    Regards,
    Hussein

  • Very Basic actionscript question

    Hi,
    This is very basic but for some reason cant get it to work.
    Basically I have a movie that plays and at the end I have a button that comes on screen but once the button stops I want the user to press the button then it goes to the url.
    I have
    stop() {
    on (release) {
            getURL("http://google.co.uk","_self","blank");
    but this doesnt work.
    Thankyou for any help.

    I have now sorted it, I had my movie on actionscript 3 and needed to put the url code onto the actual button.

Maybe you are looking for

  • E1200 stops serving DHCP all of a Sudden (affects both wireless and wired)

     Greetings All, I have a 2 year E1200 router that has given me very good service uptil now. Now, it appears to suddenly stop serving DHCP at least once daily. This results in a situation where all my devices (3 over wifi, 2 directly wired) suddenly a

  • ESYU: Order Import를 통해 기존 Order를 reference 하는 RMA Order를 생성하는 방법

    Purpose Oracle Order Management - Version: 11.5.9 to 12.0.5 Information in this document applies to any platform. Order Import를 통해 기존 존재하는 Order를 reference 하는 RMA Order의 생성 방법을 알아본다. Solution Order Import interface의 header와 line에 data를 insert 하기 위해 아

  • Image overlap

    On my website: www.bigcowstudio.com, the Big Cow logo in the upper left corner of all the pages overlaps the content to the right if the browser window becomes too small (you'll notice the black box). That logo is placed with an AP Div and I haven't

  • IPhone does not launch itunes

    Since I updated to Lion iTunes does not start (launch) automatically when i connect my iPhone. I have ticked in the box. I have reinstalled iTunes. I have Mac OS X 10.7.2 I have iTune 10.5.2 Any ideas?

  • Creative Cloud for desktops impossible to update

    I get a reminder every day that there is updates for Adobe CC for desktops. When I try to install, it says "Adobe Creative Cloud for desktops could not be installed". I can´t open the application either. The update reminder keeps poping up. What to d