Subject Re: Copying text...
From Charlie <trainman@traincity.com>
Date Mon, 20 Jun 2016 18:27:33 -0400
Newsgroups dbase.getting-started

Mervyn Bick Wrote:

> On 20/06/2016 21:20, Charlie wrote:
> > Charlie Wrote:
> >
> >> Hi Mervyn,
> >>
> >> Yes the date field is from master and is date type.  Everything looks great but I can't use this until the .00 is dealt with.  I blindly tried to fix it in the program you wrote but nothing would work.  Is there an extract by date or something like that?
> >>
> >> Charlie
> >
> > fixed it!!!  instead of as int for the date I changed it to as char(4) and it works well.  Now what do I do to make the price without the decimal points?
> >
>
> Which program are we talking about?  make_temp_tables.prg or
> make_html_pricelist.prg?
>
> sdate and asell in the temporary table should be something like
> 04/02/2014 and 23.45
>
> make_htlm_pricelist.prg uses "cast(extract(year from sdate) as int) yr"
> to create a calculate field yr which is displayed in the table.  It also
> uses 'cast(asell as int) asell1' to create the calculated price without
> decimals.  This works perfectly on my computer.
>
> You could try changing int to integer but this is just grasping at straws.
>
> You could also try
>
> select part_no,title,grade,cast(extract(year from sdate) as int)
> yr,cast(asell as int) asell1 from 'data\master' ;
> where asell > 0 and upper(mfg) like "%K_LINE%" ;
> order by part_no ;
> save to "data\temp_pkline"
>
> If this produces a temporary table with the year and price without
> decimals I'll change the two programs for you.
>
> Mervyn.
>
>
>
>
>
> Mervyn.
>
That's OK.. It works great.  I am overwhelmed with happiness!!  Thanks very much!!! Will save me mucho timeo!!! (And I learned some stuff!!!)