Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 cant insert fraction

Author  Topic 

gongxia649
So Suave

344 Posts

Posted - 2006-11-09 : 11:42:42
i have a sheet1 with a field that has fractions (1/2,1/4,etc)
im using dts to insert this column to sql server 2k. But seems like it's not working. Yes the column matches

the field in sql server is a varchar type.

snSQL
Master Smack Fu Yak Hacker

1837 Posts

Posted - 2006-11-09 : 13:05:45
quote:
But seems like it's not working.

So what happens, does it blow up, crash the server, return pictures instead of text, eat your breakfast?! Or maybe it really is working, but it seems like it isn't. Tell us what happens and we can try to help you.
Go to Top of Page

gongxia649
So Suave

344 Posts

Posted - 2006-11-09 : 13:11:17
it didnt dump the fraction from the sheet1 into the sql server field.
It shows as null.
Go to Top of Page

snSQL
Master Smack Fu Yak Hacker

1837 Posts

Posted - 2006-11-09 : 15:08:10
Do other columns work?
Go to Top of Page

gongxia649
So Suave

344 Posts

Posted - 2006-11-09 : 15:14:38
quote:
Originally posted by snSQL

Do other columns work?




yes, i just cant insert fractions from excel to sql server.
its weird.
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-11-09 : 15:41:44
What datatype is the column where you want to insert the fraction?


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

snSQL
Master Smack Fu Yak Hacker

1837 Posts

Posted - 2006-11-09 : 16:27:56
How are the fractions stored in Excel, not as 1/2 right because that won't show a 1/2 unless its text. Either way the fact that all the values are null in the SQL Server column seems to show that you have the column mappings wrong, otherwise you'd be getting something.
Go to Top of Page

gongxia649
So Suave

344 Posts

Posted - 2006-11-09 : 16:43:20
quote:
Originally posted by snSQL

How are the fractions stored in Excel, not as 1/2 right because that won't show a 1/2 unless its text. Either way the fact that all the values are null in the SQL Server column seems to show that you have the column mappings wrong, otherwise you'd be getting something.



on excel i have the cell format as fraction.
i even tried another column on excel using fraction. Still cant dump it to sql server and the mapping is right.
Go to Top of Page

gongxia649
So Suave

344 Posts

Posted - 2006-11-09 : 17:05:42
it does dump it into sql server now. i redo evrything. But instead of fraction it dumps decimals.

how can i keep it as fractions?
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2006-11-09 : 18:18:57
That's really an Excel question, not a SQL question.

Have you tried the ExcelTeam.com forum?








CODO ERGO SUM
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-11-10 : 00:51:38
Have you tried change the IMEX value?


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

gongxia649
So Suave

344 Posts

Posted - 2006-11-10 : 09:33:08
quote:
Originally posted by Peso

Have you tried change the IMEX value?


Peter Larsson
Helsingborg, Sweden




where is the imex value?

valentino, yes
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-11-10 : 10:11:13
Read through this topic http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926
and you will learn and understand the meaning of changing the IMEX value.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

gongxia649
So Suave

344 Posts

Posted - 2006-12-05 : 16:00:19
any ideas how to enter this to sqlserver field varchar (10)

i have this record in excel '662-1'

any ideas?
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-12-05 : 16:02:37
Yes. You must add a single quote in the cell before importing. Then the cell is treated as text, not just a number (661).


Peter Larsson
Helsingborg, Sweden
Go to Top of Page
   

- Advertisement -