Select * from second column ?

  • Or you find a better way of doing it.

    That’s why this weekend I'm going to a DIY store to get a new drill because the hammer and chisel is just not suited to the job. (yes I have a hole but its not very good and will start to fall apart when I hang anything from it)

    What I’m still missing here is what happens after the SQL.

    You run a SQL statement or stored proc in some manor, then you have some data. Then what… where does it go what is the application or user that deals with the result?

  • Its not a one off is it???

  • jonathan allen (10/17/2008)


    Just to fill in some gaps since my last post (which appears to have started a heated debate!)...

    apologies to all involved if i provided a solution that didnt solve anything

    Well - I would hope 'enlightening' rather than 'heated'. I certainly am not suggesting that the suggested solutions 'are not solving the problem'. They do. Personally while I'm not bad as far as SQL development goes (I reckon) XML's straightforward on most respects and this seemed to me to be a classic case of "render unto the client app that which is is the client app's". Was just a puzzle to me thaht such a simple solution was ignored/missed

  • Let's start with the orginal question:

    "Hello Experts,

    Actually I have a Dynamically generated table with the columns names like Q1, Q2.... up to any number don't know. I just wanted todo a select * from second column. i.e, avoid the first column any idea? I am using MSSQL 2005.

    Thank you,

    Arshad "

    Nothing about XML!!!

    That was the question/problem a tryed to solve.

    Steve Jones "our beloved champion" maybe you should give some guidelines

    how to adress this community with questions/problems.

    //Gosta M

  • Gosta Munktell (10/17/2008)


    Let's start with the orginal question:

    "Hello Experts,

    Actually I have a Dynamically generated table with the columns names like Q1, Q2.... up to any number don't know. I just wanted todo a select * from second column. i.e, avoid the first column any idea? I am using MSSQL 2005.

    Thank you,

    Arshad "

    Nothing about XML!!!

    That was the question/problem a tryed to solve.

    Steve Jones "our beloved champion" maybe you should give some guidelines

    how to adress this community with questions/problems.

    //Gosta M

    Actually, Jeff Moden wrote a very good article on how to ask for help:

    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    😎

  • Yes very good!

    But people who are new to this community don't know about those guidlines and

    they are in a middle of a problem and just waiting for us to to give a qiuck answere.

    When you join the community there can be some guidelines how to best "use" the

    expertise.

    //Gosta

  • Gosta Munktell (10/17/2008)


    Yes very good!

    But people who are new to this community don't know about those guidlines and

    they are in a middle of a problem and just waiting for us to to give a qiuck answere.

    When you join the community there can be some guidelines how to best "use" the

    expertise.

    //Gosta

    That's a good idea, but that requires design changes to the site. There's actually a section/forum just for those suggestions. I would encourage you to post this there so that Steve Jones can see it. He may see this one anyway, but posting it there helps him out a bit.:)

    Otherwise - that's why you will see quite a few folks with a link to that article in their signature.

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

  • Hi:

    I have a kinda sorta similar situation.

    insert @Tmp SELECT SignalID from ReportLogConfig WHERE OPCPath is not NULL and Location = @Location

    EXCEPT SELECT SignalID from @lTableName

    I'm trying to make @lTableName a variable, but of course it's telling me i need to make it a Table Variable, which is not one of my options. Any way to get it to work as a variable?

Viewing 8 posts - 31 through 37 (of 37 total)

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