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 Platform Community / Forums / Power Automate / Unable to pass column ...
Power Automate
Answered

Unable to pass column name which has space in between in SQL Query

(0) ShareShare
ReportReport
Posted on by 23

Hi,

I am trying to write a query in Execute SQL statement activity by specifying a column name.

The problem which I am facing now is, since the column name has space, it is not considering as Column name.

Could you please help me to know how I can pass Column value into the Query to consider it.

I tried covering it with Single, Double quotations but unfortunately it didn't worked as expected.

 

SQL_Query_error_PAD.png
  • Verified answer
    UshaJyothiKasibhotla Profile Picture
    229 Moderator on at

    Hi @Dileep_Dili 

    Column name should be given inside []

    Try as shown in below image

    UshaJyothi20_0-1706341746230.png

    please get back to me if you face any issue again.

     

    Hope this helps

    Usha.

     

     

  • Dileep_Dili Profile Picture
    23 on at

    Hi Usha,

    Thank you so much, It worked as expected.

    I am facing challenge in writing this Query result into excel back with headers. Do you have any suggestions.

    Thanks in Advance.

  • UshaJyothiKasibhotla Profile Picture
    229 Moderator on at

    Hi @Dileep_Dili 

    Use write to excel sheet activity 

    Write value give the query result 

    Column A

    Row 1

     

    Hope this helps 

    Usha

  • Dileep_Dili Profile Picture
    23 on at

    Hi @UshaJyothi20 

    I tried write excel sheet activity, but this is not writing headers while writing to new sheet or excel file.

    Any other suggestions to add headers while writing the result back.

    Thanks in Advance.

  • UshaJyothiKasibhotla Profile Picture
    229 Moderator on at

    Create a data table with headers and then append the datatable with your data to headers 

    And you can create headers manually 

    And write to 3xcel from 

    Column A 

    Row 2

    Hope this helps 

    Usha

     

     

  • Amritesh Profile Picture
    10 on at

    image.png

    It is not working for me 
    Can someone please help ?

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

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 426

#2
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard