Happy holidays everyone!
I am working on a BAQ where I have two subqueries feeding into the main query. I have a subquery for Orders, and one for Jobs. They are setup like this:
Criteria for customer and open lines.
I want to link the two subqueries based on the Order number and the Job number. In our company the left 5 digits of JobNum are always the same as OrderNum. So I tried to link it that way.
You can see that I tried to use the left function here on the JobNum field. I have also tried the substring function. Neither one of them worked, both had proper syntax, but failed to execute. I also tried adding a calculated field to the Jobs query that equals the functions I tried above. The calculated field also gave the same error.
Severity: Error, Table: , Field: , RowID: , Text: Bad SQL statement.
Review the server event logs for details.
I don’t have access to the server logs, but I assume that the problem is the link to a calculated field. I know I have linked on calculated fields before, so what is the problem here? If I replace the link with OrderHed.OrderNum = JobProd.OrderNum then the query runs without error.
Any ideas?
Thanks everyone!
Nate