List:General Discussion« Previous MessageNext Message »
From:Richard Davies Date:January 12 2004 10:05pm
Subject:Re: metric conversions SOLVED
View as plain text  
On Monday 12 Jan 2004 13:20, Richard Davies wrote:

Thank you to everyone who offered advice on this problem I knew it was easy 
but couldn't see how to do it.

Thanks again.

> I receive measurements for a product sometimes in inches, sometimes in
> centimeters.
>
> These are stored in table1
> int not null primary key, measurement1 int, measurement2 int, type
> varchar(255)
>
> I need to extract data from this table and store it in another table with
> all measurements converted to inches.
>
> insert into table2 select from table1 no, measurement1+0.625,
> measurement2+0.063, 'Style';
>
> Would it be possible to have a field in table1 that indicates centimeters
> or inches and modify the insert statement to check this field and divide
> everything by 2.54 before adding and inserting? If this is possible how
> would I do it I can't quite make it work.
>
> --
> Regards
>
> Richard

-- 
Regards

Richard

Thread
metric conversionsRichard Davies12 Jan
  • Re: metric conversionsMartijn Tonies12 Jan
  • Re: metric conversionsRoger Baklund12 Jan
  • Re: metric conversionsDiana Soares12 Jan
  • Re: metric conversions SOLVEDRichard Davies12 Jan