You must Sign In to post a response.
  • Category: SQL Server

    Select statement in sql


    i posted my problem earlier..tht i want to skip particular fields from select query at runtime/...and i dont know the table user will select at runttime..

    so i cannot use
    select col1,col2,,,
    its just a column name 'id' is present in evry table ..i donot want to show this column at runtime to is their any way to skip a particiculr col in select statement
    so plz help
  • #430976

    where are you displaying the values?????

    Thanks & Regards
    Anil Kumar Pandey
    Microsoft MVP, DNS MVM

  • #430979

    Yes,Fill all selected record into DataSet which is assigned to DataTable.after that remove column in that table by using

    DataTable dt=ds.Table["TanbleName"];

  • #430989
    You can pass whatever the columns you want in select query , only needed value , no need to pass the all the columns value on Select query

    For Interview Question and Answers:

  • #431006
    In the front end, if you are using datareader to display the records then u can acheive this.

    For Eg.
    While dr.Read()
    text1.Text = dr[0];
    text2.Text = dr[1];
    text3.text = dr[4];


  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.