Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: SQL2Excel query for Group and Individual ?

SQL2Excel query for Group and Individual ? 13 years 3 months ago #14826

Hi,
Is there anyone who has managed to make a query in SQL2Excel to cover for both individual and Group registrations in DtRegister 2.7.x ?

I need to be able to get all data from Individual and Group registrations as well as the payment data and status.

I have looked at the other threads in this forum and managed to get the Individual
to work, without payment status:

SELECT M.user_id,Y.title AS Kurs,
MAX(CASE WHEN M.field_id = 12 THEN value END) AS Förnamn,
MAX(CASE WHEN M.field_id = 13 THEN value END) AS Efternamn,
MAX(CASE WHEN M.field_id = 20 THEN value END) AS Email,
MAX(CASE WHEN M.field_id = 23 THEN value END) AS Telefonnummer,
MAX(CASE WHEN M.field_id = 24 THEN value END) AS Telefonnummer2,
MAX(CASE WHEN M.field_id = 3 THEN value END) AS Medlemsnummer,
MAX(CASE WHEN M.field_id = 1 THEN value END) AS "Deltagare Namn",
MAX(CASE WHEN M.field_id = 2 THEN value END) AS "Deltagare Ålder"
FROM de5m_dtregister_user_field_values AS M
INNER JOIN de5m_dtregister_user AS Z ON Z.userid = M.user_id
INNER JOIN de5m_dtregister_group_event AS Y ON slabId = Z.eventId
WHERE Y.slabid > 135
GROUP BY M.user_id

Any Help is appriciated

//Bosse

Please Log in or Create an account to join the conversation.

SQL2Excel query for Group and Individual ? 13 years 3 months ago #14859

  • sacwebmaster
  • sacwebmaster's Avatar
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 24
  • Thank you received: 0
See the reply to "SQL2Excel ..." reply of 18 Sep.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.463 seconds