I'm new to stored procedures and I was creating this one to test out the BULK INSERT sql command. When I execute it says "Command(s) Completed Successfully" but when I open the table there are no records in it. The csv file has two rows in it. The first one is the column names and the second one is the only record in the csv file. So I am looking for one record to show up in my table after executing this but none are being inserted, and I get no errors, any ideas?
Here is my Stored Procedure
Expand|Select|Wrap|Line Numbers
- USE [Website_Administration]
- GO
- /****** Object: StoredProcedure [dbo].[ps_Subscription_Import] Script Date: 01/07/2008 11:55:25 ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER on
- GO
- -- =============================================
- -- Author: Franccesca Baker
- -- Create date: 01/07/2008
- -- Description: Testing Bulk Import
- -- =============================================
- ALTER PROCEDURE [dbo].[ps_Subscription_Import]
- AS
- --Build BULK INSERT Statement
- DECLARE @SQL varchar(2000)
- BEGIN
- SET NOCOUNT ON
- SET @SQL = 'BULK INSERT Subscription_Requests FROM "D:\DATA\Test\TestingBulkImport.csv" WITH (FIELDTERMINATOR = ",") '
- END
- Exec(@SQL)
- GO