on 2010 Jan 26 12:06 PM
Hello! I am trying to import data into my table using
INPUT INTO
The problem is my decimals is using ,
as a delimiter, and it expects .
. So it won't work!
How can i change this? Search and replace in the input file is not an option!
I am using SQL Anywhere 10
Erik,
AFAIK formatting numbers is not possible with builtin tools in SA. The main reason is that "formatting" is seen as a client-task and not one for the server. (Though there definitely are reasons to take a different view, methinks.)
There are a few workarounds, cf. the newsgroup sybase.public.sqlanywhere.general.
Just a few threads that might fit:
news://forums.sybase.com:119/1dkft15000qu40c6vf0qbhibackbfcghju@4ax.com
news://forums.sybase.com:119/op.udxdyasyj0bybf@bonw00164.internal.imsglobal.com
(If those links don't work, you might search for decimal in this newsgroup.)
HTH Volker
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Erik.
Probably you can pull the date in a staging (temporary) Table. You could read the Field in as a string value.
In as second step you can the push it into the correct destination.
insert into stageTable ...
select CAST( replace(stageTable.StrNumber,',','.') as numeric(12,4) ),....
form stageTable
HTH Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
10 | |
10 | |
10 | |
10 | |
9 | |
8 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.