Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
skara
Starting Member
1 Post |
Posted - 2005-05-25 : 18:24:08
|
| :confused: I have a table with field names abcdef and assigned floats as datatype: a b c d e f1215.2548 87512.223 1215.2548 87512.223 1215.2548 87512.223 1215.2548 87512.223 1215.2548 87512.223 1215.2548 1215.2548 87512.223 1215.2548 87512.223 1215.2548 87512.223 1215.2548 87512.223 1215.2548 87512.223 1215.2548 1215.2548 87512.223 1215.2548 87512.223 1215.2548 1215.2548 87512.223 1215.2548 87512.223 1215.2548 1215.2548 87512.223 1215.2548 87512.223 1215.2548 1215.2548 87512.223 1215.2548 87512.223 1215.2548 87512.223 1215.2548 87512.223 1215.2548 87512.223 1215.254891. when I outputting data in xml format by using sqlxml, I am not getting exact values as was in the table. Any help is greatly appreciated.2. How can I match data that is sent in as a csv file that has only ab valuesto the values in the table in order to retrieve just the correspondind cdef values? is there a way that I can read a text file that is given by the user and return values from the table.thanks skarahope I dint confuse anybody :) |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2005-05-25 : 18:38:28
|
| Float is an approximate datatype, very often it cannot be converted to a precise type without incurring a rounding error, regardless of how it was originally entered into the table.You can import text files directly into SQL Server using bcp or BULK INSERT, see Books Online for more information. You can use a format file in conjunction with these commands to skip or reorder columns in your table and/or data file during import. Books Online has examples of these under "bcp - format files". In your case, you would import the file into a holding or staging table specifically meant just for importing raw data. Once it is imported, you can then join that staging table to the regular table in order to do updates or to fill in the data missing from the file. |
 |
|
|
|
|
|