Multiple ticket.id in table

Discussions related to modeling and execution of forms.
Forum rules
Make sure every topic contains information about your LSPS version and if relevant also your server OS, client OS, database name and version, and application server name and version.
eric.graham
 
Posts: 58
Joined: Tue May 13, 2014 12:20 pm

Multiple ticket.id in table

Thu Oct 16, 2014 4:11 pm

I have an issue where I am getting multiple ticket.id values of the same ticket. I have a table with a table column to get the ticket.id. The table's Data: is calling a query to "getTicketsforSearch". When the search returns the values, I have noticed that it has some multiple IDs (not all IDs are multiple). I have looked in the docs and saw where the spaceship operator <=> could see if it return a 0 indicating that the values are the same, but I am unclear the best approach to take on getting "a unique" ticket.id. - I understand there could be multiple ticket.id with different order numbers. But in this case, the data is the same. It looks as if it is just adding the same ticket.id to multiple rows in the table.
Any suggestions on how/where to narrow down the query and/or the table (or column for ticket.id) for not returning multiple ticket.id's?

(database shows one ticket with the (as shown) 2771, and this ticket.id has no value. Looks as if it was created, and then canceled before entering in any data. It also shows the same order number on all the rows seen.

Thank you for in advance for any help.


Capture.PNG
Capture.PNG (11.26 KiB) Viewed 3678 times

Ondrej Danko
 
Posts: 31
Joined: Mon Feb 27, 2012 1:14 pm

Re: Multiple ticket.id in table

Thu Oct 16, 2014 4:22 pm

Hi Eric,

is distinct flag in the getTicketsforSearch query checked? The query does not perform distinct implicitly and therefore, if joins are used in the query, the resultset might contain same entity multiple times.

eric.graham
 
Posts: 58
Joined: Tue May 13, 2014 12:20 pm

Re: Multiple ticket.id in table

Thu Oct 16, 2014 7:59 pm

Thanks Ondrej! Did the trick.

Return to Forms

Who is online

Users browsing this forum: No registered users and 1 guest