Can I use custom datatype on a column?

Can I create a column using custom datatypes?
Something like this?????????????
ALTER TABLE ed_fotos ADD foto "ORDSYS.ORDVIR";
The datatype "ORDSYS.ORDVIR" has been created to replace a virage datatype on my development environment.
CREATE OR REPLACE TYPE "ORDSYS.ORDVIR" AS OBJECT (
     MEMBER FUNCTION getwidth RETURN NUMBER,
     MEMBER FUNCTION getheight RETURN NUMBER
CREATE OR REPLACE TYPE BODY "ORDSYS.ORDVIR" AS OBJECT (
     MEMBER FUNCTION getwidth RETURN NUMBER IS
     BEGIN
          return 1000;
     END getwidth;
     MEMBER FUNCTION getheight RETURN NUMBER IS
     BEGIN
          return 1000;
     END getheight;
/

Hi, tks for the help.
It is almost working... I can create a column but I cant select the data:
select foto from ed_fotos
ORA-00932: unconsistent data types: NUMBER expected ORDVIR returned
select foto.getwidth() from ed_fotos
ORA-00904: "FOTO"."GETWIDTH": invalid identifier
This is my methods:
CREATE OR REPLACE TYPE ORDVIR AS OBJECT (
     ID NUMBER,
     MEMBER FUNCTION getwidth RETURN NUMBER,
     MEMBER FUNCTION getheight RETURN NUMBER
CREATE OR REPLACE TYPE BODY ORDVIR AS OBJECT (
     MEMBER FUNCTION getwidth RETURN NUMBER IS
     BEGIN
          return 1000;
     END getwidth;
     MEMBER FUNCTION getheight RETURN NUMBER IS
     BEGIN
          return 1000;
     END getheight;
/

Similar Messages

  • Using number datatype for date column

    Hi
    Is there a side effect for using "number" datatype for "date" column?
    If so, what is the disadvantage?
    Many thanks

    Hi,
    Ora_83 wrote:
    Hi
    Is there a side effect for using "number" datatype for "date" column?
    If so, what is the disadvantage?Yes, there's a definite disadvantage.
    Oracle provides date arithmetic and a number of functions for manipulating DATEs. None of them work with numbers.
    For example,
    SELECT    TRUNC (order_date, 'MONTH')     AS order_month
    ,       AVG (ship_date - order_date)     AS avg_delay
    FROM       orders
    GROUP BY  TRUNC (order_date, 'MONTH')
    ;order_month involves a DATE function; it's pretty easy to find the month that conatins order_date.
    avg_delay involves date arithmetic. It's extrememly easy to find how much the time passed between order_date and ship_date.
    Depending on how you code dates as numbers, doing either one of the above may be just as easy, but doing the other will be very difficult. You'll waste a lot of effort converting the NUMBERs to real DATEs whenever you need to manipulate them.
    Validation can be very difficult for NUMBERs, also.
    Watch this forum. It's a rare day when there's not some question about how to get around a problem caused by storing dates in a NUMBER (or VARCHAR2) column. Don't add to that. Always use DATE columns for dates.

  • Can we use custom RFC in creating models in Visual composer??

    Dear Experts,
    Can we use custom RFC in creating models in Visual composer??
    If yes, kindly provide some documents or links which would guide me how to achieve it.
    Warm Regards
    Upendra Agrawal

    Hi,
    Yes,you can do it.
    Configure the rfc and use like others Standard BAPI procedure.
    [https://www.sdn.sap.com/irj/scn/wiki?path=/display/vc/connectivity]
    Regards,
    Govindu

  • How can we use Custom MessageBox in SelectionChangedEvent of LongListSelector for Windows Phone 8

    Dear Sir/Madam,
    How can we use Custom MessageBox in SelectionChangedEvent of LongListSelector for Windows Phone 8.
    Actually my problem is that When i am using Custom  MessageBox in SelectionChangedEvent of LongListSelector,when i am click Open(Left Button) it's working fine and navigated correctly,But when i am Click the No(Right Button) then it stayed in same page
    but all that page is in stuckup i mean that page is not working and not doing any event.
    My C#.net Code
    private async void userPageLongListSelector_SelectionChanged(object sender, SelectionChangedEventArgs e)
    if (e.AddedItems.Count > 0)
    if (userPageLongListSelector.SelectedItem == null)
    return;
    if (dbTenMin == null)
    dbTenMin = new Database(ApplicationData.Current.LocalFolder, "tenMInDBSchema.db");
    await dbTenMin.OpenAsync();
    var res = (sender as LongListSelector).SelectedItem as _10Min._10MinClass.minUserPages;
    var resIndex = (sender as LongListSelector).ItemsSource.IndexOf(userPageLongListSelector.SelectedItem);
    string selectedPageName = res.userPages.ToString();
    string selectedPageDesignUser = res.pageDesignUser.ToString();
    int selectedIndex = resIndex;
    CustomMessageBox messageBox = new CustomMessageBox()
    Caption = "Message...!",
    Message = "This form need offline datalist,Please load now.",
    LeftButtonContent = "Open",
    RightButtonContent = "No"
    messageBox.Dismissed += (s1, e1) =>
    switch (e1.Result)
    case CustomMessageBoxResult.LeftButton:
    string uidAndpwd = _10MinClass._10MinStaticClass.csUidAndPwd.ToString();
    _10MinClass._10MinStaticClass.csDataListPageDetails = selectedPageDataDetailsForSchema.ToString();
    _10MinClass._10MinStaticClass.csAllDataLists = offlineDataBaseDataListNam;
    _10MinClass._10MinStaticClass.csNotCreatedSchemaNameOfDBList = notCreatedDataLists;
    userPageLongListSelector.SelectedItem = null;
    if (dbTenMin != null)
    dbTenMin.Dispose();
    dbTenMin = null;
    NavigationService.Navigate(new Uri("/10MinformDataList.xaml", UriKind.Relative));
    else
    NavigationService.Navigate(new Uri("/10MinformDataList.xaml", UriKind.Relative));
    break;
    case CustomMessageBoxResult.RightButton:
    break;
    case CustomMessageBoxResult.None:
    break;
    default:
    break;
    messageBox.Show();
    Same custom messagebox code working in Phone_BackKeyPress event i am writing the code in Right Button that e.OriginalSource.ToString(); then it is working fine.
    But It is not working in Selection Changed Event in LongListSelector control in Windows Phone 8.
    Please help me,as soon as possible.
    Thanks & Regards,
    SrinivaaS.

    What happens if you leave the implementation for LeftButton empty as well , does the page gets stuck in that case also, if you press left button?
    i.e.
    CustomMessageBox messageBox = new CustomMessageBox()
    Caption = "Message...!",
    Message = "This form need offline datalist,Please load now.",
    LeftButtonContent = "Open",
    RightButtonContent = "No"
    messageBox.Dismissed += (s1, e1) =>
    switch (e1.Result)
    case CustomMessageBoxResult.LeftButton:
    break;
    case CustomMessageBoxResult.RightButton:
    break;
    case CustomMessageBoxResult.None:
    break;
    default:
    break;
    messageBox.Show();
    http://developer.nokia.com/community/wiki/Using_Crypto%2B%2B_library_with_Windows_Phone_8

  • Can I use custom query in DB Adapter with Polling

    Hi All,
    I am getting problem while using db adapter with polling. Can I use custom query in db adapter with polling.
    I am using 2 tables; table 1 and table2
    Structure of table1 is as:
    File_name
    Batch_id
    Creation_date
    Status
    Structure of table2 is as:
    Batch_id
    Employee_ID
    Last_Name
    First_Name
    Middle_Name
    Group_ID
    Site_ID
    Dept_Num
    Report_id
    I have to use below query while polling to table1
    Select count(*) as NOSEXP, Report_id
    from table1, table2
    where table2.batch_id =
    table2.batch_id
    and table1.Status= 0
    group by Report_id;
    I mean, when I use DB adapter to poll table1, I have to use above query.
    Can you Please suggest on this.
    Thanks in advance.

    I will check for existance not based on Primary key but based on three other fields in the table. I think , by default DB adapter configured for MERGE checks for existance based on PK. Can we change the Primary Key in the mapping file after the DB adapter is configured. In that case , will it check for existance based on the fields , I mention.
    Edited by: user12020809 on Sep 16, 2012 6:08 PM

  • Can we use custom subtype (9001) in 0105?

    Hi,
    Can we user custom subtype 9001 in 0105 to store the user ids for ESS&MSS?
    I know by default the standard function modules of ESS will look for a user id in 0105 with subtype 0001. But 0001 has been used by some other portal pointing the same back end. we cannot use the same user id for ESS.
    For ESS, can we use custom subtype for the user ids? Is there any configuration to handle this scenario? How do we link the new portal should validate the user ids in custom subtype.
    Advance thanks for your valuable input.
    cheers
    Jayanthi

    Hi Kirsten,
    Thanks for your feedback.
    Definitly I dont want to make changes to any of the standard programs. Changing the existing portal is also a major impact in the project.
    Is there any configuration option available for ESS to point to the custom subtype 0105? We are in requirement gathering phase,the DEV environment is yet to be ready.
    If you find any info, please let me know.
    cheers
    Jayanthi

  • How can I use custom repeating event in my iPad Air calendar iOS 8.0.2

    How can I use custom repeating event in my iPad Air calendar iOS 8.0.2?

    Unless something has changed, you can't. The iPad has limited ability to make repeats. However if you make the custom repeats in another program you can send them to or import them into your calendar and the iPad will respect the custom repeat.

  • Can i use custom css ?

    can i use custom css in links or anywhere ? thank you

    Hi Krypton,
    You will not be able to able to alter the html generated via Muse and such practices are not recommended as well. In case you are absolutely sure what you are doing then you need to use custom JS to modify the html that muse renders. Again, the custom JS will be inserted using the options that I mentioned above in my previous post.
    - Abhishek Maurya

  • Can LSMW use customer specific mapping program?

    Can LSMW use customer specific mapping program?
    I have created a LSMW project to migrate various objects (Material, pricing conditions, conditions) for our new division. I want to add another object – Purchasing Info records. We already have a customer specific mapping program that prepares the data for SXDB to complete the migration. After creating the new object in LSMW, I looked in step 1 (Maintain object attributes) but couldn’t see anywhere convenient to put the program name.
    I know that LSMW provides a mapping facility of it’s own, but can I avoid reinventing the wheel and instead own specific program?
    Slath

    Hi,
    I am afraid, that is not possible. It is possible to create your own BDC recording but not the way you want to do. LSMW needs to know your source and target structures and then you do the mapping from source to target within LSMW. It stores this mapping information in several tables and unless LSMW has those entries, it will not be able to generate the mapping(conversion) program. Also, LSMW creates a 'read' file and later a 'converted' file. Your mapping program may not be doing that, which means LSMW cannot execute it in later steps to actually create the Purchase Info Records.
    You will have to create your own BI or DI program or a business object and a BAPI, or an IDOC type and message type and then publish it to standard SAP, then may be it will be possible. But that will be lot of work, instead use the standard one availble to you.
    If you want to use your existing code then, when you get to the mapping part of it, just cut and paste the logic specific to each field in the appropriate place, or don't do any individual field mapping, but just paste all the mapping logic in the ENDOF_RECORD_ section.
    Regards,
    Srinivas

  • How can I use custom WLST commands for Oracle SOA Suite in Weblogic

    Hi There,
    I'm trying to view and search the weblogic log files using WLST on a Solaris/Unix system.
    I have come across this "custom WLST commands for Oracle SOA Suite" and thought of using the custom logging commands to get my task done.
    However, my WLST shell is not recognizing the commands and giving me the NameError!
    wls:/devDomain1/domainRuntime> listLogs()
    Traceback (innermost last):
    File "<console>", line 1, in ?
    NameError: listLogs
    I tried the commands listLogs, displayLogs, getLogLevel & setLogLevel but in vain!
    I have followed the instructions as per the oracle recommendation of using Custom WLST commands (http://docs.oracle.com/cd/E29597_01/core.1111/e10105/getstart.htm#ASADM10692) as below
    - Launched the WLST shell from Oracle Home.
    cd ORACLE_HOME/common/bin
    ./wlst.sh
    - Tried to run the listLogs command from domainRuntime()
    I would like to know if I need to import any additional libraries to run the custom WLST commands for Oracle SOA Suite in my WLST shell?
    I have only weblogic 10.3.1 server installed on my Solaris 10 machine on which I have deployed the OSB application software.
    There is no SOA Suite installed.
    Or is there any other way I can browse the Server Log file and get the list of log messages? Basically I would like to use this feature in my script to customize it according to my requirement of listing specific error logs which I can work it out if I know how to make these commands work.
    Please advise if this is possible and how?
    Cheers.
    Satish

    I have tried on my OSB installation (no SOA Suite here), the command listLogs() works (I was in online mode, after a connect), and the classpath is:
    CLASSPATH=/opt/oracle/fmw11_1_1_5/patch_wls1035/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/opt/oracle/fw11_1_1_5/patch_ocp360/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/usr/lib/jvm/java-1.6.0-sun-1.6.0.33.x6_64/lib/tools.jar:/opt/oracle/fmw11_1_1_5/wlserver_10.3/server/lib/weblogic_sp.jar:/opt/oracle/fmw11_1_1_5/wlserver_10./server/lib/weblogic.jar:/opt/oracle/fmw11_1_1_5/modules/features/weblogic.server.modules_10.3.5.0.jar:/opt/oracle/fmw111_1_5/wlserver_10.3/server/lib/webservices.jar:/opt/oracle/fmw11_1_1_5/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/optoracle/fmw11_1_1_5/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar::/opt/oracle/fmw11_1_1_5/oracle_common/moules/oracle.jrf_11.1.1/jrf-wlstman.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/lib/adfscripting.jar:/opt/oracl/fmw11_1_1_5/oracle_common/common/wlst/lib/adf-share-mbeans-wlst.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/lb/mdswlst.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/resources/auditwlst.jar:/opt/oracle/fmw11_1_1_5/oracle_cmmon/common/wlst/resources/igfwlsthelp.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/resources/jps-wlst.jar:/optoracle/fmw11_1_1_5/oracle_common/common/wlst/resources/jrf-wlst.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/reources/oamap_help.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/resources/oamAuthnProvider.jar:/opt/oracle/fmw111_1_5/oracle_common/common/wlst/resources/ossoiap_help.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/resources/osoiap.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/resources/ovdwlsthelp.jar:/opt/oracle/fmw11_1_1_5/oracle_comon/common/wlst/resources/sslconfigwlst.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/resources/wsm-wlst.jar:/optoracle/fmw11_1_1_5/utils/config/10.3/config-launch.jar::/opt/oracle/fmw11_1_1_5/wlserver_10.3/common/derby/lib/derbynet.ar:/opt/oracle/fmw11_1_1_5/wlserver_10.3/common/derby/lib/derbyclient.jar:/opt/oracle/fmw11_1_1_5/wlserver_10.3/common/drby/lib/derbytools.jar::
    The wlst.sh I have used is /opt/oracle/fmw11_1_1_5/osb/common/bin/wlst.sh
    I hope this can help

  • How can i use Itemsyms in a first column?

    I want to use use Itemsyms in my first column of mulitlist box. But it always exist with first content of ItemNames. I want to
    know whether I can put a Itemsyms in a single column and data in other columns. Should i create a null string array and set it as
    a first column?  And the Itemsyms only can be put in the first column?
    I feel confused now after try many times. 
    please give me help.
    attached my vi.
    By the way, When i try to set number of row and column of list box, for column, the set value is 5, but the value get from property is 4.
    I don't know the reason.
    thanks
    br.
    Attachments:
    subvi_ListCheck.vi ‏16 KB
    main.vi ‏11 KB

    mmm2006 wrote:
    Hi,
    Thanks.
    How about other my questions? Please give me your advice.
    Thanks.
    mmm2006 wrote:
    I want to use use Itemsyms in my first column of mulitlist box. But it always exist with first content of ItemNames. I want to
    know whether I can put a Itemsyms in a single column and data in other columns. Should i create a null string array and set it as
    a first column?  And the Itemsyms only can be put in the first column?
    I feel confused now after try many times. 
    please give me help.
    I do not understand this term "Itemsyms".
    If you create a "null string array", your first column will become empty. You want this way or you want to replace your data in the first column? Both are different...
    You can very weel put your "Itemsyms" in a single column & data in others.
    - Partha
    LabVIEW - Wires that catch bugs!

  • How can I use custom sizes with the hp deskjet 3050a

    Why can't I find a place to cusomize card stock sizes in my printer

    The driver that is used for the Deskjet 3050a does not support custom sizes. It has a pre-set of choices and this is all the driver supports.
    You may be able to use an alternate driver, such as the HP Deskjet 9800 driver, that supports using custom paper sizes. Check the thread located here for information on how to use an alternate driver.
    Hope this helps.
    -------------How do I give Kudos? | How do I mark a post as Solved? --------------------------------------------------------
    I am not an HP employee.

  • How can I use jbo:ShowValue for some columns and bc4juix:RenderValue for other co

    Using a UIX/JSP page, how can I get the <jbo:ShowValue> tag to work in the following situation? I've ditched the "AttributeIterate" so that I can manually select the columns I want.
    --- snip ---
    <uix:form name="form1" method="GET">
    <bc4juix:Table datasource="ds1" >
    <uix:columnHeaderStamp>
    <uix:styledText textBinding="LABEL"/>
    </uix:columnHeaderStamp>
    <%--
    <jbo:AttributeIterate id="dsAttributes" datasource="ds1" hideattributes="UixShowHide">
    <bc4juix:RenderValue datasource="ds1" dataitem="<%=dsAttributes.getName()%>" />
    </jbo:AttributeIterate>
    --%>
    <bc4juix:RenderValue datasource="ds1" dataitem="FacilityDesc" />
    <bc4juix:RenderValue datasource="ds1" dataitem="LocationId" />
    <bc4juix:RenderValue datasource="ds1" dataitem="LocationDesc" />
    <%-- ** THE FOLLOWING DOES NOT DISPLAY ON THE BROWSE_EDIT_PAGE ** --%>
    <jbo:ShowValue datasource="ds1" dataitem="Notes" ></jbo:ShowValue>     
    <%-- ** THE FOLLOWING DOES NOT DISPLAY ON THE BROWSE_EDIT_PAGE ** --%>
    <uix:rawText>
    <jbo:ShowValue datasource="ds1" dataitem="Notes" ></jbo:ShowValue>     
    </uix:rawText>
    <%-- ** THE FOLLOWING DOES NOT DISPLAY ON THE BROWSE_EDIT_PAGE ** --%>
    <uix:contents>
    <uix:rawText>
    <jbo:ShowValue datasource="ds1" dataitem="Notes" ></jbo:ShowValue>     
    </uix:rawText>
    </uix:contents>
    --- snip ---
    What am I doing wrong and how can I fix this?
    Bill G...

    This will not work inside of the bc4juix:table, this tag pulls the data from the data source, it doesn't allow you to add ShowValue tags inside of the table. Take alook at the UIX Developer Guide for more information on the Table tag. The ShowValue tag can be used in a uix hierarchy outside of the tabel tag.

  • Can i use Custom Tags for Database retrieval (as per MVC pattern)?

    In our project we are dealing with database, and i've used the Cutom Tags for database retrieval (as per the Article from Mr Faisal Khan) and it is working fine. But i have a doubt if it affects the performance in any way . I wanted to know if its recommendable to use Custom Tags for the DB retrieval as per MVC Pattern or shall i create a intermediate bean and then call the bean in custom tag.
    Thanks
    Prakash

    Putting database code in your JSPs certainly couples your view to the database. That's usually not good.
    If it's a simple app, it might be justified.
    When you start having lots of pages and complex business logic it becomes less attractive. - MOD

  • Can't use custom ClassLoader with ObjectInputStream

    Hi all,
    I want to transmit an object whose class is unknown to the receiver and whose class may not be loaded. Of course when the inputstream's readObject method tries to receive this class, it fails with a ClassNotFoundException. I have a custom FileClassLoader to dynamically load classes, this is tested and works.
    I can dynamically load this class and prove that the class was loaded by calling class.newInstance() from the loader.loadClass method. But then when I try to read that same class from the input stream, it says ClassNotFoundException!
    The code snippet looks like this:
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    FileClassLoader loader = new FileClassLoader(classFolder);
    Class L = loader.loadClass(className); // no .class at end
    System.out.println("New Instance "+L.newInstance().toString()); // works
    ObjectInputStream eventStream = ... // stream from a socket
    eventStream.readObject(); // throws class not found exception!
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    The only thing I can think is that the input stream only looks for classes loaded by the system classloader, could that be true? What other possibilities are there?
    If this is more appropriate for another forum just let me know and I'll post it there.
    Thanks in advance for any helpful hints anybody has!

    I was thinking of something along the lines of
    ObjectInputStream eventStream = (ObjectInputStream)Class.forName("java.io.ObjectInputStream", true, loader).newInstance();Of course, you would really have to get the proper Constructor for the class - and that just gets too long and stupid. Besides, I actually tried my suggestion, and it didn't work. I also tried setting the ContextClassLoader for the current thread (and creating a new thread with the ContextClassLoader set to "loader"). None of that works. Just setting the ContextClassLoader does not make the thread use it implicitly, it's apparently just a way to pass another ClassLoader to a thread, but it still needs to be used explicitly in a Class.forName call.
    I did, however, try David's suggestions of overriding resolveClass in ObjectInputStream. That worked fine! Here's what I created:
    import java.net.URLClassLoader;
    import java.io.InputStream;
    import java.io.IOException;
    import java.io.ObjectInputStream;
    import java.io.ObjectStreamClass;
    import java.io.StreamCorruptedException;
    public class MyObjectInputStream extends java.io.ObjectInputStream
        URLClassLoader myLoader = null;
        public MyObjectInputStream(URLClassLoader newLoader, InputStream theStream) throws IOException, StreamCorruptedException
            super(theStream);
            myLoader = newLoader;
        protected Class resolveClass(ObjectStreamClass osc) throws IOException, ClassNotFoundException
            System.out.println("Hey, I'm in my resolveClass");
            Class theClass = null;
            try
                theClass = Class.forName(osc.getName(), true, myLoader);
            catch (Exception e)
                System.err.println("An Error in my ResolveClass:");
                e.printStackTrace();
            return theClass;
    }You then just create your ObjectInputStream with
    ObjectInputStream eventStream = new MyObjectInputStream(loader, theSocket.getInputStream());

Maybe you are looking for

  • How can I download the new Apple health app on my ipad mini?

    I Don't know how to download the new Apple health app on my iPad mini. its the one that you get when you do the new update on iphone. With the white backround and red heart. Thanks

  • Distributed Current Budget shows incorrect value in P6 EPPM 8.3

    Hi All, I am new to P6 EPPM and i would like to understand "How Distributed Current Budget value is calcluated". Please find the below screen shot which shows the "Distributed current Budget" value is greater than total of Current Budget allocated fo

  • Need help playing video in elements 9

    I have windows 7 and just got priemiere elements 9.  When it plays my .mov videos it only plays sound for a few seconds then stops.  The video continues to play with no sound.  If I open the same video in Quicktime or in photoshop elements 9 it plays

  • Abap workbench-2003 certification

    I should certification for my project requirement .If any one taken certification please help me in this . Give me the details about registeration and the materials to be refered for the exam. Thanks & Regards, devika.

  • How to permanently print in grayscale?

    I would like to save on ink and permanently print in grayscale, but it seems there is no option to do this. i have to tick grayscale printing every time and it becomes quite annoying. is there a way to set up the printer to just print in grayscale? i