Viewing 15 posts - 211 through 225 (of 290 total)
Ahhhh. SQL Injection at it's finest!
Take a look here:
Thanks for the links. I read them over. This raises some questions and I need to better understand this. ...
February 3, 2022 at 5:11 pm
I used powershell to create a script that prepares the files for bulk insert. it ensures that the columns match with the destination table. works beautifully.
February 3, 2022 at 3:26 pm
SQL Server does not all "FROM @FILENAME", only "FROM 'data_file_name'". Google the syntax of the command.
You'll need to use dynamic SQL if you want to feed in...
February 3, 2022 at 3:24 pm
SQL Server does not all "FROM @FILENAME", only "FROM 'data_file_name'". Google the syntax of the command.
You'll need to use dynamic SQL if you want to feed in a FROM...
February 3, 2022 at 5:18 am
the bulk insert options you used were just a sample - you needed to adjust to your own needs.
you also can't have extra columns on the destination table -...
February 2, 2022 at 9:50 pm
There is one extra column in the table that is not found in the csv but I was able to import the file using Import Data wizard. I also removed...
February 2, 2022 at 4:26 pm
script to create table:
/****** Object: Table [dbo].[TableTemp] Script Date: 2022-02-02 8:09:25 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TableTemp](
[UNDERLYING_SYMBOL] [nvarchar](10) NOT NULL,
[QUOTE_DATE] [date]...
February 2, 2022 at 4:24 pm
can you give us a sample file?
No problem.
February 2, 2022 at 4:23 pm
Hi
I fixed one error.
WITH (FORMAT = 'CSV', FIRSTROW = 2, FIELDQUOTE = '\', FIELDTERMINATOR = ',', ROWTERMINATOR = '\r\n');
Now, I am getting this error:
Msg 7301, Level 16,...
February 2, 2022 at 4:12 am
Hi
Thanks for the reply. It still doesn't work:
USE MyDB
GO
BULK INSERT dbo.TableTemp
FROM 'C:\Users\Me\File.csv'
WITH (FORMAT = 'CSV', FIRSTROW = 2, FIELDQUOTE = '\', FIELDTERMINATOR = ';', ROWTERMINATOR = '\r\n');
February 2, 2022 at 3:20 am
issue resolved. please ignore post.
January 29, 2022 at 11:11 pm
Google is your friend
I rely very heavily on Google for sure. I find that it is a good tool but it doesn't replace guidance from people who...
January 29, 2022 at 6:29 pm
Curious - why do you need to create a script task and execute a SQL query in that script task? If this is a one-time call to get/set some...
January 29, 2022 at 6:27 pm
Viewing 15 posts - 211 through 225 (of 290 total)