Здравствуйте. Помогите пожалуйста найти синтаксическую ошибку в sql запросе:
$query="INSERT INTO balance ( bs_value, bs_name, bs_date, bs_direction )
SELECT post_pay*Nz(factors_exp.exp_factor) AS zpsize, \"Зарплата \"+T1.user_aname+\" \"+T1.user_bname AS bs_name, Now() AS bs_date, \"-\" AS bs_direction
FROM (SELECT (year(Now())-year(user_start_date)) AS YearAllWork, * FROM workers INNER JOIN post ON workers.user_post=post.post_id) AS T1 INNER JOIN factors_exp ON T1.YearAllWork = factors_exp.exp_years
";
При выполнении следующий выхлоп:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '* FROM workers INNER JOIN post ON workers.user_post=post.post_id) AS T1 INNER J' at line 3