Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Can I use "Create Domain" in Sql Server 2008?

Can I use "Create Domain" in Sql Server 2008?

Scheduled Pinned Locked Moved Database
databasesql-serversysadminhelpquestion
11 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    Hello I am trying to execute this query:

    Create Domain Email
    As
    Varchar(255) Check (Position('@', Value) > 1)

    But the below error will occur:

    Unknown object type 'Domain' used in a CREATE, DROP, or ALTER statement.

    SignatureNotFoundException

    L I U 4 Replies Last reply
    0
    • L Lost User

      Hello I am trying to execute this query:

      Create Domain Email
      As
      Varchar(255) Check (Position('@', Value) > 1)

      But the below error will occur:

      Unknown object type 'Domain' used in a CREATE, DROP, or ALTER statement.

      SignatureNotFoundException

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      ..Sql Server does not know about "domains". It hosts tables, records, and you can create things like databases and tables. How did you expect this to work? Simply throw in the word "domain" and pray that Sql knows what you want? Computers don't work like that. You learn the computers language if you want things from it, not the other way around.

      Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]

      I L 3 Replies Last reply
      0
      • L Lost User

        Hello I am trying to execute this query:

        Create Domain Email
        As
        Varchar(255) Check (Position('@', Value) > 1)

        But the below error will occur:

        Unknown object type 'Domain' used in a CREATE, DROP, or ALTER statement.

        SignatureNotFoundException

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        ..now that I had my rant, let's try and find an answer to your problem. For that, we first need to get a clear description on the problem itself; as is know, I can only guess at what you are trying to do.

        • Are you trying to store email-adresses? (creating them is done in another server)
        • Create a login? (Google for "create login")
        • Something else?

        Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]

        L 1 Reply Last reply
        0
        • L Lost User

          ..Sql Server does not know about "domains". It hosts tables, records, and you can create things like databases and tables. How did you expect this to work? Simply throw in the word "domain" and pray that Sql knows what you want? Computers don't work like that. You learn the computers language if you want things from it, not the other way around.

          Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]

          I Offline
          I Offline
          Ingo
          wrote on last edited by
          #4

          Eddy Vluggen wrote:

          Sql Server does not know about "domains". It hosts tables, records, and you can create things like databases and tables.

          A DOMAIN in SQL is defined as a set of values for a given attribute! So, of course SqlServer knows something about domains! It just called different! In SqlServer you use ADD CONSTRAINT to simulate domains.

          ------------------------------ Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.

          L 1 Reply Last reply
          0
          • L Lost User

            Hello I am trying to execute this query:

            Create Domain Email
            As
            Varchar(255) Check (Position('@', Value) > 1)

            But the below error will occur:

            Unknown object type 'Domain' used in a CREATE, DROP, or ALTER statement.

            SignatureNotFoundException

            I Offline
            I Offline
            Ingo
            wrote on last edited by
            #5

            Well, as I know, DOMAIN is not implemented in SqlServer but as a SQL-Language element it's a reserved word. You can use ADD CONSTRAINT to check the values (google for sql server add constraint, there are lot of samples).

            ------------------------------ Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.

            1 Reply Last reply
            0
            • I Ingo

              Eddy Vluggen wrote:

              Sql Server does not know about "domains". It hosts tables, records, and you can create things like databases and tables.

              A DOMAIN in SQL is defined as a set of values for a given attribute! So, of course SqlServer knows something about domains! It just called different! In SqlServer you use ADD CONSTRAINT to simulate domains.

              ------------------------------ Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              Goood morning :-D It is, you're right, stupid mistake. ..and twice as bad given the tone.

              Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]

              1 Reply Last reply
              0
              • L Lost User

                Hello I am trying to execute this query:

                Create Domain Email
                As
                Varchar(255) Check (Position('@', Value) > 1)

                But the below error will occur:

                Unknown object type 'Domain' used in a CREATE, DROP, or ALTER statement.

                SignatureNotFoundException

                U Offline
                U Offline
                User 9499736
                wrote on last edited by
                #7

                Perhaps an alias data type ? http://msdn.microsoft.com/en-us/library/ms175007(v=sql.100).aspx

                J 1 Reply Last reply
                0
                • U User 9499736

                  Perhaps an alias data type ? http://msdn.microsoft.com/en-us/library/ms175007(v=sql.100).aspx

                  J Offline
                  J Offline
                  J4amieC
                  wrote on last edited by
                  #8

                  Link police, at your service http://msdn.microsoft.com/en-us/library/ms175007(v=sql.100).aspx[^]

                  1 Reply Last reply
                  0
                  • L Lost User

                    ..Sql Server does not know about "domains". It hosts tables, records, and you can create things like databases and tables. How did you expect this to work? Simply throw in the word "domain" and pray that Sql knows what you want? Computers don't work like that. You learn the computers language if you want things from it, not the other way around.

                    Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]

                    L Offline
                    L Offline
                    Lost User
                    wrote on last edited by
                    #9

                    I saw some samples for creating UDDTs using Create Domain... . I didn't that word from myself.

                    SignatureNotFoundException

                    1 Reply Last reply
                    0
                    • L Lost User

                      ..Sql Server does not know about "domains". It hosts tables, records, and you can create things like databases and tables. How did you expect this to work? Simply throw in the word "domain" and pray that Sql knows what you want? Computers don't work like that. You learn the computers language if you want things from it, not the other way around.

                      Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #10

                      I saw some samples for creating UDDTs using Create Domain... . I didn't make that word from myself.

                      SignatureNotFoundException

                      1 Reply Last reply
                      0
                      • L Lost User

                        ..now that I had my rant, let's try and find an answer to your problem. For that, we first need to get a clear description on the problem itself; as is know, I can only guess at what you are trying to do.

                        • Are you trying to store email-adresses? (creating them is done in another server)
                        • Create a login? (Google for "create login")
                        • Something else?

                        Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]

                        L Offline
                        L Offline
                        Lost User
                        wrote on last edited by
                        #11

                        I am trying to create a UDDT. I know how to do it using "Create Type", but I have also saw some query like I have posted.

                        SignatureNotFoundException

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups