[DUG] SQL question

Jeremy Coulter vss at vss.co.nz
Fri Jun 24 14:04:33 NZST 2005


I think when I was looking at DBISAM it had a "CAST" function that I used
to convert floats to strings.

Jeremy

-----Original Message-----
From: "Traci Sumpter" <Traci.Sumpter at opus.co.nz>
To: <mhoward at pslog.co.nz>, "'NZ Borland Developers Group - Delphi List'"
<delphi at ns3.123.co.nz>
Cc: 
Date: Fri, 24 Jun 2005 13:35:42 +1200
Subject: RE: [DUG] SQL question

> Poor Boy... 
> 
> The reason I ask is that there are DBISAM type databases.  However you
> are
> using DBISAM it self wich may leave you in a bad situation.
> 
> Formatting on most databases is able to be done with SQL functions.  I
> have
> had a look and the functions available on DBISAM is lacking.
> 
> Are you using delphi or are you trying to do a direct query.  You may
> need
> to perform formatting on the PHP/Delphi/ other  end product.  
> 
> -----Original Message-----
> From: delphi-bounces at ns3.123.co.nz
> [mailto:delphi-bounces at ns3.123.co.nz] On
> Behalf Of Mark Howard
> Sent: Friday, 24 June 2005 12:43 p.m.
> To: delphi at ns3.123.co.nz
> Subject: Re: [DUG] SQL question
> 
> Um.  DBISAM
> Mark
> On Fri, 24 Jun 2005 11:52:24 +1200, Traci Sumpter
> <Traci.Sumpter at opus.co.nz>
> wrote:
> 
> > What database?/.  MySql, SQLServer, Oracle, other
> >
> > -----Original Message-----
> > From: delphi-bounces at ns3.123.co.nz 
> > [mailto:delphi-bounces at ns3.123.co.nz] On Behalf Of Mark Howard
> > Sent: Friday, 24 June 2005 11:45 a.m.
> > To: delphi at ns3.123.co.nz
> > Subject: Re: [DUG] SQL question
> >
> > Traci
> > I've tried round and trunc but they both drop any trailing "0"'s I'v 
> > also cast to Char but I can't find anything in the DBISAM 
> > documentation about casting to a defined format of Char  ie $$$.$$ or
> > F5.2 etc I want to avoid doing a complicated manipulation involving 
> > string lengths and substrings to build what I want - if there is
> another
> way.
> > Thanks
> > Mark
> > On Fri, 24 Jun 2005 11:35:08 +1200, Traci Sumpter 
> > <Traci.Sumpter at opus.co.nz>
> > wrote:
> >
> >> Depends on the database, there are formating type functions like 
> >> to_char , round, trunc etc...
> >>
> >> -----Original Message-----
> >> From: delphi-bounces at ns3.123.co.nz
> >> [mailto:delphi-bounces at ns3.123.co.nz] On Behalf Of Mark Howard
> >> Sent: Friday, 24 June 2005 11:23 a.m.
> >> To: delphi at ns3.123.co.nz
> >> Subject: [DUG] SQL question
> >>
> >> Can anyone suggest a way to return a figure of (say) 32.30 from a
> SQL 
> >> SELECT statement, instead of the 32.3?
> >> I would like the returned number formatted as I'm just sending the 
> >> dataset straight out to a CSV file.
> >>
> >> I'm using DBISAM but I'm willing to try ANY suggestions to see if 
> >> they
> > work.
> >>
> >> TIA
> >>
> >> Mark
> >>
> >> --
> >> Forest Production Systems Ltd
> >> Creators of PSLog - A harvesting information system www.pslog.co.nz
> >>
> >>
> >
> >
> >
> > --
> > Forest Production Systems Ltd
> > Creators of PSLog - A harvesting information system www.pslog.co.nz
> >
> >
> 
> 
> 
> --
> Forest Production Systems Ltd
> Creators of PSLog - A harvesting information system www.pslog.co.nz
> 
> 
> -- 
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.323 / Virus Database: 267.8.0/27 - Release Date:
> 23/06/2005
> 
> _______________________________________________
> Delphi mailing list
> Delphi at ns3.123.co.nz
> http://ns3.123.co.nz/mailman/listinfo/delphi
> 
> _______________________________________________
> Delphi mailing list
> Delphi at ns3.123.co.nz
> http://ns3.123.co.nz/mailman/listinfo/delphi




More information about the Delphi mailing list