on-internet
← Community

Duplicated data from a select

Stack Overflow ·

I'm creating a function in Postgresql to bring data based on the user's name, but when I don't pass a name in the argument it should bring all the appointments independent of the name, but I'm getting duplicated data. Since "John Doe" is the only one who have a appointment linked with him this "Ian F" shouldn't be there name duration scheduled John Doe 50 2026-03-24 10:00:00 Ian F 50 2026-03-24 10:00:00 As you can see the data is duplicated, since the "Ian F" doesn't have any appointment i's just copying the "John Doe" data and since I don't know how to debug at postgres I don't really know wh

Comments

Sign in or sign up to comment and upvote.

No comments yet.