in

The ORM Foundation

Get the facts!

Question / SQL Generation

Last post Tue, Sep 24 2013 12:39 by Ken Evans. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • Mon, Sep 23 2013 20:55

    Question / SQL Generation

    Hi folks,

    Been a while since I played around with ORM, but I am working on a simple model to generate to SQL Server. Bear in mind I am relatively inexperienced with both NORMA and SQL Server.

    When I generate SQL Server code, I noticed that all of my tables get generated with the schema name as a prefix, e.g. "Database.Table". When I run these scripts, I end up with a database called Database, but then instead of having tables called Table1, Table2, Table3, all of my tables are Database.Table1, Database.Table2, etc.

    So, when I write queries against this, I have to basically write like:

    SELECT * 

    FROM [database].[database].[table]

    This is different from most databases I have seen, where the extra [database] isn't there.

    Is there any way to change settings in NORMA to prevent it from prefixing the table names with the schema name? I can manually remove them, of course, but I am going to be going through a process whereby I will be building and deleting, building and deleting, for some time, and it's going to be very tedious to do it manually each time.

     Suggestions appreciated!

    Steve

  • Tue, Sep 24 2013 12:39 In reply to

    • Ken Evans
    • Top 10 Contributor
      Male
    • Joined on Sun, Nov 18 2007
    • Stickford, UK
    • Posts 805

    Re: Question / SQL Generation

    Hi Steve,

    Welcome back to ormland!

    Please would you post some of your DDL so that we can get a better idea of what your generated DDL looks like.

     By the way, which RDBMS are you using? 

    Ken

Page 1 of 1 (2 items)
© 2008-2024 ------- Terms of Service