Results 1 to 4 of 4
  1. #1
    Join Date
    May 2002
    Location
    Zaragoza (Spain)
    Posts
    2

    Unanswered: How can I read/create a file from t-sql?

    I need to create/read files from t-sql? Does anyone know how can I do it?

    Thanks

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    bcp?

    bulk insert?

    DTS?

    You probably mean as device the you read sequentially through...

    Nope, and you wouldn't want to.
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  3. #3
    Join Date
    May 2002
    Location
    Zaragoza (Spain)
    Posts
    2
    Thanks Brett. I know the tools you suggested me, but I think they canít help me so much.

    What I need to do is process the information. The scenario is: I have two dbs one exporting data, A, and the other, B, importing them, communication is not assured, and moreover, depending on the incoming data and data on B db, I should update records on B or insert them, so, I think, I canít use bcp or bulk insert.

    I have been working with oracle and pl-sql has system defined functions and procedures to access files from stored functions or procedures. I have look for the equivalent functions/procedures on T-sql and I havenít found any information, donít they exist?

    If they donít exist I want to know if I can program DTS task to read data from files and process them.

    Thanks in advance

  4. #4
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    You basically want to do delta processing right?

    If it's in A and not in B, add to b
    If it's in A and in B, update B
    If it's not in A and in B delete B..

    something like that?

    I would just compare the tables...

    have a look

    Delta Process
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

Posting Permissions

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