creating table issue

  • Hello all you smart individuals, I read the forums here quite a bit but this is my first post. Let me just say that you guys are so smart it's freakin scary. Why are you not working for NASA is my question?

    Anyways let me introduce myself, I'm brand spanking new to sql server 2005 at the new job I started. I've been reading and researching plus just a little guidance from my boss.

    I so need some help which is simple for you but for me I'm struggling.

    I'm trying to create a table in my database I'll give you an example:

    create table amd_cpu

    (

    phenom_x4 nvarchar(10),

    athlon_x3 nvarchar(10,

    athlon_x2 nvarchar(10),

    athlon_64 nvarchar(10),

    sempron nvarchar(10)

    )

    go

    I keep getting syntax errors like this:

    Msg 102, Level 15, State 1, Line 5

    Incorrect syntax near 'athlon_x2'.

    I know it has to do with using the numbers in athlon and can't figure out how or what to use to make it work please help a very stupid newbie, thanks to all who answer, have a great day.

  • You're missing a close-paren after the size on the x3 line.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • OMG..............I feel so stupid, lmao............

    I can't believe I overlooked that this whole time.

    Thank you so much

    By the way I read alot of your replies helping others, you're pretty impressive, thanks again and have a good one.

  • LOL 😀

  • ghostdance1969 (4/6/2010)


    OMG..............I feel so stupid, lmao............

    I can't believe I overlooked that this whole time.

    Thank you so much

    By the way I read alot of your replies helping others, you're pretty impressive, thanks again and have a good one.

    That's the third beanie Gus has earned this week alone! And yep, this is just one of the many reasons why we here at SSC are in such high demand for dates, parties and other social events. 😀

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • Thanks for the complement, and don't fell bad. I'm sure all of us have had a simple syntax error that we just couldn't see in the code.

    Just a list to check for in T-SQL.

    Parens, commas, the GO separator, and semi-colons. We do have begin..end blocks as well. Making sure those match up, or separate statements, will go a long way towards fixing syntax errors.

    I'd also look at how people format code in the forums. We separate things onto lines at times because it helps us find errors.

  • ghostdance1969 (4/6/2010)


    OMG..............I feel so stupid, lmao............

    I can't believe I overlooked that this whole time.

    Thank you so much

    By the way I read alot of your replies helping others, you're pretty impressive, thanks again and have a good one.

    Those ones are easy to miss.

    Thanks for the compliment. I do try to help.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RBarryYoung (4/7/2010)


    ghostdance1969 (4/6/2010)


    OMG..............I feel so stupid, lmao............

    I can't believe I overlooked that this whole time.

    Thank you so much

    By the way I read alot of your replies helping others, you're pretty impressive, thanks again and have a good one.

    That's the third beanie Gus has earned this week alone! And yep, this is just one of the many reasons why we here at SSC are in such high demand for dates, parties and other social events. 😀

    Two more beanies, and I'll have enough to cover all my heads! Woot! :w00t:

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • GSquared (4/7/2010)


    RBarryYoung (4/7/2010)


    ghostdance1969 (4/6/2010)


    OMG..............I feel so stupid, lmao............

    I can't believe I overlooked that this whole time.

    Thank you so much

    By the way I read alot of your replies helping others, you're pretty impressive, thanks again and have a good one.

    That's the third beanie Gus has earned this week alone! And yep, this is just one of the many reasons why we here at SSC are in such high demand for dates, parties and other social events. 😀

    Two more beanies, and I'll have enough to cover all my heads! Woot! :w00t:

    Heh. Five heads, it's such an unfair advantage! 😛

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • Steve Jones - Editor (4/7/2010)


    Thanks for the complement, and don't fell bad. I'm sure all of us have had a simple syntax error that we just couldn't see in the code.

    Just a list to check for in T-SQL.

    Parens, commas, the GO separator, and semi-colons. We do have begin..end blocks as well. Making sure those match up, or separate statements, will go a long way towards fixing syntax errors.

    I'd also look at how people format code in the forums. We separate things onto lines at times because it helps us find errors.

    Especially when starting out. I remember once when I first started that I spent several days chasing down a paranthesis syntax issue that just about drove me to tears. Then I learned how to format my code better.

    ---------------------------------------------------------------------
    Use Full Links:
    KB Article from Microsoft on how to ask a question on a Forum

  • RBarryYoung (4/7/2010)


    And yep, this is just one of the many reasons why we here at SSC are in such high demand for dates, parties and other social events. 😀

    You mean, if I stick around here long enough, I could be in high demand for dates, parties and other social events, too? Ooooh boy......

    Rob Schripsema
    Propack, Inc.

  • Rob Schripsema (4/7/2010)


    RBarryYoung (4/7/2010)


    And yep, this is just one of the many reasons why we here at SSC are in such high demand for dates, parties and other social events. 😀

    You mean, if I stick around here long enough, I could be in high demand for dates, parties and other social events, too? Ooooh boy......

    Yes, exactly.

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • Wait... Parties?

    WHY WAS I NOT TOLD OF THIS. I LOVE PARTIES. :crazy:

    Well, Ok. Actually I just love beer... but you know what you normally have at parties? Beer. And like... other people or something. But yeah... Beer.

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • Rob Schripsema (4/7/2010)


    You mean, if I stick around here long enough, I could be in high demand for dates, parties and other social events, too? Ooooh boy......

    Uh, no. Barry's teasing. You're not likely to be in high demand socially. Geekily, maybe.

  • Steve Jones - Editor (4/7/2010)


    Rob Schripsema (4/7/2010)


    You mean, if I stick around here long enough, I could be in high demand for dates, parties and other social events, too? Ooooh boy......

    Uh, no. Barry's teasing. You're not likely to be in high demand socially. Geekily, maybe.

    Hmph. Well, it works for me.

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

Viewing 15 posts - 1 through 15 (of 16 total)

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