1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Please Help! Tables with SQL's Reserved Words....!

Discussion in 'C#' started by JEP_Dude, Sep 1, 2010.

  1. #1
    Hey Experts ....

    I'm caught with a difficult SQL problem. I have an array of stock symbols. One in particular is, "ALL". I cycle through the array with a simple FOR...NEXT loop. I use SQL's CREATE command to make each new table.

    How can I make a new table with a reserved word (or SQL Command)? Is there some special character that I should use to surround the array name to indicate that it may contain a reserved word?

    I'm using Visual Basic .Net 2008.

    May each of you have a blessed day the Lord wills.
    SEMrush
    JEP_Dude
     
    JEP_Dude, Sep 1, 2010 IP
    SEMrush
  2. JEP_Dude

    JEP_Dude Peon

    Messages:
    121
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Dear SQL Experts....

    I'm embarrassed ... How silly of me. This fix was so easy! Please disregard my request for assistance on this topic!

    May everyone have a blessed day.

    JEP_Dude
     
    JEP_Dude, Sep 4, 2010 IP
  3. gotlivechat

    gotlivechat Member

    Messages:
    516
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    35
    #3
    How did you end up resolving the issue?
     
    gotlivechat, Sep 8, 2010 IP
  4. JEP_Dude

    JEP_Dude Peon

    Messages:
    121
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Just to let you know ... The solution was MUCH simpler then I thought. To correct this problem, I added a suffix to the end of each stock symbol after an "_" (underscore) character. Hence, ... the problem was no more!

    God bless....

    JEP_Dude
     
    JEP_Dude, Sep 9, 2010 IP
  5. camjohnson95

    camjohnson95 Active Member

    Messages:
    737
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    60
    #5
    You just need to change the name of the field to something that is not a reserved word...
     
    camjohnson95, Sep 14, 2010 IP
  6. DoDo Me

    DoDo Me Peon

    Messages:
    2,258
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Select * from [All]
     
    DoDo Me, Sep 20, 2010 IP
  7. prptl709

    prptl709 Guest

    Messages:
    83
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Sorry I don't know about that.If I got the answer then I will give you reply.
     
    prptl709, Mar 1, 2011 IP
  8. taarzan

    taarzan Active Member

    Messages:
    240
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    53
    #8
    just use [] brackets this will do your work with all reserved keywords whether u use it as a field name or table name it will work
     
    taarzan, Mar 11, 2011 IP