Sign up ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Error message returned:

Msg 102, Level 15, State 1, Procedure vw_IVStockAging, Line 12
Incorrect syntax near '–'.

When I execute this:

CREATE VIEW vw_IVStockAging
AS SELECT IV00101.ITEMNMBR AS ITEMNUMBER,
IV00101.ITEMDESC AS ITEMNAME,
...
(IV10200.QTYRECVD – IV10200.QTYSOLD) AS QTYAVAILABLE
FROM ...
share|improve this question

put on hold as off-topic by mustaccio, RolandoMySQLDBA, Michael Green, Phil, dezso 13 hours ago

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Too localized - this could be because your code has a typo, basic error, or is not relevant to most of our audience. Consider revising your question so that it appeals to a broader audience. As it stands, the question is unlikely to help other users (regarding typo questions, see this meta question for background)." – mustaccio, RolandoMySQLDBA, Michael Green, dezso
If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

Seems pretty simple, you have a long dash () where you meant to have a minus sign (-). The difference is subtle to the human eye, but not to SQL Server.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.