dbTalk Databases Forums  

Text import truncates field with no erro

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


Discuss Text import truncates field with no erro in the microsoft.public.sqlserver.dts forum.



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

Default Text import truncates field with no erro - 06-09-2008 , 07:11 AM






Hi,
I am testing some import validations on dry run data that has been
deliberately seeded with incorrect values to test the systems. The format of
the data being imported is text length 2 and the field the data is being
imported into is varchar(1). I had been expecting the DTS (SQL 2000) import
to fail however the import completed without error and appeared to be
successful but the data instead of being imported as 2C is being shown as 2.
How can I resolve this issue so that an error is thrown up otherwise I will
have no way of knowing that incorrect data has been imported?
Thanks.

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

Default Re: Text import truncates field with no erro - 06-10-2008 , 04:58 AM






On Jun 9, 2:11 pm, billyfix <billy... (AT) discussions (DOT) microsoft.com>
wrote:
Quote:
Hi,
I am testing some import validations on dry run data that has been
deliberately seeded with incorrect values to test the systems. The format of
the data being imported is text length 2 and the field the data is being
imported into is varchar(1). I had been expecting the DTS (SQL 2000) import
to fail however the import completed without error and appeared to be
successful but the data instead of being imported as 2C is being shown as 2.
How can I resolve this issue so that an error is thrown up otherwise I will
have no way of knowing that incorrect data has been imported?
Thanks.
Hi billyfix, i'm not sure to have understood very well. Did you use a
cast or convert before import? That's really strange i believe that
when a sql command after an implicit conversion must truncate a field,
it should stop and end up with an error.
Apart this, if you want to get an error when the data length is 2 or
more then you can test it with a LEN function in T-SQL. Build a simle
script with an if statement that raise an error when the condition is
met (i.e. LEN(yourfield)>2). You can then use workflow precedence
constraints (OnFailure and ONsuccess) to build different outputs.

Bye,
M.




Reply With Quote
  #3  
Old   
matteus
 
Posts: n/a

Default Re: Text import truncates field with no erro - 06-10-2008 , 04:58 AM



On Jun 9, 2:11 pm, billyfix <billy... (AT) discussions (DOT) microsoft.com>
wrote:
Quote:
Hi,
I am testing some import validations on dry run data that has been
deliberately seeded with incorrect values to test the systems. The format of
the data being imported is text length 2 and the field the data is being
imported into is varchar(1). I had been expecting the DTS (SQL 2000) import
to fail however the import completed without error and appeared to be
successful but the data instead of being imported as 2C is being shown as 2.
How can I resolve this issue so that an error is thrown up otherwise I will
have no way of knowing that incorrect data has been imported?
Thanks.
Hi billyfix, i'm not sure to have understood very well. Did you use a
cast or convert before import? That's really strange i believe that
when a sql command after an implicit conversion must truncate a field,
it should stop and end up with an error.
Apart this, if you want to get an error when the data length is 2 or
more then you can test it with a LEN function in T-SQL. Build a simle
script with an if statement that raise an error when the condition is
met (i.e. LEN(yourfield)>2). You can then use workflow precedence
constraints (OnFailure and ONsuccess) to build different outputs.

Bye,
M.




Reply With Quote
  #4  
Old   
matteus
 
Posts: n/a

Default Re: Text import truncates field with no erro - 06-10-2008 , 04:58 AM



On Jun 9, 2:11 pm, billyfix <billy... (AT) discussions (DOT) microsoft.com>
wrote:
Quote:
Hi,
I am testing some import validations on dry run data that has been
deliberately seeded with incorrect values to test the systems. The format of
the data being imported is text length 2 and the field the data is being
imported into is varchar(1). I had been expecting the DTS (SQL 2000) import
to fail however the import completed without error and appeared to be
successful but the data instead of being imported as 2C is being shown as 2.
How can I resolve this issue so that an error is thrown up otherwise I will
have no way of knowing that incorrect data has been imported?
Thanks.
Hi billyfix, i'm not sure to have understood very well. Did you use a
cast or convert before import? That's really strange i believe that
when a sql command after an implicit conversion must truncate a field,
it should stop and end up with an error.
Apart this, if you want to get an error when the data length is 2 or
more then you can test it with a LEN function in T-SQL. Build a simle
script with an if statement that raise an error when the condition is
met (i.e. LEN(yourfield)>2). You can then use workflow precedence
constraints (OnFailure and ONsuccess) to build different outputs.

Bye,
M.




Reply With Quote
  #5  
Old   
matteus
 
Posts: n/a

Default Re: Text import truncates field with no erro - 06-10-2008 , 04:58 AM



On Jun 9, 2:11 pm, billyfix <billy... (AT) discussions (DOT) microsoft.com>
wrote:
Quote:
Hi,
I am testing some import validations on dry run data that has been
deliberately seeded with incorrect values to test the systems. The format of
the data being imported is text length 2 and the field the data is being
imported into is varchar(1). I had been expecting the DTS (SQL 2000) import
to fail however the import completed without error and appeared to be
successful but the data instead of being imported as 2C is being shown as 2.
How can I resolve this issue so that an error is thrown up otherwise I will
have no way of knowing that incorrect data has been imported?
Thanks.
Hi billyfix, i'm not sure to have understood very well. Did you use a
cast or convert before import? That's really strange i believe that
when a sql command after an implicit conversion must truncate a field,
it should stop and end up with an error.
Apart this, if you want to get an error when the data length is 2 or
more then you can test it with a LEN function in T-SQL. Build a simle
script with an if statement that raise an error when the condition is
met (i.e. LEN(yourfield)>2). You can then use workflow precedence
constraints (OnFailure and ONsuccess) to build different outputs.

