>>>>> "Nigel" == Nigel Titley <[email protected]> writes:
    >> No doesn't seem to have made any difference. Still the same error
    >> 
    >> psql:/tmp/ledgersmb/1.2-1.3-upgrade.sql:30: ERROR: null value in
    >> column "heading" violates not-null constraint CONTEXT: SQL
    >> statement "INSERT INTO account (accno, description, category,
    >> gifi_accno, heading, contra, tax) VALUES ( $1 , $2 , $3 , $4 , $5
    >> , $6 , $7 )" PL/pgSQL function "account_save" line 47 at SQL
    >> statement

    Nigel> Has anyone had any thoughts on this? I'm still stuck.

This is what I did.
I started my psql against my database.

The code at that line is: 

SELECT account_save(id, accno, description, category, gifi_accno, NULL, contra, 
                    CASE WHEN link like '%tax%' THEN true ELSE false END, 
                    string_to_array(link,':'))
  FROM lsmb12.chart 
 WHERE charttype = 'A';

so, I ran it like:

SELECT account_save(id, accno, description, category, gifi_accno, NULL, contra, 
                    CASE WHEN link like '%tax%' THEN true ELSE false END, 
                    string_to_array(link,':'))
  FROM lsmb12.chart 
 WHERE charttype = 'A' ORDER BY accno OFFSET 0 LIMIT 1;

then incrementing the "OFFSET" value until I found the problem.

You may have to "delete from account;" if you have to retry things.

-- 
]       He who is tired of Weird Al is tired of life!           |  firewalls  [
]   Michael Richardson, Sandelman Software Works, Ottawa, ON    |net architect[
] [email protected] http://www.sandelman.ottawa.on.ca/ |device driver[
   Kyoto Plus: watch the video <http://www.youtube.com/watch?v=kzx1ycLXQSE>
                       then sign the petition. 





------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Ledger-smb-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel

Reply via email to