Monday, March 19, 2012

Export Wizard disturb order of data during exporting Data to Acess 2003 from SQL server 2005

I am using the following query to export data from sql server to ms access in export data wizard:

SELECT * FROM myView where myID = 123

Order by varcharColumnName1,varcharColumnName2 ,intColumnName3

This query will fetch about 7, 00,000 records.

SQL server 2005 shows the correct order, but Data in access table shows Incorrect order of data.

Please give me the solutions.

Speaking logically, sets and tables don’t have order. Order can be specified in a SELECT. Order can be the result of a clustered index but typically there is no guarantee of order without an explicit ORDER BY.

This is generally true of all Relational Databases.

Did you try placing an index on the Access table?

|||

True, I believe this more a call from Access 2003 settings to see how data is displayed.

Also check the code in Access about getting this data display.

|||

Dear All,

I have found a temperory solution. After exporting data to access file. Open table in design view,Right click on tble and select properties. A dialog box will open. Set the order by property like COL1,COL2 etc. CLose the dialog box. Open table, now data is sorted.

Thank you all of you for your replies.

However if you find any better solution please inform me at zeeshanahmedskt@.hotmail.com or post here.

No comments:

Post a Comment