Datatype conversion while importing tables from SQL Server

10 views
Skip to first unread message

Akash Jain

unread,
Dec 10, 2009, 12:48:48 AM12/10/09
to InterSystems: DeepSee Community
Hi,

I am importing tables and data from SQL Server 2000 through deepsee
connector. While creating the class definition the connector is
changing the datatype of all the columns defined as Float in SQL
Server to %String in deepsee. I have to change each column datatype to
%Float manually. It is very time consuming and error pron as I have to
import many tables.

Is there any seeting so that Float datatype from SQL is created as %
Float in deepsee? Can we define datatype mapping from SQL to deepsee?

Thanks,
Akash

Lexi Hayden

unread,
Dec 10, 2009, 10:46:02 AM12/10/09
to InterSystems: DeepSee Community
This would be a great feature, but I have not seen it anywhere.

I think it is a bug that DeepSee treats a SQL Server float as a
%String! Could you please contact the WRC and report this?

***
While I feel your pain, you might find it quicker to edit the classes
in Studio after creating them. That way, you can also use the Find
option, which would reduce chance of error.

Akash jain

unread,
Dec 14, 2009, 1:04:02 AM12/14/09
to intersystems-de...@googlegroups.com
Thanks Lexi, I will report this to WRC.
 
I am editing classes in studio only and it seems better option then changing in connector. Now I have got another issue related to the problem. Even if I change the datatype to %Float. The imported numeric values stored in global remains in string format, enclosed double quotes. Even if I delete all the data and do Import All Data after datatype change float values are imported as string and it is a problem with queries where I am doing comparison with any other numeric value.
 
Thanks,
Akash

--

You received this message because you are subscribed to the Google Groups "InterSystems:  DeepSee Community" group.
To post to this group, send email to intersystems-de...@googlegroups.com.
To unsubscribe from this group, send email to intersystems-deepsee-...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/intersystems-deepsee-community?hl=en.



Lexi Hayden

unread,
Dec 14, 2009, 11:47:44 AM12/14/09
to InterSystems: DeepSee Community
Two things--neither is much help, I am afraid!

1) I didn't notice your database type earlier! In Administrator>Site
Configuration>ETL, there is an option called Database that you use to
specify the kind of database you're working with. The allowed values
are 0-MS Access, 1-Oracle, 2-Postgres SQL -- not SQL Server.

2) You could look at the generated methods added to your classes
(zzLoadOne() etc.) There might be something there that you could edit
to correct the problem.

***
Another approach might be to not use the Connector at all. Instead,
use the Cache Link Table Wizard. The Cache SQL Gateway is supported
with a wider range of databases. The drawback is that you wouldn't
have the tools to perform data validation and data scrubbing.

****
I will file a bug report internally to get these supported databases
included in the InterSystems Supported Platform Guide.

On Dec 14, 1:04 am, Akash jain <akashja...@gmail.com> wrote:
> Thanks Lexi, I will report this to WRC.
>
> I am editing classes in studio only and it seems better option then changing
> in connector. Now I have got another issue related to the problem. Even if I
> change the datatype to %Float. The imported numeric values stored in global
> remains in string format, enclosed double quotes. Even if I delete all the
> data and do Import All Data after datatype change float values are imported
> as string and it is a problem with queries where I am doing comparison with
> any other numeric value.
>
> Thanks,
> Akash
>
> > intersystems-deepsee-...@googlegroups.com<intersystems-deepsee-community%2Bunsu...@googlegroups.com>
> > .
Reply all
Reply to author
Forward
0 new messages