in

The ORM Foundation

Get the facts!

Question / SQL Generation

Last post 09-24-2013 12:39 by Ken Evans. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 09-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

  • 09-24-2013 12:39 In reply to

    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-2014 The ORM Foundation: A UK not-for-profit organisation -------------- Terms of Service