Icon View Thread

The following is the text of the current message along with any replies.
Messages 21 to 26 of 26 total
Thread Import table error
Thu, Feb 23 2012 8:07 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< Try sticking a space after the final | on (say) line 1. That's what
caused it to bomb for me. >>

Yeah, that will do it, but the general problem is that the import file:

1) Doesn't have the right number of columns in it, and doesn't specify
column headers to get around this.
2) Doesn't have the correctly-formatted data in it - there aren't any
double-quotes around any of the string columns.

The fact that the space causes the error is due to the above, not due to any
issue with the EDB import.

--
Tim Young
Elevate Software
www.elevatesoft.com
Sat, Feb 25 2012 11:53 AMPermanent Link

Hershcu Sorin

Thanks Tim and Roy

Yes the WorkFile.txt you send me work for me too.
But as Roy mention, on the original file have addtional spaces on the end of
the rows.

The problem is that this WorkFile.txt I receive from another application and
I can control it.
I know that the number of columns, at the end of the row may vary.
It will not have headers and double-quotes arround strings.

What are the minimals obligatory request to avoid the errors?

Thanks
Sorin


> Yeah, that will do it, but the general problem is that the import file:
>
> 1) Doesn't have the right number of columns in it, and doesn't specify
> column headers to get around this.
> 2) Doesn't have the correctly-formatted data in it - there aren't any
> double-quotes around any of the string columns.
>
> The fact that the space causes the error is due to the above, not due to
> any issue with the EDB import.
>
> --
> Tim Young
> Elevate Software
> www.elevatesoft.com

Sun, Feb 26 2012 3:16 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Sorin


I don't use IMPORT much at all (most of my stuff comes from Excel files and I use Mike Skolnik's s/w for it)

If this "The problem is that this WorkFile.txt I receive from another application and I can control it." means that you can control the txt file then what I'd suggest is:

1. Add column names as row 1
2. Follow the CSV conventions (even if you're not using , as the delimiter). This will mean putting double quotes round string fields
3. Make sure that you have the right number of delimiters on each row

If you can't control how it comes to you then you'll either need to do some preprocessing or write your own import routine or try something like Mike Skolink's import routine. Start with trying to just add the column names on the first row of the text file and see if that does it, if not you may have to process the entire file to get it into a suitable state, at which point you might as well write your own import routine.


Roy Lambert [Team Elevate]
Sun, Feb 26 2012 4:29 AMPermanent Link

Malcolm Taylor

Sorin H wrote:
> The problem is that this WorkFile.txt I receive from another
> application and I can control it.  I know that the number of columns,
> at the end of the row may vary.  It will not have headers and
> double-quotes arround strings.
>
> What are the minimals obligatory request to avoid the errors?
>

Hi Sorin

If you meant to say that "I can *not* control it" then I think it
depends on what the unknown number of possible extra columns represent.

In the easy case that extra columns need to be inserted into the
destination table in column order, then it may be that all you have to
do is make sure there are no trailing spaces at the end of each line.
For this you need to Trim each line of the file before doing the import.

Otherwise we need to know more about what you need to do with the
possible extra columns

Malcolm
Sun, Feb 26 2012 6:20 AMPermanent Link

Hershcu Sorin

Thanks All

By "I can not control" I mean that the Txt file come from another
application
done by another developer.

But, from the suggestions on this thread I think that if i'll request
that the rows will be without an extra space at the end the Import command
will work?

Thanks
Sorin


> If you meant to say that "I can *not* control it" then I think it
> depends on what the unknown number of possible extra columns represent.
>
> In the easy case that extra columns need to be inserted into the
> destination table in column order, then it may be that all you have to
> do is make sure there are no trailing spaces at the end of each line.
> For this you need to Trim each line of the file before doing the import.
>
> Otherwise we need to know more about what you need to do with the
> possible extra columns

Sun, Feb 26 2012 7:37 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Sorin


If you can get him to change it I suggest you get him to do it in accordance with ElevateDB's requirements. EXPORT the table you're importing into and give it to the developer as a template.

Roy Lambert [Team Elevate]
« Previous PagePage 3 of 3
Jump to Page:  1 2 3
Image