Does anyone have a fix for this?


> From: "Gary Stainburn" <[EMAIL PROTECTED]>
> 
> > psql -c "select t.tregion || '/' || to_char(t.tnumber,'000') || '-' ||
> > to_char(m.mnumber,'00') as unitno from teams t, members m
> > where m.mteam = t.tid;"
> >    unitno
> > -------------
> >  SW/ 041- 03
> >  SW/ 041- 05
> 
> Looks like a buglet in to_char()s handling of numbers (unless I
> misunderstand the way the formatting is supposed to work).
> 
> select '[' || to_char(12,'x000') || ']';
>  ?column?
> ----------
>  [x 012]
> 
> If you're running the current version, might be worth posting a bug report.
> You can work around it with something like:
> 
> ... substr(to_char(t.tnumber,'000'),2,3) ...
> 
> HTH
> 
> - Richard Huxton
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [EMAIL PROTECTED]               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to