我需要将Json数据导出到文本文件中,但它会出错。
EXEC xp_cmdshell 'bcp "SELECT Formdata fldr.FormInstanceDataMap WHERE
FormInstanceID=127432" queryout "D:\Import\Test.txt" -
STMGVM021\deBenefitSync_Web_DEV -T -c -Usa -Psa@123 '
出错。输出
复制方向必须为“in”或“out”。语法错误 'queryout'。用法:bcp [[db_name。] owner。] table_name [:slice_num] [partition pname] {in | out} [filename] [-m maxerrors] [-f formatfile] [-e errfile] [-d discardfileprefix] [-F firstrow] [-L lastrow] [-b batchsize] [-n] [-c] [-t field_terminator] [-r row_terminator] [-U用户名] [-P密码] [-I interfaces_file] [-S 服务器] [-a display_charset] [-z language] [-v] [-i input_file] [-o output_file] [-A数据包大小] [-J客户端字符集] [-T text或 图像大小] [-E] [-g id_start_value] [-N] [-W] [-X] [-M LabelName LabelValue] [-labeled] [-K keytab_file] [-R remote_server_principal] [-C] [-V [security_options]] [-Z security_mechanism] [-Q] [-Y] [-y sybase目录] [-x trusted.txt_file] [--clienterr errfile] [--maxconn maximum_connections] [--show-fi] [--hide-vcc] [--colpasswd [[[db_name。[owner]。] table_name。] column_name [password]]] [--keypasswd [[db_name。[owner]。] key_name [password]]] [ - initstring ASE 初始化字符串] [--quoted-fname] NULL
答案 0 :(得分:0)
我可以在您的查询中找到两处更改。
谢谢, Ananda Kumar J。