Striper Talk Striped Bass Fishing, Surfcasting, Boating

     

Left Nav S-B Home Register FAQ Members List S-B on Facebook Arcade WEAX Tides Buoys Calendar Search Today's Posts Mark Forums Read Right Nav

Left Container Right Container
 

Go Back   Striper Talk Striped Bass Fishing, Surfcasting, Boating » Striper Chat - Discuss stuff other than fishing ~ The Scuppers and Political talk » Computers

Computers Sidetrack to Computers, Questions on your home computer? Posting just for registered members....

Reply
 
Thread Tools Rate Thread Display Modes
Old 08-16-2012, 07:13 PM   #1
iamskippy
Registered User
iTrader: (1)
 
iamskippy's Avatar
 
Join Date: Aug 2010
Location: A village some where
Posts: 3,436
need help with SQL code

I am working out of a oracle data base and the interface uses SQL. I can not get my if then statements to work, all i am trying to do is this. The column produces a number and i want the number to be replaced with txt. For example if column x = 31 then break else column x = 40 the coaching etc.

Any cookie cutter code i can play with would be awesome, thanks for looking.
iamskippy is offline   Reply With Quote
Old 08-16-2012, 08:11 PM   #2
striperman36
Old Guy
iTrader: (0)
 
striperman36's Avatar
 
Join Date: Oct 2004
Location: Mansfield, MA
Posts: 8,760
I'll post it tomorrow
Posted from my iPhone/Mobile device
striperman36 is offline   Reply With Quote
Old 08-16-2012, 08:51 PM   #3
iamskippy
Registered User
iTrader: (1)
 
iamskippy's Avatar
 
Join Date: Aug 2010
Location: A village some where
Posts: 3,436
Quote:
Originally Posted by striperman36 View Post
I'll post it tomorrow
Posted from my iPhone/Mobile device
Thanks, im sure i am missing something stupid simple to many hours infront of code.
Posted from my iPhone/Mobile device
iamskippy is offline   Reply With Quote
Old 08-17-2012, 08:56 AM   #4
striperman36
Old Guy
iTrader: (0)
 
striperman36's Avatar
 
Join Date: Oct 2004
Location: Mansfield, MA
Posts: 8,760
to convert numbers to char use the to_char function

selection to_char(x,'9999') from tables where

or y = to_char(x,'9999')

the second operator is the mask you want the conversion to use when converting


Pl_SQL obscurity again.
striperman36 is offline   Reply With Quote
Old 08-17-2012, 10:48 AM   #5
iamskippy
Registered User
iTrader: (1)
 
iamskippy's Avatar
 
Join Date: Aug 2010
Location: A village some where
Posts: 3,436
I have the conversions with no problem but will this do the same as a if,then statement as the column produces 7 different 2 digit numbers.
Posted from my iPhone/Mobile device
iamskippy is offline   Reply With Quote
Old 08-17-2012, 11:13 AM   #6
spence
Registered User
iTrader: (0)
 
spence's Avatar
 
Join Date: Nov 2003
Location: RI
Posts: 21,182
Sounds like an impedance problem. Convert your JAVA_XL function to bit-hex_char. Input the print spooler bypassing the SQL evaporator.

If that fails, go to Tosche station and just get a new power converter.

-spence
spence is offline   Reply With Quote
Old 08-17-2012, 11:48 AM   #7
striperman36
Old Guy
iTrader: (0)
 
striperman36's Avatar
 
Join Date: Oct 2004
Location: Mansfield, MA
Posts: 8,760
Quote:
Originally Posted by iamskippy View Post
I have the conversions with no problem but will this do the same as a if,then statement as the column produces 7 different 2 digit numbers.
Posted from my iPhone/Mobile device
every value will be converted yes,

to_char(x,'99')

its how the variables are processed regardless of the variable value as long as it doe not exceed two characters.
striperman36 is offline   Reply With Quote
Old 08-17-2012, 11:49 AM   #8
striperman36
Old Guy
iTrader: (0)
 
striperman36's Avatar
 
Join Date: Oct 2004
Location: Mansfield, MA
Posts: 8,760
Quote:
Originally Posted by spence View Post
Sounds like an impedance problem. Convert your JAVA_XL function to bit-hex_char. Input the print spooler bypassing the SQL evaporator.

If that fails, go to Tosche station and just get a new power converter.

-spence
if you bypass the SQL evaporator you also bypass the Heisenberg compensator
striperman36 is offline   Reply With Quote
Old 08-17-2012, 11:54 AM   #9
striperman36
Old Guy
iTrader: (0)
 
striperman36's Avatar
 
Join Date: Oct 2004
Location: Mansfield, MA
Posts: 8,760
Quote:
Originally Posted by spence View Post
Sounds like an impedance problem. Convert your JAVA_XL function to bit-hex_char. Input the print spooler bypassing the SQL evaporator.

If that fails, go to Tosche station and just get a new power converter.

-spence
if you bypass the SQL evaporator you also bypass the Heisenberg compensator
striperman36 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 04:03 PM.


Powered by vBulletin. Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Please use all necessary and proper safety precautions. STAY SAFE Striper Talk Forums
Copyright 1998-20012 Striped-Bass.com