473,749 Members | 2,513 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Default retrieval from table loaded by DTS

[MS SQL Server 7]

We load a table from a text file using Data Transformation Services. The
source file is already sorted by primary key order.

After the DTS load, the default retrieval order on the target table (select
* from targettable) appears to be random. I know that theoretically the
retrieval order from a SELECT statement isn't guaranteed, but this is the
first time that I've actually had a default retrieval not follow the
primary key order in the table. I'm thinking that what we're seeing is the
physical storage order of the rows in the table, which have been somewhat
scrambled by the way that DTS loads a text file (probably some I/O
optimization).

Is there any way that we can get DTS to load the table in the order that
the rows appear in the text file (assuming that's what our problem is)?
The Project Lead really doesn't like the fact that the default retrieval
order isn't following the primary key.

Regards,
Lyle H. Gray
Jul 20 '05 #1
1 1652
Lyle H. Gray (gr**@no.spam.c s.umass.edu.inv alid) writes:
[MS SQL Server 7]

We load a table from a text file using Data Transformation Services. The
source file is already sorted by primary key order.

After the DTS load, the default retrieval order on the target table
(select * from targettable) appears to be random. I know that
theoretically the retrieval order from a SELECT statement isn't
guaranteed, but this is the first time that I've actually had a default
retrieval not follow the primary key order in the table.
You must have been living in a sheltered word. What you can expect is
things like "SELECT * FROM tbl" for small tables to follow the clustered
index (which in many cases is not the PK). For larger tables, this is
less expected, as SQL Server may open parallel streams, you get chunks
have decent order internally, but the chunks themselves appear in a mess.
If you have a WHERE clause, this can lead to another index being used,
leading to another order etc.
Is there any way that we can get DTS to load the table in the order that
the rows appear in the text file (assuming that's what our problem is)?
The Project Lead really doesn't like the fact that the default retrieval
order isn't following the primary key.


Tell your project lead that there is no default retrieval order. If you
want a certain order, use ORDER BY. If you don't use ORDER BY, that
means that you don't care about order.

--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1281
by: linda williams via AccessMonster.com | last post by:
The code creating the recordset that is commented out below works on all my user's machines except two. What is especially irritating is that this code did work on one of their machine for several months. In trying to fix a different problem he was having with the app MS office XP was reloaded twice just to make sure everything was loaded. Various internals were also looked at. We know its the machine problem because the user can login onto...
7
1962
by: Aaron Smith | last post by:
How do I set field default values at runtime? Say I want a check box that is bound to a boolean field to default to false for a certain set of criteria, and then true for others? I also need to do this with other fields, not just boolean.... Thanks, Aaron -- --- Aaron Smith
10
1666
by: Doug Bell | last post by:
Hi, I have an application that has a "Data Access Class" and "User Interface Class". It is for receiving Purchase Order data from one system and pushing processed transactions to another system. The system generally works quite well. Currently the User interface calls for a refresh of data every 15 minutes (selectable) and the Data Access Class connects to the DB and retrieves the
1
1976
by: kalulu | last post by:
Clinic Visits form is done at 3,6,9,12,15,18 and 24 months. The same table (VISITS) is used repetitively during the study. Timepoint is recorded in the table variable VISMO (visit month). When we browse the form on a particular visit, let's say 6 month ie where vismo=6 we have this problem when we need to create a new record because we want VISMO to default to 6. Likewise we want VISMO to default to 12 when we browse the form where vismo=12....
12
12133
by: Doogie | last post by:
How do I make a value the default value for a combo box in ASP 3.0? What I have below does NOT work, yet I've seen it in HTML file examples before (and works if I put it in a HTML file by itself, but not if I use it in a ASP 3.0 app. <select name="cboCompany" style="text-align:right; font-size:8pt"> <option value="08">08</option> <option value="09" selected="true">09</option> <option value="33">33</option>
12
3945
by: grace | last post by:
i am wondering why my database retrieval becomes too slow...we set up a new server (ubuntu, breezy badger) machine where we transferred all our files from the old server.. Our new server uses Asus p5pe-vm motherboard and an Intel Pentium D 3.0Ghz processor, compared to the old one where we uses asrock motherboard and AMD Duron. Both has the same version of mysql installed... To summarized, both machine has the same configuration except...
0
4418
by: JosAH | last post by:
Greetings, Introduction At the end of the last Compiler article part I stated that I wanted to write about text processing. I had no idea what exactly to talk about; until my wife commanded me to "clean up that mess you never use anyway and please dump the rest of it in the attic or simply throw that junk away". I want to make a statement here:
0
4093
by: JosAH | last post by:
Greetings, the last two article parts described the design and implementation of the text Processor which spoonfeeds paragraphs of text to the LibraryBuilder. The latter object organizes, cleans up and stores the text being fed to it. Finally the LibrayBuilder is able to produce a Library which is the topic of this part of the article. Introduction
2
2049
by: Jeff | last post by:
Hi I'm trying to achieve a scenario where I have c# files that are compiled dynamically, the assemblies are then loaded in a different AppDomain, I call a simple method from the object, and then unload the AppDomain to release the lock on the assemly files (so to I can compile the code again if it has been modified). However, I've encountered a problem, whereby the assembly is also loaded in the default AppDomain! I have a few classes...
0
8833
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9568
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9389
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9335
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9256
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6801
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6079
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3320
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2218
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.