dbTalk Databases Forums  

Re: Import tables from Excel or Access and data truncates

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Re: Import tables from Excel or Access and data truncates in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Import tables from Excel or Access and data truncates - 09-10-2004 , 04:43 PM






OK what you are probably seeing is a restriction on the QA Tool itself

Go to

Tools | Options | Results

Now look for the "Maximum characters per column." Increase that to the
value you want


--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.konesans.com - Consultancy from the people who know


"AJ" <AJ (AT) discussions (DOT) microsoft.com> wrote

Quote:
I have a table that I need to import into my SQL database. I have it in
Excel as well as Access. A couple of the columns are long strings of text
(5000-7000) characters. I see the data correctly in Excel or Access. The
SQL table that I'm trying to import into is defined as:

CREATE TABLE [dbo].[X_SS_Notes] (
[ID] [float] NULL ,
[Note1] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Note2] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Note3] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

Importing the table (via DTS) from either Excel or Access seems to go fine
(no error messages). However, when I look at the fields in SQL, the data
truncates around 255 characters.

Am I overlooking something simple?



Reply With Quote
  #2  
Old   
AJ
 
Posts: n/a

Default Re: Import tables from Excel or Access and data truncates - 09-10-2004 , 10:05 PM






I am using QA to view the results and do only see 255 characters. Thanks for
the info on it only displaying that many characters - makes sense. However,
in my database front end, I am concatenating these 3 notes fields together
into one note field (MBR_NOTES) that displays. In that display, I only see
the truncated data. For example, assume the three notes are (shortened for
readability):

NOTE1='This is what is stored in note 1'
NOTE2='And in note 2, this is what is stored'
NOTE3='Finally, in note 3, I have this'

My SQL is:
MBR_NOTES = NOTE1 + '**' + NOTE2 + '**' + NOTE3

I would expect to see:
This is what is stored in note 1***And in note 2, this is what is
stored***Finally, in note 3, I have this

Instead, I'm seeing:
This is what***And in note***Finally, in

"Allan Mitchell" wrote:

Quote:
OK what you are probably seeing is a restriction on the QA Tool itself

Go to

Tools | Options | Results

Now look for the "Maximum characters per column." Increase that to the
value you want


--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.konesans.com - Consultancy from the people who know


"AJ" <AJ (AT) discussions (DOT) microsoft.com> wrote in message
news:9CF8EA19-81AC-4193-AFCD-D42043ADAE35 (AT) microsoft (DOT) com...
I have a table that I need to import into my SQL database. I have it in
Excel as well as Access. A couple of the columns are long strings of text
(5000-7000) characters. I see the data correctly in Excel or Access. The
SQL table that I'm trying to import into is defined as:

CREATE TABLE [dbo].[X_SS_Notes] (
[ID] [float] NULL ,
[Note1] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Note2] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Note3] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

Importing the table (via DTS) from either Excel or Access seems to go fine
(no error messages). However, when I look at the fields in SQL, the data
truncates around 255 characters.

Am I overlooking something simple?




Reply With Quote
  #3  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Import tables from Excel or Access and data truncates - 09-11-2004 , 12:02 AM



Oh I see so each attribute is being clipped before the joining

Do you know how long each piece of data is so

LEN(NOTE1)

There is this as well.

DataPump truncates delimited fields to 255 characters
(http://www.sqldts.com/default.aspx?297)


When you say TEXT fields you mean TEXT fields and not CHAR or VARCHAR right?

--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.konesans.com - Consultancy from the people who know


"AJ" <AJ (AT) discussions (DOT) microsoft.com> wrote

Quote:
I am using QA to view the results and do only see 255 characters. Thanks
for
the info on it only displaying that many characters - makes sense.
However,
in my database front end, I am concatenating these 3 notes fields together
into one note field (MBR_NOTES) that displays. In that display, I only
see
the truncated data. For example, assume the three notes are (shortened
for
readability):

NOTE1='This is what is stored in note 1'
NOTE2='And in note 2, this is what is stored'
NOTE3='Finally, in note 3, I have this'

My SQL is:
MBR_NOTES = NOTE1 + '**' + NOTE2 + '**' + NOTE3

I would expect to see:
This is what is stored in note 1***And in note 2, this is what is
stored***Finally, in note 3, I have this

Instead, I'm seeing:
This is what***And in note***Finally, in

"Allan Mitchell" wrote:

OK what you are probably seeing is a restriction on the QA Tool itself

Go to

Tools | Options | Results

Now look for the "Maximum characters per column." Increase that to the
value you want


--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.konesans.com - Consultancy from the people who know


"AJ" <AJ (AT) discussions (DOT) microsoft.com> wrote in message
news:9CF8EA19-81AC-4193-AFCD-D42043ADAE35 (AT) microsoft (DOT) com...
I have a table that I need to import into my SQL database. I have it
in
Excel as well as Access. A couple of the columns are long strings of
text
(5000-7000) characters. I see the data correctly in Excel or Access.
The
SQL table that I'm trying to import into is defined as:

CREATE TABLE [dbo].[X_SS_Notes] (
[ID] [float] NULL ,
[Note1] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Note2] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Note3] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

Importing the table (via DTS) from either Excel or Access seems to go
fine
(no error messages). However, when I look at the fields in SQL, the
data
truncates around 255 characters.

Am I overlooking something simple?






Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.