Guest Insert SQL
Sample Data:
Name: Johnathan Duggan
Handicap: 5.6
Gender: M
EventId: 1
Correct SQL for Guest Insert:
INSERT INTO Guests (name, handicap, handicapDec, email, federation, createdAt, updatedAt, EventId, Gender)
VALUES ('Johnathan Duggan', '5.6', '5.6', '', '0', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, '1', 'M')
What this SQL does:
- Inserts into Guests table
- Sets name to: Johnathan Duggan
- Sets handicap to: 5.6
- Sets handicapDec to: 5.6
- Sets email to: (empty)
- Sets federation to: 0
- Sets EventId to: 1
- Sets Gender to: M
To test this SQL manually:
You can run this SQL directly in your database to test if it works:
Check if this SQL is being executed:
1. Run your import process
2. Check the database to see if the guest was created with the correct handicap
3. If the handicap is still not correct, the issue might be:
- The SQL is not being executed (check error logs)
- The handicap value is not being read correctly from Excel
- There's a trigger or constraint overwriting the handicap
- The table structure is different than expected