Database people help me out

Open discussion about any topic, as long as you abide by the rules of course!
Post Reply
bitWISE
Posts: 10704
Joined: Wed Dec 08, 1999 8:00 am

Database people help me out

Post by bitWISE »

I'm using Oracle9i and I need to SELECT an isbn number from a column but have it return as 9-999-99999-9. I can't seem to find anything that helps.
User avatar
seremtan
Posts: 36019
Joined: Wed Nov 19, 2003 8:00 am

Post by seremtan »

helpdesk?
bitWISE
Posts: 10704
Joined: Wed Dec 08, 1999 8:00 am

Post by bitWISE »

I ended up figuring it out:

SELECT SUBSTR(isbn, 1,1) || '-' || SUBSTR(isbn, 2,3) || '-' || SUBSTR(isbn, 5,4) || '-' || SUBSTR(isbn, 9,1) "ISBN", title FROM books WHERE category = 'COMPUTER';
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Post by ^misantropia^ »

Why not move it to the client? If the load is heavy, this kind of post-processing might just be the thing that causes the server to crash and burn.
Post Reply