Announcement Announcement Module
Collapse
No announcement yet.
UNION support? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • UNION support?

    Are UNION statement supported in @Query in a repository
    Tried several variations around the statement following but can't seem to get this to work.
    thanks
    *K


    @Query("SELECT distinct t1.id.startdate FROM Pv t1 WHERE t1.id.vdItemId = :vdId UNION SELECT distinct t1.enddate FROM Pv t1 WHERE t1.id.vdItemId = :vdId")
    List<Date> getVersionDates(@Param("vdId") long longvdItemId);
Working...
X