web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate
Answered

BULK INSERT error SQL

(0) ShareShare
ReportReport
Posted on by 42

I need to import an CSV File into SQL.

The following BULK sql query works fine in ssms.

It always fails when I try to run it in Power Automate.

Power automate creates my "bildlitste" table and my other sql code works fine in power automate.

 

Only the BULK INSERT gets me an error. Rest of sql code works fine

 

Here is my sql code:

 

BULK INSERT bildliste
FROM 'C:\Users\Administrator\Downloads\bilderliste.csv'
WITH
(
   FIRSTROW = 2, -- as 1st one is header
   FIELDTERMINATOR = ',', --CSV field delimiter
   ROWTERMINATOR = '\n', --Use to shift the control to next row
    TABLOCK
)

 

Error:

Error in SQL statement Cannot bulk load becaue the file "C:\Users\Administrator\Downloads\bilderliste.csv" could not be opened. Operating system error12232132321213123123132312213.JPG

 

Thank you for your help!

I have the same question (0)
  • Verified answer
    VJR Profile Picture
    7,635 on at

    Hi @10101 

     

    I'm not sure but can you try removing the comments from the query just in case it is not interpreting them properly (eg; -- as 1st one is header).

     

    Also if you can do some web search on the error message that can give you some direction.

    https://stackoverflow.com/questions/19491812/cannot-bulk-load-because-the-file-could-not-be-opened-operating-system-error-co

     

    https://sqlbak.com/blog/cannot-bulk-load-because-the-file-could-not-be-opened-operating-system-error-code-5-access-is-denied

     

    https://stackoverflow.com/questions/14555262/cannot-bulk-load-operating-system-error-code-5-access-is-denied

     

     

  • takolota1 Profile Picture
    4,980 Moderator on at

    Anyone having trouble with this can also try this batch SQL CRUD template:

    https://powerusers.microsoft.com/t5/Power-Automate-Cookbook/SQL-Batch-Create-Read-Update-and-Delete/td-p/1715338

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 167

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard