Executing query

  • Trying to learn sql7

    When I write a query in Server Query Analyser, it executes fine.

    I create table, but the table does not show in the database. It goes to system catalog, where I can not see it. Do I have to write the code somewhere else then in Query annalyser or what do I do wrong. Please, somebody help! Stucked.

    Many thanks in adwance.

    /Joe

  • This is a 2008 forum...so you should post things like this to http://www.sqlservercentral.com/Forums/Group406.aspx

    When you create the table, make sure you have:

    USE YOURDB

    GO

    Depending on how you opened the query window, by Default SQL Server will default the database you're running things against to "master". If you can't find your table in the database you're expecting it in, my guess is it's sitting in the master DB.

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • If the table was created then it's there.

    Are you sure you are pointing to the correct server?, DB?

    Are you trying to access that table from the same login (might be permissions issue).

    In QA, you have to refresh the treeview for the new table to be visible in there.

    P.S. Why are you trying to learn sql 7? Sql 12 is coming out in the next few months!!

  • Thanks a lot!

    Tried now to specifically use Master and it worked.

    Thereafter I tried again on MyDB and it worked to.

    Very happy 🙂

    /Joe

  • Ninja's_RGR'us (12/8/2011)


    P.S. Why are you trying to learn sql 7? Sql 12 is coming out in the next few months!!

  • Thanks a lot.

    It works now 🙂

    Joe

  • joeknas (12/8/2011)


    Thanks a lot.

    It works now 🙂

    Joe

    I know it works, I'm self-quoting because you're not answering my question!

  • Ninja's_RGR'us (12/8/2011)


    Ninja's_RGR'us (12/8/2011)


    P.S. Why are you trying to learn sql 7? Sql 12 is coming out in the next few months!!

    Are there surviving machines that can run SQL 7? 😉

    Jared

    Jared
    CE - Microsoft

  • Hello again

    I found out what caused the problem!

    To see the new by code created tables You have to use UPPDATE !

    Something I did not know. The tables I created before showed up after I closed and late reopened the database.

    /Joe

  • Sorry, I am old guy, using the old things 🙂

    /Joe

Viewing 10 posts - 1 through 10 (of 10 total)

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