none
get data from .DAT file using SQL statement

    Question

  • i have a question, i use MLDOWNLOADER to download dataprice from forex market, and data return maybe in form .DAT file, because, i see three file EMASTER,MASTER, F1.DAT,
    and i think my data is .DAT file, but i can save as EXCEL file to read, i have just read it in this program,
    HOW can i get these data from .DAT file?
    can i  import into SQL2005 using SQL statement.?
    ...
    i have read some relative docs, but i can solve Can you help me
    thanks for you help


    Sunday, March 25, 2007 12:29 PM

All replies

  • What is the internal format of the file? Try opening the .DAT in Notepad. If it appears as readable text, with comma or tab delimiters, then SSIS can read it as a flat file. If it appears as a lot of special characters in Notepad, then you might need a OLEDB or ODBC driver to read it.

    Or, since you can save it as Excel, you could import from Excel through SSIS.

    Sunday, March 25, 2007 1:43 PM
    Moderator
  • MLDownloader (http://www.trading-tools.com/) can output to CSV ASCII format.  Once in CSV format, you can use the Flat File Source connection to read in your file.
    Sunday, March 25, 2007 1:59 PM
    Moderator
  • thanks for your answer, i know
    MLDownloader (http://www.trading-tools.com/) can output to CSV ASCII format.  Once in CSV format, you can use the Flat File Source connection to read in your file.
    But CSV ASCII format  return  values:
    Date TimeOpen High Low Close Unadjusted close Split  Dividend
    01/01/2006 1 18 1 19 1 18 1 18 0 00 0 00 0 00 "EURUSD"



    it is not result for mei want  result inform below:
    1/4/2006 0:00 1.1819 1.203 1.181 1.2015 6799
    1/5/2006 0:00 1.2018 1.2146 1.2003 1.2118 7752
    1/6/2006 0:00 1.2119 1.2122 1.2063 1.211 6986
    these result i view the same in MLDownloader  program but i can output or copy it to excel

    what must i do? do you have docs or introduction about problem
    thanks for your answer...

    help me
    Sunday, March 25, 2007 3:43 PM
  • Save the output you want to Excel, and use an Excel source adapter in SSIS to read it in.
    Sunday, March 25, 2007 5:12 PM
    Moderator
  • sorry, but have nay way to put DAT file into database using XML,  i want to use .DAT file
    Monday, March 26, 2007 2:07 PM
  • Talk to the support people that provide MLDownloader to ensure you can get the output of the program in the way you want it.  We don't support MLDownloader here.

    If you can get the file in the format as in the example below, then we can help you.

    column1  column2  column 3 ...
    "valueA"  12.03  23.53 ...
    "valueB"  3.23  9.32 ...
    .....
    Monday, March 26, 2007 2:15 PM
    Moderator
  •  Phil Brammer wrote:
    Talk to the support people that provide MLDownloader to ensure you can get the output of the program in the way you want it. We don't support MLDownloader here.

    If you can get the file in the format as in the example below, then we can help you.

    column1 column2 column 3 ...
    "valueA" 12.03 23.53 ...
    "valueB" 3.23 9.32 ...
    .....

    yes, please help me to import data  with this format, or import from  DAT file using XML
    thanks a lot
    Monday, March 26, 2007 3:55 PM
  • Use a flat file source.  Specify a text qualifier if one exists, and chose delimited format.  On the columns tab you can choose the delimiter that exists between each field.  Usually in a CSV file it's a comma, though some people misuse the CSV term and use something else.

    When you add a Flat File Source to your data flow, click on the "New" button and walk through the pages trying different settings so that when you preview the data, it is all correct.

    Once done, you can add whatever you want for a destination component and simply hook them up.
    Monday, March 26, 2007 4:00 PM
    Moderator
  • All you have to is to click on the Download->Options->Define a custom ASCII file format button. In this dialog you are able to specify and ASCII file you want. Then you can import the ASCII file that was created by MLDownloader.

     

    The .DAT files created by MLDownloader are MetaStock files. A specification about the MetaStock files can be found on http://www.trading-tools.com/onlinemanuals/mlib/Help-File-2.html#Heading2036

    Tuesday, March 27, 2007 3:47 PM