Bye,
M.




Reply With Quote
  #6  
Old   
matteus
 
Posts: n/a

Default Re: Text import truncates field with no erro - 06-10-2008 , 04:58 AM



On Jun 9, 2:11 pm, billyfix <billy... (AT) discussions (DOT) microsoft.com>
wrote:
Quote:
Hi,
I am testing some import validations on dry run data that has been
deliberately seeded with incorrect values to test the systems. The format of
the data being imported is text length 2 and the field the data is being
imported into is varchar(1). I had been expecting the DTS (SQL 2000) import
to fail however the import completed without error and appeared to be
successful but the data instead of being imported as 2C is being shown as 2.
How can I resolve this issue so that an error is thrown up otherwise I will
have no way of knowing that incorrect data has been imported?
Thanks.
Hi billyfix, i'm not sure to have understood very well. Did you use a
cast or convert before import? That's really strange i believe that
when a sql command after an implicit conversion must truncate a field,
it should stop and end up with an error.
Apart this, if you want to get an error when the data length is 2 or
more then you can test it with a LEN function in T-SQL. Build a simle
script with an if statement that raise an error when the condition is
met (i.e. LEN(yourfield)>2). You can then use workflow precedence
constraints (OnFailure and ONsuccess) to build different outputs.

Bye,
M.




Reply With Quote
  #7  
Old   
matteus
 
Posts: n/a

Default Re: Text import truncates field with no erro - 06-10-2008 , 04:58 AM



On Jun 9, 2:11 pm, billyfix <billy... (AT) discussions (DOT) microsoft.com>
wrote:
Quote:
Hi,
I am testing some import validations on dry run data that has been
deliberately seeded with incorrect values to test the systems. The format of
the data being imported is text length 2 and the field the data is being
imported into is varchar(1). I had been expecting the DTS (SQL 2000) import
to fail however the import completed without error and appeared to be
successful but the data instead of being imported as 2C is being shown as 2.
How can I resolve this issue so that an error is thrown up otherwise I will
have no way of knowing that incorrect data has been imported?
Thanks.
Hi billyfix, i'm not sure to have understood very well. Did you use a
cast or convert before import? That's really strange i believe that
when a sql command after an implicit conversion must truncate a field,
it should stop and end up with an error.
Apart this, if you want to get an error when the data length is 2 or
more then you can test it with a LEN function in T-SQL. Build a simle
script with an if statement that raise an error when the condition is
met (i.e. LEN(yourfield)>2). You can then use workflow precedence
constraints (OnFailure and ONsuccess) to build different outputs.

Bye,
M.




Reply With Quote
  #8  
Old   
matteus
 
Posts: n/a

Default Re: Text import truncates field with no erro - 06-10-2008 , 04:58 AM



On Jun 9, 2:11 pm, billyfix <billy... (AT) discussions (DOT) microsoft.com>
wrote:
Quote:
Hi,
I am testing some import validations on dry run data that has been
deliberately seeded with incorrect values to test the systems. The format of
the data being imported is text length 2 and the field the data is being
imported into is varchar(1). I had been expecting the DTS (SQL 2000) import
to fail however the import completed without error and appeared to be
successful but the data instead of being imported as 2C is being shown as 2.
How can I resolve this issue so that an error is thrown up otherwise I will
have no way of knowing that incorrect data has been imported?
Thanks.
Hi billyfix, i'm not sure to have understood very well. Did you use a
cast or convert before import? That's really strange i believe that
when a sql command after an implicit conversion must truncate a field,
it should stop and end up with an error.
Apart this, if you want to get an error when the data length is 2 or
more then you can test it with a LEN function in T-SQL. Build a simle
script with an if statement that raise an error when the condition is
met (i.e. LEN(yourfield)>2). You can then use workflow precedence
constraints (OnFailure and ONsuccess) to build different outputs.

Bye,
M.




Reply With Quote
  #9  
Old   
matteus
 
Posts: n/a

Default Re: Text import truncates field with no erro - 06-10-2008 , 04:58 AM



On Jun 9, 2:11 pm, billyfix <billy... (AT) discussions (DOT) microsoft.com>
wrote:
Quote:
Hi,
I am testing some import validations on dry run data that has been
deliberately seeded with incorrect values to test the systems. The format of
the data being imported is text length 2 and the field the data is being
imported into is varchar(1). I had been expecting the DTS (SQL 2000) import
to fail however the import completed without error and appeared to be
successful but the data instead of being imported as 2C is being shown as 2.
How can I resolve this issue so that an error is thrown up otherwise I will
have no way of knowing that incorrect data has been imported?
Thanks.
Hi billyfix, i'm not sure to have understood very well. Did you use a
cast or convert before import? That's really strange i believe that
when a sql command after an implicit conversion must truncate a field,
it should stop and end up with an error.
Apart this, if you want to get an error when the data length is 2 or
more then you can test it with a LEN function in T-SQL. Build a simle
script with an if statement that raise an error when the condition is
met (i.e. LEN(yourfield)>2). You can then use workflow precedence
constraints (OnFailure and ONsuccess) to build different outputs.

Bye,
M.




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.