Re: [GENERAL] String Manipulation

2009-06-15 Thread Christine Penner
Alban, That was exactly what I was looking for. Thanks Christine At 03:45 AM 13/06/2009, you wrote: On Jun 13, 2009, at 12:35 AM, Christine Penner wrote: Sam, The problem with making it a numeric field is that I have seen things like A123, #123a or 23-233. This is only here to make most sor

Re: [GENERAL] String Manipulation

2009-06-13 Thread Alban Hertroys
On Jun 13, 2009, at 12:35 AM, Christine Penner wrote: Sam, The problem with making it a numeric field is that I have seen things like A123, #123a or 23-233. This is only here to make most sorting work better, not perfect. It all depends on how they enter the data. Wont the different forma

Re: [GENERAL] String Manipulation

2009-06-12 Thread Sam Mason
On Fri, Jun 12, 2009 at 04:07:11PM -0700, Christine Penner wrote: > I get nothing. I just updated recently but the only version number I > can find is 8.3. I know its at least 8.3.4 but should be more. OK, the main thing is that you're running a copy of PG from the 8.3 series. I've just tried it

Re: [GENERAL] String Manipulation

2009-06-12 Thread Christine Penner
Sam, I get nothing. I just updated recently but the only version number I can find is 8.3. I know its at least 8.3.4 but should be more. Christine At 03:58 PM 12/06/2009, you wrote: On Fri, Jun 12, 2009 at 03:35:44PM -0700, Christine Penner wrote: > The problem with making it a numeric field

Re: [GENERAL] String Manipulation

2009-06-12 Thread Sam Mason
On Fri, Jun 12, 2009 at 03:35:44PM -0700, Christine Penner wrote: > The problem with making it a numeric field is that I have seen things > like A123, #123a or 23-233. This is only here to make most sorting > work better, not perfect. It all depends on how they enter the data. > Wont the differe

Re: [GENERAL] String Manipulation

2009-06-12 Thread Christine Penner
Sam, The problem with making it a numeric field is that I have seen things like A123, #123a or 23-233. This is only here to make most sorting work better, not perfect. It all depends on how they enter the data. Wont the different formats make it harder to convert to a number? I tried your su

Re: [GENERAL] String Manipulation

2009-06-12 Thread Sam Mason
On Fri, Jun 12, 2009 at 12:36:27PM -0700, Christine Penner wrote: > I want to calculate a new field I added to a table but I'm not sure > how to do it. This will be a copy of another field with any non > numeric characters stripped off the end and padded with spaces. > > This is what I was tryin

[GENERAL] String Manipulation

2009-06-12 Thread Christine Penner
Hi, I want to calculate a new field I added to a table but I'm not sure how to do it. This will be a copy of another field with any non numeric characters stripped off the end and padded with spaces. This is what I was trying to do Update Buildings SET B_LOT_SORT=lpad(substr(lot,1,??),7) in

Re: [GENERAL] String manipulation

2004-02-20 Thread pativo
[EMAIL PROTECTED] (pativo) wrote in message news:<[EMAIL PROTECTED]>... Hello and thanks to all! I'm amused that I get so many responses. Ok, at time I use a plpgsql function (isAHex(VARCHAR)) which checks only if the length is even. So I think I should implement the following. ===8<-

[GENERAL] String manipulation

2004-02-17 Thread pativo
Hello to all, I have small problem. I have some database fields (VARCHAR) and these field should hold some ahex coded values. So the string length must be even and each character can only be 0-9, a-f or A-F. My idea was that: 8<--- CREATE TABLE test (