Results 1 to 9 of 9

Thread: TO ALL SQL gurus TEXT FILE IMPORT VERY VERY URGENT

  1. #1
    lilly Guest

    TO ALL SQL gurus TEXT FILE IMPORT VERY VERY URGENT



    Hi Every one.

    I have a text file (BEA.Txt) which contains the description of the products. I have the product table as below

    Product_Code VarChar(3)
    Description Text

    I need to add the text from text file BEA.TXT into product table for Product_code = BEA.

    DTS DOS NOT WORK !!!. IT ADDS SEVERAL RECORDS TO PRODUCT TABLE. IT CONSIDERS EACH CARRIAGE RETURN AS NEW RECORD IT DOES NOT HELP MEARLY

    Please help me
    Thanks
    Lilly

  2. #2
    Duncan Maddox Guest

    TO ALL SQL gurus TEXT FILE IMPORT VERY VERY URGENT (reply)


    Need to know more about the import format.
    What is the record delimiter and is the description in quotes or anything ?

    d

    ------------
    lilly at 11/16/00 1:42:57 AM



    Hi Every one.

    I have a text file (BEA.Txt) which contains the description of the products. I have the product table as below

    Product_Code VarChar(3)
    Description Text

    I need to add the text from text file BEA.TXT into product table for Product_code = BEA.

    DTS DOS NOT WORK !!!. IT ADDS SEVERAL RECORDS TO PRODUCT TABLE. IT CONSIDERS EACH CARRIAGE RETURN AS NEW RECORD IT DOES NOT HELP MEARLY

    Please help me
    Thanks
    Lilly

  3. #3
    lilly Guest

    TO ALL SQL gurus TEXT FILE IMPORT VERY VERY URGENT (reply)

    I need to import the whole file into one text field.


    ------------
    Duncan Maddox at 11/16/00 4:49:02 AM


    Need to know more about the import format.
    What is the record delimiter and is the description in quotes or anything ?

    d

    ------------
    lilly at 11/16/00 1:42:57 AM



    Hi Every one.

    I have a text file (BEA.Txt) which contains the description of the products. I have the product table as below

    Product_Code VarChar(3)
    Description Text

    I need to add the text from text file BEA.TXT into product table for Product_code = BEA.

    DTS DOS NOT WORK !!!. IT ADDS SEVERAL RECORDS TO PRODUCT TABLE. IT CONSIDERS EACH CARRIAGE RETURN AS NEW RECORD IT DOES NOT HELP MEARLY

    Please help me
    Thanks
    Lilly

  4. #4
    Duncan Maddox Guest

    TO ALL SQL gurus TEXT FILE IMPORT VERY VERY URGENT (reply)


    Sorry obviously my question wasnt clear.

    DTS can possibly import the file, but you need to know the format of the text file BEA.txt.

    DTS defaults to assuming that a CR/LF delimits the end of a record, which is why it is adding multiple records for descriptions. To import it correctly you need to know whether there is a row delimiter, or whether the description is fixed length or whether the description has quotes around it.

    If you arent sure, feel free to email me with the first few records from the text file !

    d

    ------------
    lilly at 11/16/00 6:12:29 AM

    I need to import the whole file into one text field.


    ------------
    Duncan Maddox at 11/16/00 4:49:02 AM


    Need to know more about the import format.
    What is the record delimiter and is the description in quotes or anything ?

    d

    ------------
    lilly at 11/16/00 1:42:57 AM



    Hi Every one.

    I have a text file (BEA.Txt) which contains the description of the products. I have the product table as below

    Product_Code VarChar(3)
    Description Text

    I need to add the text from text file BEA.TXT into product table for Product_code = BEA.

    DTS DOS NOT WORK !!!. IT ADDS SEVERAL RECORDS TO PRODUCT TABLE. IT CONSIDERS EACH CARRIAGE RETURN AS NEW RECORD IT DOES NOT HELP MEARLY

    Please help me
    Thanks
    Lilly

  5. #5
    PD Guest

    TO ALL SQL gurus TEXT FILE IMPORT VERY VERY URGENT (reply)

    The first few lines of your text file can help in helping you out transferriing the data.if you can do it - may be i will help you out.



    ------------
    Duncan Maddox at 11/16/00 6:23:11 AM


    Sorry obviously my question wasnt clear.

    DTS can possibly import the file, but you need to know the format of the text file BEA.txt.

    DTS defaults to assuming that a CR/LF delimits the end of a record, which is why it is adding multiple records for descriptions. To import it correctly you need to know whether there is a row delimiter, or whether the description is fixed length or whether the description has quotes around it.

    If you arent sure, feel free to email me with the first few records from the text file !

    d

    ------------
    lilly at 11/16/00 6:12:29 AM

    I need to import the whole file into one text field.


    ------------
    Duncan Maddox at 11/16/00 4:49:02 AM


    Need to know more about the import format.
    What is the record delimiter and is the description in quotes or anything ?

    d

    ------------
    lilly at 11/16/00 1:42:57 AM



    Hi Every one.

    I have a text file (BEA.Txt) which contains the description of the products. I have the product table as below

    Product_Code VarChar(3)
    Description Text

    I need to add the text from text file BEA.TXT into product table for Product_code = BEA.

    DTS DOS NOT WORK !!!. IT ADDS SEVERAL RECORDS TO PRODUCT TABLE. IT CONSIDERS EACH CARRIAGE RETURN AS NEW RECORD IT DOES NOT HELP MEARLY

    Please help me
    Thanks
    Lilly

  6. #6
    ganesh Guest

    TO ALL SQL gurus TEXT FILE IMPORT VERY VERY URGENT (reply)

    From what I follow, you have a SQL server table with the first coulmn having product data and a text flile which has the description data.

    If this is the istuation please follow the following steps.

    1. From SQL Server, DTS the BEA info into a excel sheet.

    2. Convert the text in description to an excel file.

    3. Now, merge the excel such that you have a sheet with two coulmns as per the data you want to look at code in column 1, desc in column2

    4. DTS the data into the ystem from excel to SQL server. Take care to edit the SQL of the DTS so that the field datatypes are the datatypes you are looking at.




    ------------
    PD at 11/16/00 11:01:55 AM

    The first few lines of your text file can help in helping you out transferriing the data.if you can do it - may be i will help you out.



    ------------
    Duncan Maddox at 11/16/00 6:23:11 AM


    Sorry obviously my question wasnt clear.

    DTS can possibly import the file, but you need to know the format of the text file BEA.txt.

    DTS defaults to assuming that a CR/LF delimits the end of a record, which is why it is adding multiple records for descriptions. To import it correctly you need to know whether there is a row delimiter, or whether the description is fixed length or whether the description has quotes around it.

    If you arent sure, feel free to email me with the first few records from the text file !

    d

    ------------
    lilly at 11/16/00 6:12:29 AM

    I need to import the whole file into one text field.


    ------------
    Duncan Maddox at 11/16/00 4:49:02 AM


    Need to know more about the import format.
    What is the record delimiter and is the description in quotes or anything ?

    d

    ------------
    lilly at 11/16/00 1:42:57 AM



    Hi Every one.

    I have a text file (BEA.Txt) which contains the description of the products. I have the product table as below

    Product_Code VarChar(3)
    Description Text

    I need to add the text from text file BEA.TXT into product table for Product_code = BEA.

    DTS DOS NOT WORK !!!. IT ADDS SEVERAL RECORDS TO PRODUCT TABLE. IT CONSIDERS EACH CARRIAGE RETURN AS NEW RECORD IT DOES NOT HELP MEARLY

    Please help me
    Thanks
    Lilly

  7. #7
    lilly Guest

    TO ALL SQL gurus TEXT FILE IMPORT VERY VERY URGENT (reply)

    None of the solutions worked. Some one pls help

    Assume that you are having the autoexec.bat (just a Ascii text file) which should gointo only one filed (type text)

    Thanks
    lilly


    ------------
    ganesh at 11/16/00 11:15:28 AM

    From what I follow, you have a SQL server table with the first coulmn having product data and a text flile which has the description data.

    If this is the istuation please follow the following steps.

    1. From SQL Server, DTS the BEA info into a excel sheet.

    2. Convert the text in description to an excel file.

    3. Now, merge the excel such that you have a sheet with two coulmns as per the data you want to look at code in column 1, desc in column2

    4. DTS the data into the ystem from excel to SQL server. Take care to edit the SQL of the DTS so that the field datatypes are the datatypes you are looking at.




    ------------
    PD at 11/16/00 11:01:55 AM

    The first few lines of your text file can help in helping you out transferriing the data.if you can do it - may be i will help you out.



    ------------
    Duncan Maddox at 11/16/00 6:23:11 AM


    Sorry obviously my question wasnt clear.

    DTS can possibly import the file, but you need to know the format of the text file BEA.txt.

    DTS defaults to assuming that a CR/LF delimits the end of a record, which is why it is adding multiple records for descriptions. To import it correctly you need to know whether there is a row delimiter, or whether the description is fixed length or whether the description has quotes around it.

    If you arent sure, feel free to email me with the first few records from the text file !

    d

    ------------
    lilly at 11/16/00 6:12:29 AM

    I need to import the whole file into one text field.


    ------------
    Duncan Maddox at 11/16/00 4:49:02 AM


    Need to know more about the import format.
    What is the record delimiter and is the description in quotes or anything ?

    d

    ------------
    lilly at 11/16/00 1:42:57 AM



    Hi Every one.

    I have a text file (BEA.Txt) which contains the description of the products. I have the product table as below

    Product_Code VarChar(3)
    Description Text

    I need to add the text from text file BEA.TXT into product table for Product_code = BEA.

    DTS DOS NOT WORK !!!. IT ADDS SEVERAL RECORDS TO PRODUCT TABLE. IT CONSIDERS EACH CARRIAGE RETURN AS NEW RECORD IT DOES NOT HELP MEARLY

    Please help me
    Thanks
    Lilly

  8. #8
    PD Guest

    TO ALL SQL gurus TEXT FILE IMPORT VERY VERY URGENT (reply)

    DTS is a better way to do this.I do not know what carraiage return you are using.if you select the right one - DTS should be able to do it.
    how your text file looks like?


    ------------
    lilly at 11/16/00 6:12:29 AM

    I need to import the whole file into one text field.


    ------------
    Duncan Maddox at 11/16/00 4:49:02 AM


    Need to know more about the import format.
    What is the record delimiter and is the description in quotes or anything ?

    d

    ------------
    lilly at 11/16/00 1:42:57 AM



    Hi Every one.

    I have a text file (BEA.Txt) which contains the description of the products. I have the product table as below

    Product_Code VarChar(3)
    Description Text

    I need to add the text from text file BEA.TXT into product table for Product_code = BEA.

    DTS DOS NOT WORK !!!. IT ADDS SEVERAL RECORDS TO PRODUCT TABLE. IT CONSIDERS EACH CARRIAGE RETURN AS NEW RECORD IT DOES NOT HELP MEARLY

    Please help me
    Thanks
    Lilly

  9. #9
    Sumit Guest

    TO ALL SQL gurus TEXT FILE IMPORT VERY VERY URGENT (reply)

    If you want to store the text from your text file into a TEXT Datatype field in your table then perhaps you should try the Writetext statement.


    ------------
    lilly at 11/16/00 1:42:57 AM



    Hi Every one.

    I have a text file (BEA.Txt) which contains the description of the products. I have the product table as below

    Product_Code VarChar(3)
    Description Text

    I need to add the text from text file BEA.TXT into product table for Product_code = BEA.

    DTS DOS NOT WORK !!!. IT ADDS SEVERAL RECORDS TO PRODUCT TABLE. IT CONSIDERS EACH CARRIAGE RETURN AS NEW RECORD IT DOES NOT HELP MEARLY

    Please help me
    Thanks
    Lilly

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •