MySQL query parsing

Hi,

I am trying to execute a query in a MySQL node, and when I paste my query into the query box it won’t save it.

At first I thought that it was because I was using a common table expression, but I restructured the query to carry out a join on a subquery, and that still doesn’t work (see query below)

When I paste it into the query box and then close the box, it won’t save it. Is there a parser that is objecting to the query I’m pasting in. The query works in my normal query editor.

Regards
Scott

select
a.ContractSurveyID,
a.JobNum,
a.DateOfInspection,
a.DueDate,
a.ChangedOn,
e.Fullname as AssessorName,
a.FRAAssessorID,
d.Fullname as ValidatorName,
c.SurveyStatus
from
ContractSurvey a
inner join ( select distinct
(ContractSurveyID) as ContractSurveyID
from
ContractSurveySection
where
ContractSurveyID in( select distinct
(cs.ContractSurveyID)
from ContractSurvey cs
right join (
select
ContractSurveyID, Sort, SourceContractSurveySectionID, count()
from ContractSurveySection
group by
1, 2
having
count(
) > 1) as css on cs.ContractSurveyID = css.ContractSurveyID
where
ParentContractSurveyID is null)) as b on a.ContractSurveyID = b.ContractSurveyID
left join SurveyStatus as c on a.SurveyStatusID = c.SurveyStatusID
left join VinylSharedData.User as d on a.OwnerID = d.UserID
left join VinylSharedData.User as e on a.FRAAssessorID = e.simPROID;

I was originally doing the above in Safari (Version 15.3 (17612.4.9.1.8)), and I’ve just tried it again using Chrome and it works fine. Obviously something to do with Safari…serves me right :slight_smile:

1 Like