Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Importing Data

Author  Topic 

jcb267
Constraint Violating Yak Guru

291 Posts

Posted - 2009-04-24 : 21:22:20
I have been trying for a couple of weeks (on and off) to get data imported to a table that I created. Part of the problem is that I cannot spend enough time on this to get it figured out......

I have tried using the procedure below:

USE [Hospital_Compare];
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE importcsvfile
AS
BULK INSERT dbo.HQI_FTNT FROM 'C:\Users\John & Tanya\Documents\John\Hospital Compare\ Hospital_flatfiles\dbo_vwHQI_FTNT.csv'

WITH
(DATAFILETYPE = 'char',
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n');

GO

This does not populate the table though. Can anyone help me with this? I am not sure why? I am using SQL 2008 and Vista.

Thanks,

JB

robvolk
Most Valuable Yak

15732 Posts

Posted - 2009-04-24 : 21:52:22
Do you get an error message? If so, please post it.
Go to Top of Page

jcb267
Constraint Violating Yak Guru

291 Posts

Posted - 2009-04-24 : 22:19:35
quote:
Originally posted by robvolk

Do you get an error message? If so, please post it.



No that is what is strange. I get a message that the command was successful but when I go look, there is nothing there?
Go to Top of Page
   

- Advertisement -