A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

MID function fails in SQL



 
 
Thread Tools Display Modes
  #1  
Old March 1st, 2010, 08:25 PM posted to microsoft.public.access
WildlyHarry
external usenet poster
 
Posts: 112
Default MID function fails in SQL

I have a database that I use to capture records and create tables by date.
The current setup has 31 make table queries that are chosen by VBA code based
on the day of the month. I have decided to streamline my process and pass
sql language into a make table that creates a table with the correct name.
Part of this query relies on the "Mid" function to help parse some data in
certain fields. I created a separate database to do the development of
moving from 31 static queries to 1 query with variable sql passed from a
form. Now my new database gives me an error and states that 'Mid' is not
recognized as a built-in function. But the mid function works in the old
database. Any idea why it fails in one and works in the other? I checked
the "References" and they both have the same libraries selected. Thank you
in advance for you help.
  #2  
Old March 1st, 2010, 09:06 PM posted to microsoft.public.access
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default MID function fails in SQL

Are you saying that you use a separate table for each "day-of-the-month"?

If so, both you and Access are having to work overtime to overcome your ...
spreadsheets!

In a well-normalized relational database, it isn't necessary to have one
table per day (or week, or month, or year). In fact, to get the best use of
Access' relationally-oriented features and functions, you DON'T want your
data structured like that.

You can keep coming up with work arounds, or you can spend a bit of time
getting your data into a structure that lets Access really work ... you'll
pay now or pay later g.

Good luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"WildlyHarry" wrote in message
...
I have a database that I use to capture records and create tables by date.
The current setup has 31 make table queries that are chosen by VBA code
based
on the day of the month. I have decided to streamline my process and pass
sql language into a make table that creates a table with the correct name.
Part of this query relies on the "Mid" function to help parse some data in
certain fields. I created a separate database to do the development of
moving from 31 static queries to 1 query with variable sql passed from a
form. Now my new database gives me an error and states that 'Mid' is not
recognized as a built-in function. But the mid function works in the old
database. Any idea why it fails in one and works in the other? I checked
the "References" and they both have the same libraries selected. Thank
you
in advance for you help.



  #3  
Old March 13th, 2010, 05:56 PM posted to microsoft.public.access
De Jager
external usenet poster
 
Posts: 393
Default MID function fails in SQL


"WildlyHarry" wrote in message
...
I have a database that I use to capture records and create tables by date.
The current setup has 31 make table queries that are chosen by VBA code
based
on the day of the month. I have decided to streamline my process and pass
sql language into a make table that creates a table with the correct name.
Part of this query relies on the "Mid" function to help parse some data in
certain fields. I created a separate database to do the development of
moving from 31 static queries to 1 query with variable sql passed from a
form. Now my new database gives me an error and states that 'Mid' is not
recognized as a built-in function. But the mid function works in the old
database. Any idea why it fails in one and works in the other? I checked
the "References" and they both have the same libraries selected. Thank
you
in advance for you help.


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:31 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.