I have a database with 900+ members. Each member is assigned to three teams with different positions on each team. I’ve written a query that will extract each team member and position for that team put the results in a temporary table.
I’ve run the query in phpmyadmin, runs perfectly.
Tried to run the query in LO and I get a syntax error… Here is the query
TRUNCATE TABLE `team`
INSERT INTO team (ID, phone, first_name, last_name, position, status, notes)
SELECT t2.RosterID, t2.Phone_Number, t2.First_Name, t2.Last_Name, t1.Position, t1.Status, t1.Notes
FROM rosterinfo t1, memberpersonalinfo t2 WHERE (t1.RosterID=t2.RosterID) AND (t1.Team = 1) AND (t1.Position IS NOT NULL);
INSERT INTO team (ID, phone, first_name, last_name, position, status, notes)
SELECT t2.RosterID, t2.Phone_Number, t2.First_Name, t2.Last_Name, t1.Position2, t1.Status, t1.Notes
FROM rosterinfo t1, memberpersonalinfo t2 WHERE (t1.RosterID=t2.RosterID) AND (t1.Team2 = 1) AND (t1.Position2 IS NOT NULL);
INSERT INTO team (ID, phone, first_name, last_name, position, status, notes)
SELECT t2.RosterID, t2.Phone_Number, t2.First_Name, t2.Last_Name, t1.Position3, t1.Status, t1.Notes
FROM rosterinfo t1, memberpersonalinfo t2 WHERE (t1.RosterID=t2.RosterID) AND (t1.Team3 = 1) AND (t1.Position3 IS NOT NULL);
Any Ideas ??
Bob