| Summary: | (Correct) SQL-Query (wrongly) returns 0 (null) Values in specific Column. DBMS: PostgreSQL | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | randmusr0 |
| Component: | Base | Assignee: | Not Assigned <libreoffice-bugs> |
| Status: | RESOLVED WORKSFORME | ||
| Severity: | normal | CC: | drewjensen.inbox |
| Priority: | medium | ||
| Version: | 6.0.3.2 release | ||
| Hardware: | x86-64 (AMD64) | ||
| OS: | Linux (All) | ||
| Whiteboard: | |||
| Crash report or crash signature: | Regression By: | ||
| Attachments: | query after change | ||
|
Description
randmusr0
2018-07-01 18:31:15 UTC
Created attachment 143261 [details]
query after change
I'm using a fresh postgresql 10 install on Ubuntu 18.04 and Libo with postgres:SDBC.
Created the three tables and a few records.
SELECT "SP"."id", "SP"."hämo", "S"."situation"
FROM "situation_p" "SP", "situation" "S"
WHERE "SP"."situation" = "S"."id"
got just the output you did in Base
changed it to:
SELECT "SP"."id", "SP"."hämo", "S"."situation"
FROM "situation_p" "SP", "situation" "S"
WHERE "S"."id" = "SP"."situation"
and get what seems to be what you are looking for. (screen shot attached)
(In reply to Drew Jensen from comment #1) > Created attachment 143261 [details] > query after change > > I'm using a fresh postgresql 10 install on Ubuntu 18.04 and Libo with > postgres:SDBC. > > Created the three tables and a few records. > > SELECT "SP"."id", "SP"."hämo", "S"."situation" > FROM "situation_p" "SP", "situation" "S" > WHERE "SP"."situation" = "S"."id" > > got just the output you did in Base > > changed it to: > > SELECT "SP"."id", "SP"."hämo", "S"."situation" > FROM "situation_p" "SP", "situation" "S" > WHERE "S"."id" = "SP"."situation" > > and get what seems to be what you are looking for. (screen shot attached) Hey Drew, while your changes did not fix the problem on my machine (also using Ubuntu 18.04) they certainly helped me to find a solution for the problem. Instead of changing the order of the WHERE-criteria, I changed the order of the FROM-expression: SELECT "SP"."id", "SP"."hämo", "S"."situation" FROM "situation" "S", "situation_p" "SP" WHERE "SP"."situation" = "S"."id" For some magical reason I now get the desired result table. While I think that this order should not be relevant, I have to admit that I was wrong about my evaluation that it can not be fixed in Base itself. I would like to thank you for your very constructive feedback. People like you are awesome. Ah, thanks. I suppose that means can close this out than as works for me. |