Skip to main content

Notifications

Power Automate - General Discussion
Unanswered

SQL statement unrecognized keyword WHEN

(1) ShareShare
ReportReport
Posted on by 2

While using SQL execute  with Case Statement, The keyword WHEN is not recognizing. The Below Error is coming

"SQL statement unrecognized keyword WHEN"

 

The SQL query as given below

 

SELECT [Material],[Value Unrestricted]
case 
 when  [Material]>0 then 'h1'
end as Valuation
         
FROM [Sheet1$]

 

  • FLMike Profile Picture
    FLMike 31,580 on at
    Re: SQL statement unrecognized keyword WHEN

    Hi @kkreddy 

     

    In that result should it be "H1" I cannot remember and wonder if thats it.

     

    I haven't specifically tried to use When through Power Automate Desktop, and wonder what type of connection are you using to open Excel (ODBC?? ADO.NET? JET??)


    If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

  • kkreddy Profile Picture
    kkreddy 2 on at
    Re: SQL statement unrecognized keyword WHEN

    Hi Michael Gernaey,

    I am trying to use SQL against an excel in Power automate desktop.

    kkreddy_0-1720894360255.png

     

    kkreddy_1-1720894765012.png

     

  • FLMike Profile Picture
    FLMike 31,580 on at
    Re: SQL statement unrecognized keyword WHEN

    @kkreddy 

    Please provide pictures, so we can see and understand what you are doing. Are you trying to use SQL against an Excel Sheet? What are you doing?


    If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,666

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,996

Leaderboard