Jump to content

Incorrect Syntax Near '|', Ms Sql Server, Error: 102


ready2drum

Recommended Posts

I've tried to tweak the code below to get the query to execute without any errors, but I keep getting these types of errors about 'incorrect syntax' near the '|'.See code below:

SELECT                                 fac.facility,                                 fac.catalog_id, fac.q_level,                    RTRIM(' dst.COST_CENTER_CHARGE ') || '-' ||                     RTRIM(' dst.ACTIVITY_ID ') || '-' ||                      RTRIM(' dst.ACCOUNT_NBR ') | |                               CASE WHEN dst.SUB_ACCOUNT_NBR >' ' THEN '-' || RTRIM(' dst.SUB_ACCOUNT_NBR ') ELSE '' END COST_CENTER_CODE                   FROM                                tidcafac fac inner JOIN tidacdst dst                               ON fac.a_xref_code  = dst.a_xref_code                  WHERE                                 fac.facility = 'MAX'

Any suggestions/feedback on what I'm missing in the query is much appreciated!Thanks!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...