ODBC error?

chriss1519

New Member
Joined
Feb 10, 2004
Messages
40
I am running a query off an ODBC datasource. One field in the query is a formula which extracts the year out of a julian date (the formula is: mid(juldate,3,1)). I also set up a criteria for this field, where I want it to select only records for 2004. When I try to run this query, I get this message:

ODBC --call failed
OK

When I take the criteria out for this field, so that I am pulling all years, the query works.

Anyone know any work arounds for this, or why this is happening in the first place.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Chris, just wondering -- does mid(juldate,3,1) give you a 4-digit or a 1-digit result? Looks like it would be 1 digit -- then, applying 2004 as a criterion would give you an empty data set.
Try mid(juldate,3,4)

Denis
 
Upvote 0

Forum statistics

Threads
1,221,845
Messages
6,162,350
Members
451,760
Latest member
samue Thon Ajaladin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top