函数参数列表错误:无法识别'>'。无法解析查询文本

时间:2018-07-12 07:37:29

标签: sql sql-server

我在sql server中有如下查询,当我在新的查询窗口中使用它时,它没有语法错误并被执行,但是当我在视图中使用它并右键单击以更改设计时,它具有语法错误以下,但以任何方式执行并显示记录。

 Error in list of function arguments: '>' not recognized.
 Unable to parse query text.

SELECT tblDocuments.[Project No],
       tblDocuments.Originator,
       tblDocuments.Zone,
       tblDocuments.Unit,
       tblDocuments.Discipline,
       tblDiscipline.DiscDesc,
       tblDocuments.[Document Type],
       tblDocuments.[Owner Document Number],
       tblDocuments.[Sazeh Document Number],
       tblDocuments.[IDENTIFICATION CODE1],
       tblDocuments.[IDENTIFICATION CODE2],
       tblDocuments.[Document Title],
       tblDocuments.SheetNumber,
       CHARINDEX('(', [tblTransmittals].[Owner Document Number]) - 1 AS Doc_Visual_pos,
       IIF(CHARINDEX('(', [tblTransmittals].[Owner Document Number]) - 1 > 0, LEFT([tblTransmittals].[Owner Document Number], CHARINDEX('(', [tblTransmittals].[Owner Document Number]) - 1), [tblTransmittals].[Owner Document Number]) AS Doc_Visual,
       tblTransmittals.REV,
       tblTransmittals.POI,
       tblPurposeofIssue.[Purpose of Issue Description],
       tblTransmittals.CC,
       tblTransmittals.[Int-Tr-NO],
       tblTransmittals.[To-Owner-Tr-No],
       tblTransmittals.[MC-CSheet-No],
       tblTransmittals.AcCode,
       tblTransmittals.Pages,
       tblTransmittals.PaperSize,
       tblTransmittals.SJC_TO_MC_Let_NO,
       tblTransmittals.MC_TO_SJC_Let_No,
       tblTransmittals.To_FEng_Tr_No,
       tblTransmittals.SJC_Tr_No,
       tblTransmittals.Ext_Int,
       tblTransmittals.[Early Planned Issue Date],
       tblTransmittals.[Late Planned Issue Date],
       tblTransmittals.[Tag-No],
       tblTransmittals.Phase,
       tblTransmittals.SubPhase,
       tblTransmittals.ActivityID,
       tblTransmittals.Manhour,
       tblTransmittals.WorkPackage,
       tblTransmittals.[DCN-No],
       tblTransmittals.[DCR-No],
       tblTransmittals.[DCR-Reason],
       tblTransmittals.Remark,
       tblTransmittals.LastRevPerDoc,
       tblTransmittals.LastRevPerPOI,
       tblTransmittals.HoldBy,
       tblTransmittals.CommentID,
       tblTransmittals.ExTrID,
       tblTransmittals.HT_TR_No,
       tblTransmittals.Recipients,
       tblTransmittals.MC_HD_Comment_No,
       tblTransmittals.[CT- Transmittals],
       tb_CT_CS_transmittalNo.[CT_CS_Tr-Date],
       tblTransmittals.DefaultForDocument,
       tblTransmittals.HyperDoc,
       tblTransmittals.root
FROM tb_CT_CS_transmittalNo
     RIGHT JOIN(((tblDocuments
                  LEFT JOIN tblTransmittals ON tblDocuments.[Owner Document Number] = tblTransmittals.[Owner Document Number])
                 LEFT JOIN tblPurposeofIssue ON tblTransmittals.POI = tblPurposeofIssue.[Purpose of Issue])
                LEFT JOIN tblDiscipline ON tblDocuments.Discipline = tblDiscipline.DiscCode)ON tb_CT_CS_transmittalNo.CT_CS_Tr_No = tblTransmittals.[CT- Transmittals]
WHERE tblTransmittals.Remark_Doc <> 'Deleted'
   OR tblTransmittals.Remark_Doc IS NULL;

当我想更改视图设计时,我希望这不会显示此语法错误。

0 个答案:

没有答案