Results 1 to 32 of 32

Set listobject as ADODB object and use sql on this.

Threaded View

  1. #19
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,946

    Re: Set listobject as ADODB object and use sql on this.

    hi CK76,

    thank you.

    It's known to cause memory leak and can cause issues.
    Where did you get to know this?

    You could work around it by making a temp copy of the open workbook and querying from that.
    Ok. I am comparing 2 workbooks, previous version and current. I can create new temp workbooks and base on them.

    I'd recommend using PowerQuery (Get & Transform) instead of ADO
    I do not like this solution because:
    1. All users have to have PQ
    2. This is for manual querying, not creating automations

    You can instead do single SQL query and join 2 in one shot and return single recordset.
    ok this is dofficult. How to write SQL with join?

    and my output is within sheet Result.

    So for Added SQL is:
    SELECT t_current.*
    FROM t_current LEFT JOIN t_previous ON t_current.Order= t_previous.Order
    WHERE t_previous.Order Is Null

    For deleted SQL is:
    Select t_previous.*
    from t_current right join t_previous on t_current.Order= t_previous.Order
    where t_current.Order

    I do not know how to write syntsax of SQL for each statements above.

    Best,
    Jacek
    Attached Images Attached Images
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Copy filtered column of ListObject to another ListObject
    By snapfade in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-15-2016, 04:00 PM
  2. Replies: 0
    Last Post: 06-19-2014, 02:09 PM
  3. Use Excel as Database by opening excel workbook as ADODB object
    By dragonvoice in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-21-2013, 04:13 AM
  4. [SOLVED] ListObject DataBodyRange Returns Object Variable Not Set Error
    By goss in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-20-2013, 01:51 PM
  5. Use of ListObject
    By j_Southern in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-04-2013, 03:29 PM
  6. Adodb recordset object, columns and rows transposed
    By DaveF in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-21-2010, 09:18 AM
  7. Object Required Error - Adodb Parameters
    By robnot in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-27-2007, 02:55 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1