Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mathiasrw opened this issue Dec 9, 2015 · 10 comments
Open

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

mathiasrw opened this issue Dec 9, 2015 · 10 comments

Comments

@mathiasrw
Copy link
Member

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"
    },
    {},
    {},
    {},
    {}
]
@mathiasrw mathiasrw added the ! Bug label Dec 9, 2015
@micheledallatorre
Copy link

Took me ages to understand this was a bug! :(

Same result here, see http://jsfiddle.net/L8471bnk/116/ and
http://stackoverflow.com/questions/35894671/alasql-union-or-union-all-only-gives-results-from-table1

@mathiasrw
Copy link
Member Author

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

Thanks for adding material to the case.

@keeganmccallum
Copy link

+1

1 similar comment
@jamintz
Copy link

jamintz commented Nov 16, 2016

+1

@fuserMRX
Copy link

fuserMRX commented Apr 8, 2018

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?

@Co0olCat
Copy link

Co0olCat commented Jul 6, 2021

Solved here: #75

@mathiasrw
Copy link
Member Author

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

@Co0olCat
Copy link

Co0olCat commented Jul 8, 2021

Yes. thank you.

@jdimmerman
Copy link

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

@mathiasrw
Copy link
Member Author

Oh!

@mathiasrw mathiasrw reopened this Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants