/*
' bcp ' is not an internal or external command, nor is it a running program?
Look at C:Program filesmicrosoft SQL Server80toolsbinn There's no bcp.exe this file
Then take a look at path inside add C:Program filesmicrosoft SQL server80toolsbinn This directory does not.
Right-click My Computer--Properties--advanced--environment variables--Find path--Edit in System variables
At the end of the variable value, add:
C:Program FilesMicrosoft SQL Server80toolsbinn
*/
/**********************************************************************
Stored procedure: P_savexml
Function: Generate XML file
Parameters: Table Name
Returns: The XML file for the specified directory
Call method: Pass the table name that exists in the intermediate table tb_tablecolumn_t
exec p_zehuasavexml ' wq_stinfo_b,wq_phy_d ', ' d:xx.xml '
Last Change Date: 2005-8-17
Contact information: zlp@zehua.com.cn
Note: Generate an XML file that conforms to the standard format according to the intermediate table
Www.knowsky.com
**********************************************************************/
/*
exec p_zehuasavexml ' wq_stinfo_b,wq_phy_d ', ' d:xx.xml '
*/
Go
Create proc P_zehuasavexml
@TableCodeS varchar (8000),
@fname varchar = ' c:mp.xml '--The default saved XML file address
As
declare @sql nvarchar ($), @sql1 varchar (400)
declare @cnt int, @Table_Name varchar (20)
DECLARE @i int, @TableCode varchar (20)
declare @err int, @src varchar (255), @desc varchar (255)
CREATE TABLE # #t (re nvarchar (4000))
Insert # #t
Select Re= ' '
UNION ALL SELECT ' '
Set @i=charindex (', ', @TableCodeS)
While @i>0
Begin
Set @TableCode =left (@TableCodeS, @i-1)
Set @sql = ' '
Set @sql =n ' Select @cnt =count (*), @Table_Name =max (table_name) from '
Set @sql = @sql N ' ('
Set @sql = @sql N ' Select top percent * from tb_tablecolumn_t where '
Set @sql = @sql N ' table_code= "@TableCode" and columns_iskey= "√"
Set @sql = @sql N ' ORDER by Columns_sort '
Set @sql = @sql N ') '
http://www.bkjia.com/PHPjc/631022.html www.bkjia.com true http://www.bkjia.com/PHPjc/631022.html techarticle /* ' bcp ' is not an internal or external command, nor is it a running program? Look at C:Program filesmicrosoft SQL Server80toolsbinn There is no bcp.exe this file and then look at the path inside add ...