Is there an easy way to find out the type of an input parameter

Hi guys, I'm writing a function that receives a large string and I have to split it in several smaller fields, some string, some date and some numeric. Is there a function similar to "isnumeric" or "isdate" that will help me check on the type of data being entered? Tks in advance.

Hi,
>>Is there a function similar to "isnumeric" or "isdate" that will help me check on the type of data being entered?
Humm, like Delphi's functions? ;-) I think that 3360's solution is very interesting. By the way, check this below:
LEGATTI@ORACLE10> create or replace function is_numeric (param_in varchar2) return boolean is
  2  n  number;
  3  begin
  4    n := to_number(param_in);
  5    return true;
  6  exception
  7    when others then return false;
  8  end is_numeric;
  9  /
Function created.
LEGATTI@ORACLE10> create or replace function is_date (param_in varchar2) return boolean is
  2  d  date;
  3  begin
  4    d := to_date(param_in);
  5    return true;
  6  exception
  7    when others then return false;
  8  end is_date;
  9  /
Function created.
LEGATTI@ORACLE10> set serveroutput on
LEGATTI@ORACLE10> declare
  2   x boolean;
  3  begin
  4    if is_numeric('anything') then
  5      dbms_output.put_line('TRUE');
  6    else
  7      dbms_output.put_line('FALSE');
  8    end if;
  9  end;
10  /
FALSE
PL/SQL procedure successfully completed.
LEGATTI@ORACLE10> declare
  2   x boolean;
  3  begin
  4    if is_date(sysdate) then
  5      dbms_output.put_line('TRUE');
  6    else
  7      dbms_output.put_line('FALSE');
  8    end if;
  9  end;
10  /
TRUE
PL/SQL procedure successfully completed.In addition, take a look at this [url http://forums.oracle.com/forums/thread.jspa?messageID=1238025&#1238025]thread
Cheers
Legatti

Similar Messages

  • Is there an easy way to find out if a user has a message in their voicemail.

    Is there an easy way to find out if a user has a message in their voicemail from the
    UNITY subscriber page? Or anywhere I can look to see if they do.  I don't have access to the exchange servers.  We are currently running UNITY 5.0(1).  thanks

    The only way you'll be able to do that is to login to Outlook Web Access, or possibly setup an IMAP client to that user's mailbox or have TAC run the DohPropTest in attach mode to return the contents of the user's inbox.  If the first two don't work, I'd go with the latter and let TAC help you verify if there are any messages in the inbox that are unread.
    Hope that helps,
    Brad

  • Designing a banner stand: Is there a easy way to work out the recommend margins / bleed?

    So its my first time creating a banner stand and something of larger scale. I was wondering if there is a certain way to work out the recommended margins for the size of the document? Or should i simply do it by eye. The banner dimensions our 800m x 1200mm.
    Also any other tips for creating larger document would be appreciated.

    It sounds like the same product that we do a lot of here. There's no technical reasons for a particular margin, as they can be full bleed (print right to the edge), so it's a subjective design decision.Take into consideration the content and the context. It could be a something with little content, intended to draw people from a distance (larger margins), or it could be something with a lot of content that will be read from a short distance (smaller margins).
    I tend to do these as 1:1 scale, but bear in mind that InDesign's Optical Kerning will be too tight when you do this.

  • Is there an easy way to find out if the GPIB/ENET adapter is connected to the computer?

    I'm using Component Works for Visual Basic and have no problem with my software on computers with PCMCIA GPIB adapters. The GPIB driver seems to know if the adapter is in the computer or not.
    When my software is used on a computer where the GPIB/ENET adapter is not powered on, the software seems to lock up but eventually comes back with an error. Since there doesn't seem to be an easy way to determine if an adapter is present my code just assumes it's there, which doesn't work with the GPIB/ENET GPIB dll. Is there any way I can look for the board before querying for instuments on the bus?

    Hello David,
    One possible solution would be to ping the ENET box. If you know the IP of the box, a simple ping should immediatly let you know the status of the box.
    Best Regards,
    Aaron K.
    Application Engineer
    National Instruments

  • Is there an easy way to find out your  Bind Variables?

    There are times I get called on a Production Performance problem a little too late. The only way I can trace what happened is by running Statspack reports for an hour or two earlier. But the Top sql comes with bind variables. And without knowing the actual data value it is difficult for us to guess if that is the problematic sql. Is there an way we can find the value for these Bind variables back in time?

    What Oracle version are you on?
    In Oracle 10g, V$SQL_BIND_CATPURE view provides what you want. But keep in mind that bind capturing in not happening on the fly. When the SQL statement is compiled(hard parse), the bind value is captured. And after Oracle periodically updates the bind value.
    If AWR is enabled which is default, you have DBA_HIST_SQLBIND view which provides historical snapshots for V$SQL_BIND_CAPTURE. This may be helpful for you.
    Not in Oracle 10g, it's beyond my knowledge. :)

  • Is there a way to find out the number of hits from iTunes for my podcast?

    Looking over my stats pages I see that 95% of all people listening to my podcast are coming from iTunes mac/windows. I suppose I could do the math, but i'm curious if there is a way to find out the exact number of people subscribed to the podcast in iTunes?
    Eric
    www.letsgetnaughtypodcast.com

    hi there you can use http://www.statcountercom
    this will give you a way to see exactly where everyone is from. just install the code it make and put it in your podcast page. and everytime some one come to the podcast you will find your info
    http://www.radioamerica1.com
    http://radioamerica.podomatic.com
    http://backalleyblues.podomatic.com
    here a few of my podcast that i have , hope this helped also

  • Is there any way to find out the serial number to an old ipod that i cannot find?

    theres a recall on the od ipod nanos the 1st generation ones and i purchased one and im not sure when and currently i am unaware of the whereabouts of the ipod. is there any way to find out the serial number without actually finding the ipod to confirm when i purchased it? thank you any help will be appreciated.

    iPod: How to find the serial number

  • Does anyone know if there's any way to find out what files in my Library

         Does anyone know if there's any way to find out what files in my Library I can delete? I just cleaned off my HD onto a media drive as a back up so all my movies documents and photos are gone but my Library seems to be a huge space hog eating sixty gigs of space and I do have alot of apps but they don't take up a third of that space... Any ideas how I can figure out what is wasting all this space? I had Spring Cleaning once but found it to be rather confusing as to what was essential to the OS and what not...
    Thanks,
    Matt

    Get free OmniDisk Sweeper. I can't imagine how you could have sixty GB in that folder. My entire ~Library isn't even 1GB. Are you sure you're not talking about your entire Home folder?
    Can you post a screenshot of the contents of that folder.
    Check again. Are you sure you moved all the Movies etc. out? Could have left duplicates of everything behind when you did this.
    Message was edited by: WZZZ

  • Is there a way to find out the given parameter is statis or Dynamic ?

    Hi All,
    Can some one tell me the best way to find out the given parameter is static or Dynamic?
    Thanks & Regards
    Rajesh Meda

    Well, Actually  I know there is a way for checking from RZ11 transaction.
    1.I need to prepare report with all the ABAP parameters  in the system that can be changed on fly
    2.I believe there is one ABAP report that will specify all the dynamic parameters. I need the report name
    Thanks & Regards
    Rajesh Meda

  • I moved several folders from my Mac to iCloud and I cannot easily find them.  Is there an easier way to find them instead of searching in Spotlight?

    I moved several folders from my Mac to iCloud and I cannot easily find them.  Is there an easier way to find them instead of searching in Spotlight?

    If you have facing pages, you have to set up the document with facing pages that is what is it for. If you have a spreadwide design as above, keep the spreads together. There is not even one reason not to do so.
    Only for wire-O-bindings might a different workflow useful, but also with facing pages documents and only when the left page and the right page have not a spread wide design:
    //// I did one mistake, I created a doument with a right binding, but it would work the same way with left binding.)
    1. Create a document with Facing Pages.
    2. Select the Spread in the Page Panel (Window > Page Panel) and in the panel’s flyout menu deselect "Allow Selected Spread to Shuffle". The spread’s page number will appear in brackets.
    3. Select a single page of the spread and drag it to the side until a vertical bar appears.
    4. Now you have the result.
    Left and right pages have their own spread and will have a bleed around each page without taking information from the other page.

  • I have a lot of duplicate songs on my iPhone 4--Is there an easy way to find and delete duplicates?

    Is there an easy way to find and delete duplicate songs on an IPhone 4?

    A belated hello.  On the topic of duplicate songs / tracks showing up in, say, your iPhone Music app but not in your iTunes Library, with these versions installed ....
    iTunes 10.5
    iPhone 4 running on iOS 5
    .... I discovered this too.  This is what I did:
    1. purchased full album from the iTunes Store
    (once download completed, album magically showed up in iPhone Music app, as expected, without having to sync)
    2. I then went to my iTunes Music view and edited the album year (Multiple Item Information)
    3. Synced
    4. All album tracks showed up in duplicate in iPhone Music app (but not in iTunes view)
    Solution:
    1. in iTunes, I changed back the album year to the one iTunes Store originally downloaded
    2. Re-synced
    3. Now all album tracks show up but no longer in duplicate in iPhone Music app
    Lesson learned: When purchasing music from iTunes Store, leave metadata untouched.

  • Is there a way to find out the GUI version of a logged in user

    Hello all,
    SAP provides a method in CL_GUI_FRONT_END_SERVICES called GET_GUI_VERSION. This works fine for supplying the version information for the logged in user.
    Unfortunately, it doesn't have any input parameters to specify "ANY"  user name.
    I'm looking for a way to find out the gui version of all logged in users.
    Tables USR41 will give me a list of the logged in users
    I can then use USR21, ADR6 and ADRP to get more user info.
    But, I can't find a way to determine what GUI version each of the users is using.
    Does anyone have any ideas?
    Thanks
    Ed Baker

    We have done in a different way. ie we have used userexit SUSR0001 and coded using
    * Collect SAPGUI info of the user logging on
    call function 'RFC_SYSTEM_INFO' destination 'SAPGUI'
      importing
        rfcsi_export = i_rfcsi.
    Here i_rfcsi-rfcsaprl contains the version info of SAPGUI
    and updated this info in a custom table.

  • Looking for a way to find out the x,y coordinates of a string inside a PDF

    Hi!
    I'm looking for a way to find out the x,y coordinates of a string inside a PDF (with free java api's only)
    I got a pdf, and a string to find inside it, what i need to do is to get this string x,y position inside that pdf....
    If any one knows of such, plz let me know...
    Thanx ahead
    Daniel.

    vedmack wrote:
    Hi!
    I'm looking for a way to find out the x,y coordinates of a string inside a PDF (with free java api's only)
    I got a pdf, and a string to find inside it, what i need to do is to get this string x,y position inside that pdf....
    If any one knows of such, plz let me know...
    Thanx ahead
    Daniel.AFAIK, a string of text does not have an (x,y) location inside a PDF file. The location is exists on your screen, and will differ whenever you adjust the resolution of it. Text can have a location when it's stored as an image though, but than it's really the location of a certain number of pixels (not necessarily a string!).

  • How to find out the type of the value stored in a string variable?

    Hi,
    How do i find out the type of the value stored in a string variable?
    for example,
    I have a string variable str, in which the following type of values wil be stored
    1) Intger
    2) Long
    3) boolean
    4) Char
    Is there any method to find out the type of the value, anything like str.getType()?. Please kindly help me. Thanks in advance.

    Hi All, i'm sorry for the double posting, by mistake it occured.
    Thanks for your replies, i have a string variable str, in which the value is stored and i have another string variable type, in which the type of the value is stored.
    For example,
    String str = "15";
    String type = "Integer";
    Is there any way to verify whether the value stroed in str is of type stored in the variable 'type'. I want to write a method of type boolean, it will throw true of the value stored in str is of type 'type'. Thanks

  • How to find out the type of the object ?

    how would i find out the type of an object reference variable ?
    it would be nice if there was some sort of getType() method that would return a string to tell me the type of the object -- just for testing purposes

    try
    Object.getClass().getName();
    or just
    Object.getClass().toString();
    so something like this in your code:
    Object obj = new Foo();
    System.out.println(""+obj.getClass());
    etc.

Maybe you are looking for

  • Default Podcast library change - Finder level.

    I have a growing Podcast library that updates and downloads daily. I would like to change the default location from the main hard drive to a larger, external hard drive. In other words, I would like all the new episodes to default to the new external

  • Should i buy it or not ?

    i was keen to order a copy of aperture, but after reading through a few of the messages in this discussion its got me worried to say the least ! It seems as if there are people talking a bout its bad points more than its good but that could be becaus

  • XI Sample Resumes

    Hi I'm Newbie to XI.Can someone from this group send me sample resumes on XI. edit I'd really appreciate your help. Thank you, Sat Message was edited by: Moderator

  • Help on finding a reference to a table

    Hi , my oracle verion : oracle 10G if i fire a query something like : select * from user_source where text like '%CLASSIFICATION%' it will return me rows and help me narrow my search onto a mere 100 rows to find a reference for a table called 'WC_CLA

  • Incorrect Artwork on iPod?!  Help Please!

    I have well over 3500 songs on my iPod right now, and I'm having an issue that's driving me batty. I like the artwork to show on the iPod, so I read the instructions on how to associate artwork. I put a pic of the album in the folder for that album s