Jump to content
Server Maintenance This Week. ×

ODBC Excel Connection- read FM record based on Matching Cell


This topic is 2701 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I am using Excel 365 on desktop and FileMaker Pro Advanced 15 with FileMaker Server. 

I am able to connect to FileMaker from Excel using ODBC to read all records in a table or matching it to a hard coded name. Sample:

Select work FROM "Student Time Import" WHERE badgename="Patrick Dollar"

What I'd like to do is add a where clause where it selects hours worked based on the date in the Excel spreadsheet. The cell's date is B12 and so on.  I know my syntax is wrong, but after several attempts, I haven't been able to solve it. Here is my syntax:

Select work FROM "Student Time Import" WHERE badgename="Patrick Dollar" and date = TimeSHeet(Select * FROM[SHRA Temp Timesheet.Range("B12).Value])

Thanks.

 

Link to comment
Share on other sites

This is more an excel question than a FM question so you may be better off asking this on an excel forum; every environment has its own specific way of constructing the SQL query.

One quick  note though: you have a field named "date".  That's a reserved SQL keyword and also the name for a datatype in most environments so try to avoid that name.  At the very least you will have to quote the name in your sql query.

  • Like 1
Link to comment
Share on other sites

This topic is 2701 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.