Skip to content

UNION (ALL) only gives data from table 1 #485

Closed

Description

@mathiasrw

UNION and UNION ALL only gives data from first table when source are HTML tables while rows from the second table are empty.

Please see the issue in action at: http://jsfiddle.net/yp83t1p9/

The problem is illustrated here where the last "rows" are empty:

[
    {
        "ID": "ID",
        "Name": "Name",
        "Month": "Month",
        "Savings": "Savings"
    },
    {
        "ID": "111",
        "Name": "John",
        "Month": "January",
        "Savings": "$100"
    },
    {
        "ID": "122",
        "Name": "Rianna",
        "Month": "Feb",
        "Savings": "$200"
    },
    {
        "ID": "133",
        "Name": "Michael",
        "Month": "Mar",
        "Savings": "$300"
    },
    {},
    {},
    {},
    {}
]

Activity

  1. mathiasrw commented on Mar 9, 2016

    @mathiasrw
    MemberAuthor

    Sorry to hear you spend a lot of time because of this bug.

    Thanks for adding material to the case.

  2. keeganmccallum commented on Jun 8, 2016

    @keeganmccallum

    +1

  3. jamintz commented on Nov 16, 2016

    @jamintz

    +1

  4. fuserMRX commented on Apr 8, 2018

    @fuserMRX

    Hi!

    It seems that the issue is still present. The query provided on the stackoverflow by @agershun below does not unite the results and we get only partial result.

    https://stackoverflow.com/questions/34527959/parse-a-jsonwith-array-and-objects-and-export-the-data-into-excel-file-in-node/34771859#34771859

    Could you please shed the light to the issue?maybe the SEARCH query approach has been changed or something else?

  5. Co0olCat commented on Jul 6, 2021

    @Co0olCat

    Solved here: #75

  6. mathiasrw commented on Jul 8, 2021

    @mathiasrw
    MemberAuthor

    Hi @Co0olCat - thank you for tipping in. You are referring to something that got merged in 2015 - are you sure it is still valid?

  7. Co0olCat commented on Jul 8, 2021

    @Co0olCat

    Yes. thank you.

  8. jdimmerman commented on Sep 29, 2023

    @jdimmerman

    @mathiasrw what was the solution here? I am still observing this issue as described

  9. mathiasrw commented on Sep 29, 2023

    @mathiasrw
    MemberAuthor

    Oh!

  10. added a commit that references this issue on Dec 6, 2025
    2cfd8fb
  11. mathiasrw commented on Dec 6, 2025

    @mathiasrw
    MemberAuthor

    Fix released as part of v4.11.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions