Member Login

Username
Password
Forget Password
New Sign Up
Search Forum

Buy Support
Incidents

If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:

Click Here
If you can't login and post questions or you are having trouble viewing forum posts:
Click Here
Callback
Support

If you live in USA, UK, Canada, Australia or New Zealand, you can leave us details on your question and request us to call you back and discuss them with you personally  (charges apply).

Click Here
 
Buy Support
Incidents
If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:
Click Here

Forum : How do I delete orphaned InvoiceLine records?Search Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC SQL Sample Scripts Forum

 New Topic 
 
 Post Reply 
[1]  
 How do I delete orphaned InvoiceLine records? 
 Author   Message 
  mmoershel 
  
 Group: Members 
 Posts: 6 
 Joined: 2006-04-04 
 Profile
 Posted : 2006-04-04 03:57:25
The InvoiceLine table contains orphan records (the parent invoice record no longer exists). I tried:
DELETE FROM Invoice WHERE TxnID = 'xxxx-xxxxxxxxx'
the TxnID is supplied from a list before running the DELETE command.
However, no records are deleted. What am I doing wrong?

mm 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-04-04 08:35:30

The first step is to actually check that there are orphaned InvoiceLines. I would hazard to guess that you have orphaned optimized InvoiceLines only and no real orphaned InvoiceLines in QuickBooks. Run the following query with the unoptimized tag using VB Demo:-

SELECT TxnID, InvoiceLineTxnLineID, InvoiceLineDesc, InvoiceLineAmount,
RefNumber FROM InvoiceLine unoptimized where RefNumber = 'yourrefnumber'

where 'yourrefnumber' is the Reference for the Invoice.

If no InvoiceLines are returned you can resync your optimized InvoiceLine table by running:

sp_optimizefullsync InvoiceLine

 

 

  Top 
  mmoershel 
  
 Group: Members 
 Posts: 6 
 Joined: 2006-04-04 
 Profile
 Posted : 2006-04-05 00:48:34
Thanks! Your suggestion worked perfectly. mm
 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to