[clue-talk] SQL question anyone?
    Brian Gibson 
    bwg1974 at yahoo.com
       
    Tue Dec  9 13:12:30 MST 2008
    
    
  
If that fails, you can always do the conversion at the application level instead of the database level using a regular expression to isolate the substring and then converting the substring implicitly or explicitly to an integer.  
----- Original Message ----
From: David L. Willson <DLWillson at TheGeek.NU>
To: CLUE talk <clue-talk at cluedenver.org>
Sent: Tuesday, December 9, 2008 12:22:22 PM
Subject: Re: [clue-talk] SQL question anyone?
I think cast is an ANSI SQL function.   I'll try it.  Thanks, Brian and Angelo.
----- Original Message -----
From: "Brian Gibson" <bwg1974 at yahoo.com>
To: "CLUE talk" <clue-talk at cluedenver.org>
Sent: Tuesday, December 9, 2008 10:52:31 AM GMT -07:00 US/Canada Mountain
Subject: Re: [clue-talk] SQL question anyone?
Yes, cast or convert to an (unsigned) integer should do the trick. The functions should concatenate the string at the first non-digit. 
From: Angelo Bertolli <angelo.bertolli at gmail.com> 
To: CLUE talk <clue-talk at cluedenver.org> 
Sent: Monday, December 8, 2008 5:51:08 PM 
Subject: Re: [clue-talk] SQL question anyone? 
On Mon, Dec 8, 2008 at 7:43 PM, David L. Willson < DLWillson at thegeek.nu > wrote: 
How do I turn values like "2c-lb, 4wr, 38b-t1" into just the numbers that they begin with? In this case, I would want a return of "2, 4, 38" and I would want the 1 at the end of the last datum ignored. 
I think these are database-specific functions. Like Oracles to_number or Postgres' cast() 
Angelo 
_______________________________________________
clue-talk mailing list
clue-talk at cluedenver.org
http://www.cluedenver.org/mailman/listinfo/clue-talk
_______________________________________________
clue-talk mailing list
clue-talk at cluedenver.org
http://www.cluedenver.org/mailman/listinfo/clue-talk
      
    
    
More information about the clue-talk
mailing list