Results 1 to 4 of 4

Thread: insert database not in order

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2004
    Posts
    908

    insert database not in order

    how come when i insert different sets of data ...i got the order all mess up? is this the norm?( yes though i can re-arrange by order)

  2. #2
    Fanatic Member Bonker Gudd's Avatar
    Join Date
    Mar 2000
    Location
    Saturn
    Posts
    748
    The order you insert records is the order they appear in the table.

    You could always have a clustered index to get the order you want, depending upon which database you're using

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2004
    Posts
    908
    i am using sql sever...how do i use clustered index?

  4. #4
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    Originally posted by Bonker Gudd
    The order you insert records is the order they appear in the table.

    You could always have a clustered index to get the order you want, depending upon which database you're using

    That's a poor way to use clustered indexing... and not the purpose of it either. If you want your recordset in a particular order, use an Order By on the SELECT.

    Bonker is right in that the records appear in the order they appear in the table. There could be a couple of reasons they appear in the order they do. 1)It's filling old holes left by deletes. 2) There already is some kind of clustering on the table,

    TG
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width