Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Retrieving Date field from Oracle using SQL

Featured Replies

I have an Oracle database that I created an ODBC connection with, to pull in all of the records. I want to write a script that will compare the latest record added (based on the date field) and import anything newer than that date.

The date field is set up with the time as well (e.g. 10/13/2005 7:57:17 AM). I cannot seem to get my SQL query to work to compare on this field. I assume that I will need to convert the field somehow? Does anyone know of a query that will work?

Are you using enclosing the date in single quotes?

Use a date field in FileMaker Pro to compare a date field in Oracle. If you are using timestamp in Filemaker then use timestamp field in Oracle. Is the query giving you an error or is it not returning anything? The best way is to execute the same query at sql prompt on oracle and check the results.

  • Author

Are you using enclosing the date in single quotes?

Use a date field in FileMaker Pro to compare a date field in Oracle. If you are using timestamp in Filemaker then use timestamp field in Oracle. Is the query giving you an error or is it not returning anything? The best way is to execute the same query at sql prompt on oracle and check the results.

It is not returning anything. I am using single quotes, here is the query i am using:

"Select * from websearch_log Where LOG_DATE >=" & "'" & websearch_stats::date & "'"

It is a date field in Oracle and a date field in FM, but i guess I am still doing something wrong. I am fairly new to SQL.

Thanks for any help.

Edited by Guest

Are you storing your query in a calculation field?

If yes, place the calculation field on the layout in a browse mode and confirm that the text of the websearch_stats::date is replaced with a date value from the record. I would suggest to run the query at the sql prompt.

I think it should be:

"select * from websearch_log where log_date >='" & websearch_stats::date & "'"

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.