Oracle generic datatype that can be cast as other datatype ?
I have a function that currently returns a DATE datatype but want to provide functionality so that depending on the value of a parameter it will return either a DATE or a VARCHAR2. For example
FUNCTION AddDate(p_dt_DateIn IN DATE, p_vch_DType IN VARCHAR2)
RETURN ????? IS
IF UPPER(p_vch_DType) = 'C' THEN
RETURN TO_CHAR(p_dt_DateIn + 2, 'DD Mon YYYY')
ELSE
RETURN p_dt_DateIn + 2
END IF;
The calling procedure would then cast the returned type.
Does a generic datatype like this exist in Oracle ? I've been looking at overloading using packages but it basically boils down to using two seperate functions for each returned datatype which i really don't want to do.
Normally, we would implement this as overloaded functions in a package:
CREATE PACKAGE my_package AS
FUNCTION addDate (p_dt_DateIn IN DATE) RETURN DATE;
FUNCTION addDate (p_vc_DateIn IN VARCHAR2) RETURN VARCHAR2;
END;the point being that in the package body the varchar version can call the date version, so you actually only code the process once.
The advantage of this approach is that the calling program doesn't have to cast the result, because Oracle uses the right function for the parameter data type.
Cheers, APC
Similar Messages
-
I'm working on a social media site, and I would like to give users the ability to create simple profiles that can be viewed by other users. Is there any way I can do this in Muse CC? Any good resource websites with code I can embed?
Muse form widgets can only email the form submission data to a specified email address for non-BC hosting at this time. For BC with webCommerce plan and above, this should be possible with the help of webApps however, that is an advanced topic and would require some knowledge of CMS and HTML to implement <http://helpx.adobe.com/business-catalyst/partner/web-apps.html>.
Also this will not be possible with Muse on its own as Muse outputs static pages only and what you are looking for requires backend technology to work (that BC offers).
Thanks,
Vinayak -
I took pictures at a family reunion and promised to share the photos with all the relatives. I can't get pictures from iphoto onto a disc that can be shared on other computers besides an Apple. I want everyone to be able to view the pictures and print them if they want to. I have a DVD with the pictures on them, how do I make copies of photos (not slideshows of photos) using my Apple?
Select the pics in the iPhoto Window and go File -> Export and export them to a Folder on the Desktop. Burn that to disk with the Finder. Result: a disk with a folder of images viewable on any system anywhere.
Regards
TD -
Create a fillable form that can be saved by others
Hi, I'm working in Adobe Acrobat X Pro, I'm on a PC
I know that you go to File>Save As...>Reader extended pdf>
After that I get "Enable Adding Text in Documents (that are not fillable form)...
I then get a form that is using a "typewriter" tool." That's not what I want. I want a fillable form that can be saved by the person filling out the form and not have to use the typewriter tool. I don't like the way that looks or works. I hope there is someone that can help. I used to be able to do this and don't understand what has changed.
Thanks!Advanced > Enable Usage Rights in Adobe Reader
Yes, it will allow pre-11 Reader users to save. -
Hi,
I am able to create a new panel for CS5 and CS6, however, if I create a CS5 panel (thinking it should work in CS6 as well), when I try to install the panel ZXP file in CS6 Extenstion Manager, I am unable to do so...meaning, the CS5 panel will not load for users with CS6? Is there any way to create a panel in Configurator 3 that will export one zxp (or similar package file) that can install in multple versions of Photoshop?
I note in Configurator 2, I was able to export an mxi file that I could convert in Extension Magager 3 and that seemed to open without issue, however with Configurator 3, I don't see any other export options but zxp. Any help on this would be great! Thank you!!
EvanBecause of the difference of scripting interface of CS5 and CS6, Configurator cannot create a panel that works for multiple versions of Photoshop. You need to create two of them for CS5 and CS6. In your case, I suggest you create a panel of CS5, and then create a version of CS6 by clicking "Edit->Convert to CS6". (Some buttons will be lost if those buttons are not supported in CS6)
Configurator 3 creates the zxp for you and you need not to create one with mxi file and Extension Manager. -
We are planning to build a competency catalogue to be used in our company, which is an IT services organization. Is there a standard competency catalogue available in HCM which can be used by IT Services organization? Or should it be built from scratch using place holders available in HCM?
- VikramIs the database on the server with the Niagara chipset ? If so, there are known performance issues for this combination. See MOS Doc 781763.1 (Migration from fast single threaded CPU machine to CMT UltraSPARC T1 and T2 results in increased CPU reporting) for details.
Bottom line, the Niagara chipset is not recommended for database servers - they are fine for application or web servers.
HTH
Srini -
Can I develop an application on ios that can be called by other applications?
I'm trying to develop a service application on ios. I know that I could use custom url schema to communicate between applications and I can get handleUrl event , in case of using objective c. But I don't know if I can do that or how to do that in flash builder 4.5.1.
I found an article which said I can regist my custom url schema in app.xml but I found nothing about how I can handle the custom url call. Is there an event or what? Does anybody know that?
Thanks!Hi Jenny,
I've just tried custom URI with iOS and I am able to receive the argument with length 1, which has the complete url I browsed.
For Eg: If I launch url example://xyz?abc, I get the complete url as 1st element of the e.arguments array.
public function invokeHandler(e:InvokeEvent):void{
label1.text = "";
label1.appendText(e.arguments.length.toString() + " ");
for (var i:int=0;i<e.arguments.length;i++)
label1.appendText(e.arguments[i] + " ");
label1.appendText(e.reason);
Reason should always be standard if it's not launched from login. Currently on Mobile it will be standard only.
Hope it helps.
-Pahup -
Method that can be used for multiple views
Hello,
I've got three tables: Person, Company, Adress. Each Person/Company can have mulitple adresses. So Adress has a foreign key to Person and Company. In ADF BC I've created two views for Adress: PersonAdressView, that has PersonView as Master and CompanyAdressView that has CompanyView as Master. Now I want a copy functionality, that validates and copies a given Adress row. I want this functionality for PersonAdressView and for CompanyAdressView. Is there a possiblity to write generic code that can do this?
The logic that works on CompanyAdressView/CompanyAdressViewRowImpl and on PersonAdressView/PersonAdressViewRowImpl is the same. But the java datatypes are in so many lines different that it is almost impossible to use common code. Is it possible to resolve this problem with common base classes? If it is, I have no idea how to create them.
regards
JörgHi,
create a custom version of ViewObject (extending ViewObjectImpl) and base the two ViewObjects on your custom VO (extend).
Frank -
How should I create a swing UI that can be consumed by a variety of apps?
Hi,
I have written a few different swing based java applications that could use a similar user interface class. I would like to create user interface that opens in a popup window, allows the user to do some work, and then returns a resulting object to the parent UI. My needs are too cusomtized to use a standard dialog object.
So, what is the proper way to build a UI class that can be consumed by other applications? I don't know if I build such a thing in a JFrame, JPanel, etc. Pointers to a specific tutorial would be very helpful. I just want to make sure I can build this as a stand alone project that I can consume by other projects.
Thanks very much,
AlanFor a Swing GUI object which can be shared among several applications, I would use a JPanel. If you want something which pops up and returns an object based on user input, I would use one of the standard JDialog static methods, passing it an instance of this JPanel.
-
seriously, this issue is really annoying. why wont my songs download? it wont stop saying there is an error. this needs to be fixed. refund or apple needs to put these songs in my itunes manually if that can be done.
seriously, this issue is really annoying. why wont my songs download? it wont stop saying there is an error. this needs to be fixed. refund or apple needs to put these songs in my itunes manually if that can be done.
-
The combination of artwork size and resolution exceeds the maximum that can be rasterized.
hi there, im rajesh M S Aaryan, Creative agent @ SmartDesignstudios. which i founded.
here is my Solution for above Question
Created File by giving 48 Inches (Hieght) * 240 inches (width) in Illustrator after Complete design, i just tried Export it to .Tif Format but error Occurred "the combination of artwork size and resolution exceeds the maximum that can be rasterized".
Answer: Save the file as EPS format and open in Photoshop do no alter anything finally save as .Tif Format
this actually worksyes we can create
try to Export into .tiff format"
you'll get this error
the combination of artwork size and resolution exceeds the maximum that can be rasterized. -
Bootcamp... what's the worst that can happen
Apple says that Windows XP install disk must have service pack 2? what happens if you use XP upgrade disk. Theoretically, the install would just ask me to insert earlier's windows CD to verify upgrade and continue the install. I've heard that a few people have been able to load XP on bootcamp without SP2 and then used Internet Explorer to download it.
Any thoughts.The "process" to allow that sort of verificcation is not available until you completely install Windows. I know of someone who did, as you suggest, install SP1, and then upgraded it. However, there were multiple issues involved with that, and I think you would need to search out that thread to understand them, as I don't remember.
However, having said the "book version" - have you simply tried it? LOL! Who knows - it may work, and as your Subject states - What's the worse that can happen?
Bob -
Can safari translate from other languages to English?
Can safari translate from other languages to English?
Not by itself. Search google for a Safara Extension that can do translation.
-
Looking for app that can connect iPhone / Ipad to generic bluetooth camera
looking for app that can connect iPhone / Ipad to generic bluetooth camera
I doubt that you will find one. I have not heard of BT cameras.
-
Is there a preferred format of XML that can be laoded into an Oracle table?
XML files vary quite a bit. From mere fragments to file carrying schema, etc. What is the preferred format of an XML file that can be loaded into an Oracle table assuming that the Schema agrees with the table structure.
It does not seem to load an XML file even with W3C namespace and all.
Krishnaswamy JayaramWith XE there is XML support in the database but no XQuery, JNDI, or Servlet support.
If you give a specific example it could be helpful, here are simple write and read tests on XE;
HR on 20/03/2006 10:28:22 at XE > CREATE TABLE xml_tab (xmlval XMLTYPE);
Table created.
HR on 20/03/2006 10:28:31 at XE > INSERT INTO xml_tab VALUES (
2 XMLTYPE.CREATEXML(’
3
4 221
5 John
6 ‘));
1 row created.
HR on 20/03/2006 10:28:41 at XE > INSERT INTO xml_tab VALUES (
2 XMLTYPE.CREATEXML(’
3
4 331
5 PO_1
6 ‘));
1 row created.
HR on 20/03/2006 10:28:49 at XE > select x.xmlval.getstringval() from xml_tab x;
X.XMLVAL.GETSTRINGVAL()
221
John
331
PO_1
Maybe you are looking for
-
I have e big problem with my ITunes and my mobile devices. Two Ipod Touch and two IPad. My son and my wive und myself have e seperatly ITunes Account. My Account ist with credit card my son and my wive only with Itunes cards. All devices are protect
-
WEB ADI INTEGRATOR FOR Bill of Material
I am developing a WEB ADI integrator for Bill of material upload. The integrator will populate the data in a temporary table, validate it & write the error messages back to the table . On succesful validation the data will be sent to interface tables
-
Email PDF Form as a PDF Document
It seems as though this has been answered over on the "ES" side, but I can't find it for anyone (like me) using 7.0: I am using Adobe LiveCycle Designer 7.0 and I've created a PDF form and it contains a "Submit" button to send the form. The form send
-
Need to create OAF new Button Item with Destination URI with dynamic value
Would like to add a personalization to a OAF page, with adding a new button Item. Behind the button item, one of the properties we would like to set is Destination URI, and we would like to have this with a dynamic value from the Page we are on. Let'
-
Delta procedure - How To...
Hello, I'm looking for some documentation about Delta loads procedure. I have several doubts nd i would like to learn about it a little more. In SDN there are a lots of posts bu i'm getting a little confuse because it's a lot of information and i tur