How to return quotes with varchar2 value

Hello-
I'm writing a function and need to add quotes to either side of a varchar2 db value
i.e. column value is Financial Trx, I need it to be 'Financial Trx'
I'd be grateful for any ideas on how to do this -
Many thanks in advance-
amanda

John, good point. Here is another way to get the single quotes that may or may not seem cleaner
UT1> l
1 select chr(39)||fld4||chr(39) as Word
2 ,chr(39)||fld3||chr(39) as Oradate
3* from marktest where fld1 = 8
UT1> /
WORD ORADATE
'fraction' '25-JUL-03'
When used in plsql code a variable can be given the value of a single quote, chr(39) and concatenated to the column values instead of repeatedly calling the function.
HTH -- Mark D Powell --

Similar Messages

  • How to merge rows with similar values in alv grid display in webdynpro

    Hi experts,
                   i want to know about how to merge rows with similar values in alv grid display of webdynpro.grouping rows is possible in table display in webdynpro but i am not able to do row grouping in the alv grid display in webdynpro.
    kindly suggest.
    thanks ,
    Anita.

    Hi Anita,
    did you find a solution for this? I have opened a Thread, if you know the answer maybe you could help me out:
    Is there an ALV function similar to the TABLE Row grouping?
    Thanx in advanced!!!
    Kind Regards,
    Gerardo J

  • Show abscence quota with 0 value

    Hello all,
    I need several quotas to be showed in IT2006 though their value (entitlement) is 0.
    These quotas have to be created first day of the year with 0 value entitlement, and then as the year goes by, they are increased depending on several criteria.
    These quotas are calculated via time evaluation (RPTIME00) and all of them work fine, except for this issue about when they still have a 0 value.
    Thank you very much in advance.
    Gonzalo

    with zero value quota can not be generated as andy said write a LSMW to create a quota with zero value.
    regards,
    mohammed

  • How to return more than one value from a  function

    hello everybody,
    Can anyone tell me how to return more than a single value from a function, the problem is i have 4 points,
    2 points form one line ,another 2 points form 2nd line ,each point is 3 dimensional(x,y,z coorinates) so i will pass these values to func(x1,y1,z1,x2,y2,z2,x3,y3,z3,x4,y4,z4), i will find the point of intersecton of two lines and i will get it as x,y,z , now how to return these 3 coordinates,usually the function returns only one value, please help me to solve it out.
    Thanks.

    I think the easiest way or trick here is (easiest isn't always the best as we know, but atleast this one will work) to create simple data array. and pass that. Create an array with:
    <code>
    class justArray {
    int x=0
    int y=0;
    int z= 0;
    ...somewhere
    justArray[] points= new justArray[4];
    points[0].x= ..
    points[0].y= ..
    points[0].z= ..
    points[1].x= ..
    return points[]
    </code>

  • How to display characteristics with filterd values in WebReports

    Hi
    we use webreporting (BI 7.0) for our endusers and have designed a very simple webtemplate. All the characteristics you can see in the "selection window" are displayed in a header section with the values set for each variable. Due to the simplicity of the template we do not want to display all characteristics in the header with all possible filtered values set on any charateristic which are available on the report.
    There is a standard webitem to display these filtered values but we can not use it as it is too large.
    Is it possible to change the apperance of a characteristic (make it bold, or red, or underline if a filter is set) so that the user can see that he have set a filter on any characteristic?
    If not, is it possible to simply display any text on the webtemplate indicating that a filter has been set?
    Any Ideas?
    Best Regards
    Markus

    Hi Anita,
    did you find a solution for this? I have opened a Thread, if you know the answer maybe you could help me out:
    Is there an ALV function similar to the TABLE Row grouping?
    Thanx in advanced!!!
    Kind Regards,
    Gerardo J

  • How to Add column with default value in compress table.

    Hi ,
    while trying to add column to compressed table with default value i am getting error.
    Even i tried no compress command on table still its giivg error that add/drop not allowed on compressed table.
    Can anyone help me in this .
    Thanks.

    Aman wrote:
    while trying to add column to compressed table with default value i am getting error.This is clearly explain in the Oracle doc :
    "+You cannot add a column with a default value to a compressed table or to a partitioned table containing any compressed partition, unless you first disable compression for the table or partition+"
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_3001.htm#sthref5163
    Nicolas.

  • How to bring fields with no values into workbook..?

    Hi Gurus,
    We have a query, which is filtered with some 60 GL Accounts. Some of these GL account has no values or activity since long back. But we need to display it in the report for some reasons. Since it doesnu2019t have any value, its not coming up in the report. Only the accounts with values are coming up.
    Is there any way I can bring these accounts in the report with 0 as values...? Any help is highly appreciated.
    Thanks
    Uan

    Hi,
    there are two ways:
    1) first you update in the infocube all values from gl_account.
    => your data volume grown up very much.
    2) in the query you create a structure with all values from gl_account.
    Sven

  • How to print frame with no values?

    Using Reports 6 (Developer 10g). In data model, I have a parent and child table connected through data link. In layout model, the child record is inside repeating frame. When child record is missing, nothing gets displayed in that frame. I still need labels to display, even though there are no values for the fields. How do I do that? Thank you.

    Hello,
    Your report is group report. And there is main group repeating frame and inside that main group repeating frame there should be two frames. one for labels and one will be repeating that will be retrieving data for child group. So, now when your group frame will return record and suppose there is no record in child repeating frame then sure repeating frame will not print. But the label frame should print which is inside that main group repeating frame. Because this label frame don't have any link with that child repeating frame. Or it your report does not seems like this. Then make it like this and then try.
    -Ammad

  • How to return more than one value through RECORD TYPE from function

    Hi friends,
    i m ew in oracle forms. i want to return the two values at a time from a function but can't,Please help me. my codding is as following
    Thanks in advance.
    FUNCTION Fun_Choose_Right_cast(v_post_no payroll.post_register.post_no%TYPE) RETURN RECORD IS --here is the error 
    v_return_char CHAR NOT NULL := 'X';
    TYPE row_no_record_type IS RECORD
         (v_row_id NUMBER(3)NOT NULL := 0,
         v_char CHAR NOT NULL := 'X');
    row_no_record row_no_record_type;
    BEGIN
    IF v_post_no = 1 THEN
         IF TRUNC(v_post_no*0.15) >= 1 THEN
              row_no_record_type.v_row_id := v_post_no;
              v_char := 'A';
              --v_return_char := 'A';
         END IF;
         IF TRUNC(v_post_no*0.075) >= 1 THEN
              row_no_record_type.v_row_id := v_post_no;
              v_char := 'B';
              --v_return_char := 'B';
         END IF;
         IF TRUNC(v_post_no*0.275) >= 1 THEN
              row_no_record_type.v_row_id := v_post_no;
              v_char := 'C';
              --v_return_char := 'C';
         END IF;
         IF row_no_record_type.v_row_id = 0 AND v_char = 'X' THEN
              row_no_record_type.v_row_id := v_post_no;
              v_char := 'D';
         --IF v_return_char = 'X' THEN 
              --v_return_char := 'D';
         END IF;
    ELSIF(v_post_no BETWEEN 2 AND 100) THEN
         IF TRUNC(v_post_no*0.15) > TRUNC((v_post_no-1)*0.15) THEN
              row_no_record_type.v_row_id := v_post_no;
              v_char := 'A';
              --v_return_char := 'A';
         END IF;
         IF TRUNC(v_post_no*0.075) > TRUNC((v_post_no-1)*0.075) THEN
              IF TRUNC(v_post_no*0.15) > TRUNC((v_post_no-1)*0.15) THEN
                   row_no_record_type.v_row_id := v_post_no-1;
                   v_char := 'B';
                   --v_return_char := 'A';
              ELSE
                   row_no_record_type.v_row_id := v_post_no;
                   v_return_char := 'B';
              END IF;
         END IF;
         IF TRUNC(v_post_no*0.275) > TRUNC((v_post_no-1)*0.275) THEN
              row_no_record_type.v_row_id := v_post_no;
              v_char := 'C';
              --v_return_char := 'C';
         END IF;
         IF row_no_record_type.v_row_id = 0 AND v_char = 'X' THEN
              row_no_record_type.v_row_id := v_post_no;
              v_char := 'D';
         --IF v_return_char = 'X' THEN 
              --v_return_char := 'D';
         END IF;
         END IF;
    RETURN row_no_record;
    END;

    Posting your Oracle version is immensely helpful when asking questions (different version = different answers / functionality available).
    select * from v$version;Also, using tags will preserve the formatting of your code.
    You should likely read (a lot) about  [http://www.stanford.edu/dept/itss/docs/oracle/10g/appdev.101/b10807/05_colls.htm]
    Basically, you would need to create a PL/SQL record and reference that, OR you could create a SQL type.
    If you're looking for a 'simple' way to return many single values (no arrays) then your best bet would be a procedure with multiple OUT parameters.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Output parameters or how to return more than one value

    My RMI server retrieves a list of Strings from the database. I need to return a status code int and an array of Strings to the RMI client. Does anybody have any ideas on how to do this. The only way I have come up with is to return an array of Strings using the first array position as the status code. But this is very ugly. There doesn't seem to be any way to have output parameters. I can use "output parameters" with code that lies in the same app by using wrapper classes or arrays but this does not really apply to a client and server running on different machines. Any ideas?

    Well, my general reaction is that you don't need a status code. (You can instead throw an exception if the status is anything but "OK".)
    However, on the assumption that you really DO need the status, then some alternatives are
    o Return an object that has a status code and an array as member variables.
    o In the call, pass in an object that the server can fill in with the array of strings. have the function return the status code.

  • NCR  returns delivery with no value

    Hi,
    I am using the process of returns in cross company.
    First I create the purchase order with a returns item checked.
    Then i create in migo the stocks movement. so far so good at this point.
    In vl04 i pick the purchase order and i want to make the delivery returns NCR. But in this point i get 0 in the value of the quantity. So i can not continue the process in spite of the system is telling me that the delivery is in process.
    What i am doing wrong?
                       João Fernandes

    Thanks you

  • How to return a non const value?

    Hi,
    I would like one of my methods to return a date object that should not be modified. How do I enforce this? I could create a 2nd object duplicating the original and return it, so any changes to the returned object will not mess up the original, but there must be a better way. What is it?
    Thanks,
    Carlo

    That, sadly won't work because I still need to be able to modify the date internally to the class, just when I return it in a getter I want to enforce non modifyability.
    Following is the code. Look at the getNextTime() method, this is the method that returns the date object that I want to enforce being non modifyable.
    import java.util.GregorianCalendar;
    import java.util.Timer;
    import java.util.TimerTask;
    import java.util.HashMap;
    import java.util.Date;
    * Any ClockListener may register itself with this object to be notified at
    * specified times. This may for example be usefull for a job that needs to
    * be run at certain times or time intervals.
    * To schedule notifications:
    * 1. Create the class that implements the ClockListener interface.
    * 2. Add this class as a listener to the clock, using one of the schedule
    *    methods.
    * To stop notification:
    * 1. Use remove method.
    * To change a notification schedule
    * 1. Reschedule the listener. If added previously the instance will
    *    automatically be rescheduled.
    * NOTE: The granularity of this timer is 1 minute. All timers will fire on
    *       the minute, even if scheduled mid-way a minute.
    * @see com.sorenson.utils.ClockListener
    * @author carlo
    * @since  Nov 21, 2001 - 9:49:31 AM
    public class Clock
        private HashMap mSchedules;
        private HashMap mReminders;
        private static Clock mInstance = null;
        public static Clock getInstance()
            if (null == mInstance)
                mInstance = new Clock();
            return mInstance;
        private Clock()
            mSchedules = new HashMap();
            mReminders = new HashMap();
         * Every (minute) th minute(s)
        public void scheduleInterval(ClockListener listener, int minute)
            addSchedule(listener, -1, -1, -1, minute);
         * Every day at (hour):(minute)
        public void scheduleDaily(ClockListener listener, int hour, int minute)
            addSchedule(listener, -1, -1, hour, minute);
         * Every week on the (dayOfWeek) day at (hour):(minute)
        public void scheduleWeekly(ClockListener listener, int dayOfWeek, int hour, int minute)
            addSchedule(listener, -1, dayOfWeek, hour, minute);
         * Every month on the (dayofMonth) day at (hour):(minute)
        public void scheduleMonthly(ClockListener listener, int dayOfMonth, int hour, int minute)
            addSchedule(listener, dayOfMonth, -1, hour, minute);
        public Date getNextTime(ClockListener listener)
            return ((Schedule)mSchedules.get(listener)).mNextTime.getTime();
        private void addSchedule(ClockListener listener, int dayOfMonth , int dayOfWeek, int hour, int minute)
            // check for existance
            if (null != mSchedules.get(listener))
                remove(listener);
            // create a schedule for the listener based upon the specified parameters
            Schedule schedule = new Schedule(dayOfMonth, dayOfWeek, hour, minute);
            // link the listener to the schedule and store
            mSchedules.put(listener, schedule);
            // create a reminder for the next wake up time and store
            mReminders.put(listener, new Reminder(listener, schedule.updateNext()));
        public void remove(ClockListener listener)
            // cancel the current reminder
            ((Reminder)mReminders.get(listener)).cancel();
            // remove the schedule for the listener
            mSchedules.remove(listener);
            // remove the canceled reminder for the listener
            mReminders.remove(listener);
        private void wakeUp(ClockListener listener)
            // remove the old reminder
            mReminders.remove(listener);
            // create a new reminder with the next scheduled wake up time
            mReminders.put(listener, new Reminder(listener, ((Schedule)mSchedules.get(listener)).updateNext()));
            // notify listener
            listener.onWakeUpCall();
         * Defines a wake up schedule for a clock listener
        private class Schedule
            // the next date/time the listener for this schedule needs to be notified
            GregorianCalendar mNextTime;
            // schedule rule variables
            int mDayOfMonth;
            int mDayOfWeek;
            int mHour;
            int mMinute;
            Schedule(int dayOfMonth , int dayOfWeek, int hour, int minute)
                // set the initial next time to right now,
                mNextTime = BasicHelper.getGMTGregorianCalendar();
                mNextTime.set(GregorianCalendar.SECOND, 0);
                // save the schedule rules
                mDayOfMonth = dayOfMonth;
                mDayOfWeek = dayOfWeek;
                mHour = hour;
                mMinute = minute;
            long updateNext()
                // once a month
                if (-1 != mDayOfMonth)
                    nextMonth();
                // once a week
                else if (-1 != mDayOfWeek)
                    nextWeek();
                // once a day
                else if (-1 != mHour)
                    nextDay();
                // every so many minutes
                else
                    nextSoManyMinutes();
                // return the time in ms between the current time and the next scheduled wake up time
                return mNextTime.getTime().getTime() - BasicHelper.getGMTGregorianCalendar().getTime().getTime();
            private void nextMonth()
                mNextTime.add(GregorianCalendar.HOUR_OF_DAY, mHour - mNextTime.get(GregorianCalendar.HOUR_OF_DAY));
                mNextTime.add(GregorianCalendar.MINUTE, mMinute - mNextTime.get(GregorianCalendar.MINUTE));
                mNextTime.add(GregorianCalendar.DATE, mDayOfMonth - mNextTime.get(GregorianCalendar.DAY_OF_MONTH));
                // skip to next month if next time in the past
                if (BasicHelper.getGMTGregorianCalendar().after(mNextTime))
                    mNextTime.add(GregorianCalendar.MONTH, 1);
            private void nextWeek()
                mNextTime.add(GregorianCalendar.HOUR_OF_DAY, mHour - mNextTime.get(GregorianCalendar.HOUR_OF_DAY));
                mNextTime.add(GregorianCalendar.MINUTE, mMinute - mNextTime.get(GregorianCalendar.MINUTE));
                mNextTime.add(GregorianCalendar.DATE, mDayOfWeek - mNextTime.get(GregorianCalendar.DAY_OF_WEEK));
                // skip to next week if next time in the past
                if (BasicHelper.getGMTGregorianCalendar().after(mNextTime))
                    mNextTime.add(GregorianCalendar.DATE, 7);
            private void nextDay()
                GregorianCalendar newTime = new GregorianCalendar(
                        mNextTime.get(GregorianCalendar.YEAR),
                        mNextTime.get(GregorianCalendar.MONTH),
                        mNextTime.get(GregorianCalendar.DATE),
                        mHour,
                        mMinute);
                if (newTime.after(mNextTime))
                    mNextTime = newTime;
                else
                    newTime.roll(GregorianCalendar.DATE, true); // rolls one day ahead
                    mNextTime = newTime;
            private void nextSoManyMinutes()
                mNextTime.add(GregorianCalendar.MINUTE, mMinute);
         * Internal class used to set reminders for the wake up schedules of the listeners
        private class Reminder
            Timer mTimer;
            ClockListener mListener;
            Reminder(ClockListener listener, long ms)
                mListener = listener;
                mTimer = new Timer();
                mTimer.schedule(new RemindTask(), ms);
            void cancel()
                mTimer.cancel();
            class RemindTask extends TimerTask
                public void run()
                    // Terminate the timer thread
                    mTimer.cancel();
                    // Wake up the listener
                    Clock.this.wakeUp(mListener);

  • How to create counter with charcteristic values  using exception aggregatio

    Dear Experts,
    Can some one help me on the below issue
    Requirement : Creating a counter with char ( accounting doucment number) in the query by using exception aggregation & summarize on totals with CKF.
    Note : i dont have any keyfigure called counter in my infoprovider
    Please let me know how to create it.
    I came to know  that  create  new  CKF  & FV with replacemtn path with IO(Account document number)  & use FV in CKF. is this true & works??
    Please let me know how i should  proceed ahead??
    Thanks
    Surendra

    I have resoloved by own
    By  createin zckf--> fv choosing replacement path with IO as reference and key.
    then excepetion aggreation chosen : counter for all detailed values & check the checkbox calucate after aggreagation.
    Thanks

  • How to suppress records with vzero value in a union report in OBIEE?

    Hi
    I have a Union report ,Rep1 union Rep 2,with a cloumn A in rep1 and a dummy column in place of column A in rep 2.
    I want to restrict the records where A= 0 in the union report.
    How to go abouth this.
    Thanks in advance !!

    hi,
    In report1 let the column be as it is ,why are you changing the f(x) to case statement.Did you check is data there in that column of report1.
    In the union report make tat dummy column as 0 or 1 accordingly as per your requirement.So it would retrieve all the values of column of report1.
    Check the join conditions established and play with the joins like give a full outer join and check if the data is coming including 0's if so then you can pply filter on that column saying column not equal to 0,so the remaining values gets populated.
    Cheers,
    KK
    Edited by: Kranthi.K on May 18, 2011 2:03 AM

  • How to return more then one value in OC4J

    Hi,
    do I really need to create a serializable object + interface with an reader and writer to pass more then 2 variables back to the client ?
    Must this object a java bean ?
    .. or does anybody know an easier way to solve this problems.
    greetings
    Mike

    What is your client, and what are you using on the server? Are you trying to return values from a servlet to a web page, or from a servlet to a JSP, or from a EJB to a Java client?
    John H. Hi John
    We have some services currentliy implementet as PL/SQL stored Procedures on Oracle. They are now accessable with DCE and C-clients.
    The task is now to implement the services as Web-Services with SOAP. For that we want to use the OC4J. - as an SOAP Server.
    But unforunatly the only examples I found are returning only one parameter.
    The Java books learned me to create a class and an interface to pass more parameter to the client. This interface should be inherit from Serializable.
    The compiler is happy, the deployment is ok. But when I try to get the wsdl and stub I get something like: "must be an bean" or "have to be a reader and write property.
    From my point of view this looks very complicated. I want to use SOAP and therefore all parameters should be passed with one call and the parameter should be explained in the WSDL so that they could be used independed of the programming language and plattform.
    When I implement the read and write methods I will pass the parameters in one stream. When I only use Java I think this is a solution - but what is with C or other languages.
    Ciao Mike

Maybe you are looking for

  • AirPort Express not recognized by AirPort Utility, but connected to WiFi network

    Hi all, This problem with AirPort Express is driving me nuts. I purchased AX to use it mainly for AirPlay, but I never managed to get it fully working. It seems to be working fine for some time after initial boot, but then the AirPlay play option dis

  • Cyrillic Characters not shown in pdf file when xsl is parsed part 2:

    I am using Fop to create a pdf file from an XSL file, an XML file and a ApplicationResources.properties file. The XML file is populated by a Java class, where the information is taken from a Russian Database. This XML file is them used to populate th

  • How do I Update PowerPoint 2013 Slide Deck Preview Thumbnail?

    I often copy previous presentations and revamp them for my next presentation. I notice that after changing the title slide in PowerPoint 2013 the embedded thumbnail.jpeg file is not updated. Ordinarily I would not care, but recently I am presenting t

  • Problem with continuous scale, crop JAI operations

    Hi, I am using JAI in my application, i need to do the following operations in order, for the given image. 1. Scale 2. Crop 3. Crop Each operation gets the RenderdOp object given by the previous operation as input [Output of the 1st operation is prov

  • Validate text in form

    I have a form that the user input has to fill. I would like this behaviour: the user input insert the text in a field (it can be a textfield) and when it loose the focus start to valide the text just inserted (it's control just if is only a string, o