Not sure where I got this or if I wrote it, but had this laying around: CREATE OR REPLACE FUNCTION yesnoformat ( arg_integer IN NUMBER )
RETURN VARCHAR2 DETERMINISTIC AS var_character VARCHAR2(3); BEGIN IF arg_integer = 1 THEN return 'Yes'; ELSIF arg_integer = 0 THEN RETURN 'No'; ELSE RETURN null; END IF; EXCEPTION WHEN OTHERS THEN RETURN null; END; / On 8/29/05, Adrocknaphobia <[EMAIL PROTECTED]> wrote: > > Write an Oracle function in PL/SQL. > > -Adam > > On 8/29/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I know this is a bit off topic, but I developing an app in CF accessing > an Oracle DB and I need my query to return the results in the format of > 'yes' or 'no' for 1 or 0 respectively. Anyone know how I can do this within > the SQL select statement? > > > > Thanks, > > > > Dave > > > ****************************************************************************************** > > The information contained in this message, including attachments, may > contain > > privileged or confidential information that is intended to be delivered > only to the > > person identified above. If you are not the intended recipient, or the > person > > responsible for delivering this message to the intended recipient, > ALLTEL requests > > that you immediately notify the sender and asks that you do not read the > message or its > > attachments, and that you delete them without copying or sending them to > anyone else. > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217010 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

