Re: Can I format the field to 2 decimal places in my sql

From: Jack (wankf_at_hotmail.com)
Date: 09/04/04


Date: 4 Sep 2004 04:28:44 -0700

I have tried your method, but the same error which is pointed to the
".0", is this the problem of it ?
I still can't run the code

Thank you

Gaurav - http://www.gauravcreations.com <gauravcreations@hotmail.com> wrote in message news:<1FF9F661-0F2F-4A36-AE43-5374B7CD6435@microsoft.com>...
> This is cos your table name has a space between
>
> use this
>
> select [student name],[subject], [exam result] as results,
> format(results,".0") as results1
>
> so your actual result will come in results1
>
> --
> Gaurav Creations
> "Jack" wrote:
>
> > Do you mean I have to write in this way:
> >
> > sql = select [student name],[subject], format([exam results],".00")
> > from [exam record]
> >
> > I have written this , but an compile error message of "expected :end
> > of statement" is shown. Can I solve this ?
> >
> >
> > Thank you.
> >
> >
> >
> > Gaurav - http://www.gauravcreations.com <gauravcreations@hotmail.com> wrote in message news:>...
> > > which database are u using.. if it's access then u can select by using the
> > > following way
> > > format(exam results,".00")
> > >
> > > --
> > > Gaurav Creations
> > >
> > > "Jack" wrote:
> > >
> > > > hello,
> > > >
> > > > The values of a field in my database are 4 d.p., when I use datagrid
> > > > to display this record, then 4 d.p. values will be displayed that is
> > > > not I wanted.
> > > > Can I change them to 2 d.p. in my sql statement so that I can display
> > > > 2 d.p. values?
> > > >
> > > > sql = select [student name],[subject], [exam results] from [exam
> > > > record]
> > > >
> > > > I want to format the [exam results] to 2 decimal places
> > > >
> > > > Thank you very much for help
> > > >
> > > >
> > > > Fai
> > > >
> >