INSERT INTO DBNAME.DBO.PRODUCTS (PROD_ID,PRODUCTNAME,UNIT,UNITPRICE,ACTIVE)
SELECT '9','PRODUCT6','1000','12.25','1'
UNION ALL
SELECT '10','PRODUCT7','1000','12.13','1'
UNION ALL
SELECT '11','PRODUCT8','1000','12.14','1'
UNION ALL
SELECT '12','PRODUCT9','1000','12.11','1'
UNION ALL
SELECT '13','PRODUCT10','1000','12.10','1'
-------------------------------------------------------------
BULK
INSERT DBNAME.DBO.PRODUCTS
FROM 'E:\INSERT.TXT'
WITH
(
FIELDTERMINATOR=',',
ROWTERMINATOR='\n'
)
BULK
INSERT DBNAME.DBO.PRODUCTS
FROM 'E:\INSERT.CSV'
WITH
(
FIELDTERMINATOR=',',
ROWTERMINATOR='\n'
)
GO
No comments:
Post a Comment