我想将此代码用于 php。是否可以将此代码转换为 PHP?
数据库:ODBC
- 提前致谢
USE [ECPNWEB]
GO
/****** Object: Table [dbo].[tblMCWD] Script Date: 11/16/2012 14:42:12 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[tblMCWD](
[ID] [numeric](18, 0) IDENTITY(1,1) NOT NULL,
[ConsumerCode] [varchar](15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ConsumerName] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[BillingPeriod] [datetime] NULL,
[AccountStatus] [nchar](1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[AccountNumber] [varchar](30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[DueDate] [datetime] NULL,
[CurrentBill] [float] NULL,
[PreviousBill] [float] NULL,
[TotalDiscount] [float] NULL,
[TotalGrossAmountDue] [float] NULL,
CONSTRAINT [PK_tblMCWD]
PRIMARY KEY CLUSTERED ([ID] ASC)
WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY])
ON [PRIMARY]
GO
BULK INSERT tblmcwd
FROM 'c:\tblmcwd.txt'
WITH (
FIELDTERMINATOR = '|',
ROWTERMINATOR = '\n'
)
GO
/* Check the content of the table. */
SELECT *
FROM tblmcwd
GO
/* Drop the table to clean up database. */
DROP TABLE tblmcwd
GO