Results 1 to 9 of 9
  1. #1
    Join Date
    Mar 2004
    Location
    Mumbai, India
    Posts
    15

    Unanswered: creating file (urgent)

    hi,
    I am trying to create a file using a query in SQL...
    kindly help.
    Thankyou. --- Vijay

  2. #2
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Use OSQL utility to create a file, refer to books online for more information.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  3. #3
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    master..xp_cmdshell 'bcp table out filename...'

    Look it up in Books Online....
    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.

  4. #4
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Using BCP you can export full data from a table, but in case of OSQL you can use a query or set of statements(SP) to output the result.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  5. #5
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Originally posted by Satya
    Using BCP you can export full data from a table, but in case of OSQL you can use a query or set of statements(SP) to output the result.
    Que' pasta?


    QUERYOUT

    CREATE VIEW...
    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.

  6. #6
    Join Date
    Jul 2003
    Location
    The Dark Planet
    Posts
    1,401

    Re: creating file (urgent)

    xp_cmdshell 'echo Hello >> c:\Enigma.txt'
    Get yourself a copy of the The Holy Book

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

  7. #7
    Join Date
    Mar 2004
    Location
    Mumbai, India
    Posts
    15

    Talking Re: creating file (urgent)

    thanxs for the help....it really helped me....I really am very lucky to have found this site and I recommends all my friends join in and do their bit in helping each other out and sharing info. Thankyou again.
    --- Vijay.

  8. #8
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    Uh-oh, my manager just told me...that my job is being outsourced...to an Indian contractor... Is it you, vijayk?

  9. #9
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578

    Re: creating file (urgent)

    Well forums are meant for helping....
    Originally posted by vijayk
    thanxs for the help....it really helped me....I really am very lucky to have found this site and I recommends all my friends join in and do their bit in helping each other out and sharing info. Thankyou again.
    --- Vijay.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

Posting Permissions

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