Invalid object name dbo.tblStore s

  • Hi,

    I've written a sproc in sql2k, and I keep getting this error.I am sure that it is something really simple.Can anyone help?

    <code>

    CREATE PROCEDURE [dbo].[spStoreContactDexGet]

    @storeId int

    AS

    SELECT

     [s.storeId],

     [s.storeName]

    FROM

     [dbo].[tblStore s]

    <\code>

    I have an inner join in this query, But even after I remove the inner join, I still get the error.

    Can anyone help?

    ta,

    yogi

  • is "tblstore s" the name of the table or are you trying to create an alias for it? If an alias move the S outside the bracket and try again.



    Shamless self promotion - read my blog http://sirsql.net

  • It was an alias.Thanks Nicholas.That worked.

    here's the code for anyone who's interested in the solution:

    <code>

    SELECT

    s.[storeId],

    s.[storeName]

    FROM

     [dbo].[tblStore  ] s

    <\code>

    cheers,

    yogi

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply