Data type I don't understand (COMMENT(int),null)

  • I'm a unix/postgres guy and I had this job thrown at me "here figure this out"

    so i'm a bit out of my depth.

    There is a table with a column called gl_text its type definition looks like this (COMMENT(int),null)

    it seems to store integers, that somehow link to a foreign table of comments, but I've no idea how to get to it.

    Its somehow not a regular foriegn key.

    Ideas?

  • Jeff run this command:

    EXEC sp_help gl_text

    a lot of results weill come up, but towards the bottom you should find all the foreign kesy in the table...scroll right a bit and you should see the comment field references some other table.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Thanks, that was a good start.

    Now it actually says the data type for that column is "COMMENT"

    I'm googling, but I'm not sure where to go from there. I've never heard of that data type.

  • ok, now it sounds like they added a custom data type; no big deal, but a bit harder to figure out.

    In SQL, you can declare your own datatype, and decide what it's real data is behind the scenes...in my example below, i made a datatype "myComment", which is just a varchar(550);

    i believe that is what you are going to find in your system....just an abtraction to a specific size.

    here's a screenshot to guide you to where to see the definition...it's in the specific database you are looking at:

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Okay, it seems to be an INT that stores 4 bytes. I'm still clicking around trying to glean a bit more.

  • Lowell (8/16/2010)


    ok, now it sounds like they added a custom data type; no big deal, but a bit harder to figure out.

    In SQL, you can declare your own datatype, and decide what it's real data is behind the scenes...in my example below, i made a datatype "myComment", which is just a varchar(550);

    i believe that is what you are going to find in your system....just an abtraction to a specific size.

    here's a screenshot to guide you to where to see the definition...it's in the specific database you are looking at:

    Well, great work! You have helped me to improve my knowledge about this field. Thank you so much for sharing.

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

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