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. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been working with SQL Views for a while now, and I recently read that something that I want to do requires that one of my views be created with schemabinding. That sounds fine, but I get a syntax error when I try to follow along with an example:

SELECT t1.a, t2.b
    FROM dbo.Table1 t1
    INNER JOIN dbo.Table2 t2 ON t1.x = t2.x;

I get the following error in SQL Server Management Studio 2012:

Msg 102, Level 15, State 1, Procedure DHRA_Appointment, Line 2
Incorrect syntax near 'WTIH'.

This looks like some simple error in my SQL. What am I doing wrong?

share|improve this question

closed as too localized by Jon Seigel, Mark Storey-Smith, StanleyJohns, Max Vernon, ypercubeᵀᴹ Apr 8 '13 at 20:17

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 2 down vote accepted

You misspelt the word "WITH". Please check your syntax and try again

share|improve this answer
+1 ::facepalm:: – Daniel Allen Langdon Apr 8 '13 at 15:54
:-) Monday morning ... nods understandingly – RoKa Apr 8 '13 at 15:56
25 easy points for you! – Daniel Allen Langdon Apr 8 '13 at 16:18

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