Home > Archive > SQL Anywhere database replication > March 2006 > Changing data type









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Changing data type
Liza A.S

2006-03-21, 7:24 am

Hi all,

What is the best and safest way to change data type (from
numeric
to float) on a running replication setup? Can I simply use
passthrough?

Thanks in advance.
Rob Waywell

2006-03-21, 11:24 am

NUMERIC and FLOAT can be automatically converted between, so mechanically
this is a pretty 'safe' change to make and yes you can do it through
PASSTHROUGH. As always ensure that you test the PASSTHROUGH routine before
trying it in production.

Now, the bigger questions is: Are you sure you want to change this?????

NUMERIC is a fixed precision datatype while FLOAT is an imprecise datatype.
eg:
select cast(2.31 as float) as 'FLOAT', cast(2.31 as numeric(10,8)) as
'NUMERIC'

If you are doing any comparisons that depend on an equality to the
NUMERIC column then you can expect them to start failing since the binary
representation of the FLOAT value can differ between hardware.

--
-----------------------------------------------
Robert Waywell
Sybase Adaptive Server Anywhere Developer - Version 8
Sybase Certified Professional

Sybase's iAnywhere Solutions

Please respond ONLY to newsgroup

EBF's and Patches: http://downloads.sybase.com
choose SQL Anywhere Studio >> change 'time frame' to all

To Submit Bug Reports:
http://case-express.sybase.com/cx/c...sc?CASETYPE=Bug

SQL Anywhere Studio Supported Platforms and Support Status
http://my.sybase.com/detail?id=1002288

<Liza A.S> wrote in message news:441fda64.60c7.1681692777@sybase.com...
> Hi all,
>
> What is the best and safest way to change data type (from
> numeric
> to float) on a running replication setup? Can I simply use
> passthrough?
>
> Thanks in advance.



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com