BCP Error

  • Help!

    Simple question about a bcp I am running, but got an error message.

    Sample bcp:

    BCP 'DBsta..vWeb_Tab_Date' out 'StatusReportDate.txt' -c -S'Mickey' -U'DonaldDuck' -P'Daisy'

    DBsta = DB name

    vWeb_Tab_Date = View name

    StatusReportDate.txt = text file

    Mickey = server for test purposes

    donalduck = test user

    daisy = test password

    What it does is: It grabs my view "vweb_tab_date" and creates the text file "statusreportdate.txt"

    So far no problem, but when I run it I am getting the following error

    "Cannot use the OUTPUT option when passing a constant to a stored procedure."

    I know is Friday and my brain is fried, but I really need some help as soon as possible, please. Any suggestions of what I am doing wrong? Thanks

  • Ok this looks right but I think it may be the ' instead of none or ". I have never seen it with a '. Try these

    BCP DBsta..vWeb_Tab_Date out StatusReportDate.txt -c -SMickey -UDonaldDuck -PDaisy

    or

    BCP "DBsta..vWeb_Tab_Date" out "StatusReportDate.txt" -c -S"Mickey" -U"DonaldDuck" -P"Daisy"

    Let us know.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

  • Wait I think I remember why I never see ' but it does normally work.

    SQL considers ' as a text delimiter for lack of a better term. I think what is occurring if what I give you works is it is viewing out as similar to a constanct variable that is being concatinated in, instead of being a parameter. Again let us know.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

  • Thanks, I will give it a try and let you know.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply