Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. filtering dataset and pu the result in another datatable.

filtering dataset and pu the result in another datatable.

Scheduled Pinned Locked Moved Database
question
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Aslesh
    wrote on last edited by
    #1

    hi i have a dataset which consists of one tables. i need to filter this data set and store it in another table. how can i do this?

    A W 2 Replies Last reply
    0
    • A Aslesh

      hi i have a dataset which consists of one tables. i need to filter this data set and store it in another table. how can i do this?

      A Offline
      A Offline
      Ashfield
      wrote on last edited by
      #2

      Easy

      Select * into newtable from oldtable where 1 = 2 -- create empty table
      insert into newtable select * from oldtable where ....

      Although you can do select * into newtable from oldtable where.. this is bad practice as it locks the system tables for the duration of the query.

      Bob Ashfield Consultants Ltd

      1 Reply Last reply
      0
      • A Aslesh

        hi i have a dataset which consists of one tables. i need to filter this data set and store it in another table. how can i do this?

        W Offline
        W Offline
        Wendelius
        wrote on last edited by
        #3

        First decide which tehcnology you want to use, SQL or C# and then place the question on appropriate forum. Do not cross-post. It's considered rude. Another question here: http://www.codeproject.com/script/Forums/View.aspx?fid=1649&msg=2814662[^]

        The need to optimize rises from a bad design. My articles[^]

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups