Take the 2-minute tour ×
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.

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:

CREATE VIEW dbo.MyView WTIH SCHEMABINDING AS
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.

1 Answer 1

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.