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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / SQL Connector - Get Ro...
Power Automate
Unanswered

SQL Connector - Get Rows Filter error

(0) ShareShare
ReportReport
Posted on by 41

Hi I'm getting a SQL row of exchange rate date and filtering by certain rates and where the createdOn is today. 

 

I can get it to work aside from the today filter. This is my filter expression:

TransactionCurrencyIdName eq 'US Dollar' or TransactionCurrencyIdName eq 'Australian Dollar' or TransactionCurrencyIdName eq 'Euro' or TransactionCurrencyIdName eq 'South African Rand' and CreatedOn eq @{formatDateTime(utcNow(),'yyyy/MM/ddT00:00:00Z')}

This is the error
An identifier was expected at position 202.
inner exception: An identifier was expected at position 202.

I can only assume tis is related to the data format/now expression can anyone please advise?

The CreatedOn data is in ISO 8601 - 

"CreatedOn":"2016-10-25T07:46:03Z"
Categories:
I have the same question (0)
  • lbendlin Profile Picture
    8,474 Super User 2025 Season 2 on at

    Your filter logic is flawed. You need to protect the OR filters from the AND filter.

     

    Is this an on prem SQL or Azure SQL?

  • Johnnyoc Profile Picture
    41 on at

    Ah many thanks. This is the onprem connector.

  • lbendlin Profile Picture
    8,474 Super User 2025 Season 2 on at
    TransactionCurrencyIdName eq 'US Dollar' and CreatedOn eq '@{formatDateTime(utcNow(),'yyyy-MM-dd')}'
    or TransactionCurrencyIdName eq 'Australian Dollar' and CreatedOn eq '@{formatDateTime(utcNow(),'yyyy-MM-dd')}'
    or TransactionCurrencyIdName eq 'Euro' and CreatedOn eq '@{formatDateTime(utcNow(),'yyyy-MM-dd')}'
    or TransactionCurrencyIdName eq 'South African Rand' and CreatedOn eq '@{formatDateTime(utcNow(),'yyyy-MM-dd')}'
    
  • Johnnyoc Profile Picture
    41 on at

    Hi @lbendlin this doesn't error but returns no values. Which it should. Any other ideas?

  • lbendlin Profile Picture
    8,474 Super User 2025 Season 2 on at

    please provide some sample data that covers all these scenarios.

  • Johnnyoc Profile Picture
    41 on at

    The filters work aside from the dates. The date in the data is 

    "CreatedOn": "2024-05-09T06:00:08Z"

     

    I've tried filters using both the below that returns nothing using a static date and expression:
    CreatedOn eq '2024-05-09T06:00:08Z'

    utcnow('yyyy-MM-dd')

  • lbendlin Profile Picture
    8,474 Super User 2025 Season 2 on at

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard