显示标签为“due”的博文。显示所有博文
显示标签为“due”的博文。显示所有博文

2012年3月29日星期四

Floating Point Error - Order By Mystery

I'm having a problem that I think is due to corrupt data. Depending on

the column I use in my order by clause two problems are occuring.

1. No results are returned and I get this error:
A floating point exception occured in the user process.

2. Results are returned but there are a different number of rows depending on which columns I use in my Order By clause.

Examples
SELECT * FROM SymbolStats
ORDER BY calc_date, symbol

Returns - 12207 rows but only includes one of the 25 dates in the table.

-

SELECT * from SymbolStats
ORDER BY current_hv

Returns - 0 rows.

-

SELECT * from SymbolStats
ORDER BY average_hv

Returns - floating point error

With more conditions in the WHERE clause the number of results returned varies greatly.

The

fact that different numbers of rows can be returned from the same query

only differing in how they are ordered seems like a bug.

Does this sound like corrupt data? If so, what are the best methods for fixing it?

Thanks,
patrickYou can run DBCC CHECKDB on your database to look for any possible corruption. You should also check your NT Eventlog for any hardware failures or driver issues or OS related problems.

2012年3月26日星期一

flat file to excel

hi,

i have a flat file with over 66,000 records. When I transfer it to excel (2003), it does not fit in due to limitation of rows. What can I do so that the remaining rows which will not fit in will go to another sheet. thanks a lot!

cherriesh

You can add a Conditional Split Transformation to route the data to multiple Excel destinations based on ranges of values in a specific column (i.e. ID). For more information about using the Conditional Split Transformation, see "Conditional Split Transformation" at http://msdn2.microsoft.com/en-us/library/ms137886.aspx.

|||

Take a look at this post for an example of how to create and output rows to multiple sheets:

http://rafael-salas.blogspot.com/2006/12/import-header-line-tables-_116683388696570741.html