Importing straight to SQL

Das Goravani goravanis at gmail.com
Mon Jan 31 19:18:41 UTC 2022


Alan, You were right. $nativeerrortext shows an actual error.. and it is that I have the primary key column in the list, and in it I have the old values, and it is upset that I’m passing in values in that column.. I hit a duplicate, because I earlier imported a test of 45 records, they got their primary key values assigned, and now I am passing more, and it hit a duplicate. The answer for this is for me to clear that column of values, and pass #NULL’s in that column.. 

How do you clear one column of data in a list?

I will try to figure that out, but if somebody knows, do tell. 




> On Jan 31, 2022, at 2:05 PM, Alan Davey <david.a.davey at gmail.com> wrote:
> 
> Hi Das,
> 
> If you inspect your statement object, what does $nativeerrortext show?
> This should give you the exact sql error which will help you debug the
> problem.
> 
> Given that you mentioned the COPY command also failed during execution, it
> seems pretty clear that you have a problem with one or more records in your
> data that needs to be corrected.
> 
> If you provide exactly the error message you are hitting, someone on this
> list will be able to provide better help.
> 
> Regards,
> 
> Alan
> 
> On Mon, Jan 31, 2022 at 1:47 PM Das Goravani <goravanis at gmail.com <mailto:goravanis at gmail.com>> wrote:
> 
>> 
>> Well using a SmartList and $doinserts worked on a test file of just 45
>> records.
>> 
>> But when I gave it 180,000 to do which is 1/12th of my actual file, on the
>> $doinserts command it came back with kStatementExecuteFailed
>> 
>> This seems like a dead end. It seems that SmartLists cannot handle big
>> time work. I can’t reasonably cut up my file greater than 12 parts to do.
>> 180,000 is not that much. It can easily fit in memory. Even with the
>> doubling of lists that SmartLists do.
>> 
>> Darn.
>> 
>> I wish this worked.
>> 
>> 
>> 
>>> On Jan 31, 2022, at 1:01 PM, Das Goravani <goravanis at gmail.com> wrote:
>>> 
>>> 
>>> I figured out a way to do this that works and is less code and probably
>> faster.
>>> 
>>> It is to make my list a SmartList and then $doinserts()
>>> 
>>> It works, so I’m going to go with that.
>>> 
>>> 
>>> 
>>> 
>>>> On Jan 30, 2022, at 6:53 PM, Das Goravani <goravanis at gmail.com <mailto:goravanis at gmail.com> <mailto:
>> goravanis at gmail.com>> wrote:
>>>> 
>>>> 
>>>> 
>>>> I tried the code I posted and it didn’t work.
>>>> 
>>>> So I tried defining a SQL ROW from a table class connected to the
>> SCCITIES schema, and did this
>>>> 
>>>> Calculate tvfccitiesrow as cvCitiesList
>>>> Do tvfccitiesrow.$insert() Returns #F
>>>> 
>>>> I calculate the ROW as the list. This assigns #L’s values to the row. I
>> checked that that is going on.
>>>> 
>>>> I then use the ROW to do the insert.. wondering if $insert just doesn’t
>> work on lists.
>>>> 
>>>> But it didn’t work on the row either.
>>>> 
>>>> I am familiar with using the row to do inserts, so I was surprised it
>> didn’t work.
>>>> 
>>>> When I define the row from SQL Class the connected table class runs the
>> construct of the master table class and there I have the session object
>> being assigned to $cinst which is the row…so that is being done.
>>>> 
>>>> Any idea why this wouldn’t work?
>>>> 
>>>> Should it work from the list instead?
>>>> 
>>>> 
>>> 
>> 
>> _____________________________________________________________
>> Manage your list subscriptions at http://lists.omnis-dev.com <http://lists.omnis-dev.com/>
>> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com <mailto:omnisdev-en at lists.omnis-dev.com>
>> 
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com <http://lists.omnis-dev.com/>
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com <mailto:omnisdev-en at lists.omnis-dev.com>


More information about the omnisdev-en mailing list