Recent

Author Topic: help with an SQL - statement  (Read 1790 times)

Nicole

  • Hero Member
  • *****
  • Posts: 983
[solved] Re: help with an SQL - statement
« Reply #15 on: March 06, 2024, 07:00:44 pm »
 ;) :D :D :P

Thank you all so very much, it works.
And I learnt a lot

   
Code: MySQL  [Select][+][-]
  1. with tbd as (
  2.     select datum
  3.     from TBKURSZEILEN
  4.     where fk_kontrakt in (2340,2369)
  5.     group by 1
  6.     having count(datum) = 2 )
  7.      
  8.     select id_kurszeile, fk_kontrakt, t.datum from tbkurszeilen t
  9.       where exists (select * from tbd where t.datum = datum and t.FK_KONTRAKT in (2340,2369))

gidesa

  • Jr. Member
  • **
  • Posts: 74
Re: help with an SQL - statement
« Reply #16 on: March 06, 2024, 07:31:03 pm »
@rvk yes, you are right


 

TinyPortal © 2005-2018