I have this sql that comes from the debug screen... where it fails in
code. [Microsoft][ODBC SQL Server Driver][SQL Server] 'First' is not
a recognized function name. I had this running on another machine
where it did not question the syntax.
INSERT INTO developer_tblQualitySurvey ( Company, Job_Num, QS_Date,
First_Name, Customer_Number, Email, Job_Num_Count ) SELECT
Customers.Company, First(tblJobs.Job_Num) AS FirstOfJob_Num,
First(#12/24/2007#) AS Expr1, Customers.[First Name], Customers.
[Customer Number], Customers.Email, Count(tblJobs.Job_Num) AS
CountOfJob_Num FROM Customers INNER JOIN tblJobs ON Customers.
[Customer Number] = tblJobs.[Customer Number] Where
(((tblJobs.Confirmed)='Yes') AND ((tblJobs.StrikeCall) #12/17/2007#
And (tblJobs.StrikeCall) <= #12/24/2007#)) GROUP BY Customers.Company,
Customers.[First Name], Customers.[Customer Number], Customers.Email
HAVING(((Customers.EMail) Is Not Null)) WITH OWNERACCESS OPTION;
When I paste it into a query window it runs fine. Any ideas? Does
the query window parse it differently for SQLServer?
developer_tblQualitySurvey is attached SQLServer table and tblJobs and
Customers are attached Jet tables.
Thanks, Preston 2 1518
On Mon, 14 Jan 2008 12:58:16 -0800 (PST), pm********@gmail.com wrote:
It appears the statement is passed to SQL Server for evaluation, and
as you may know T-SQL does not know about First as an aggregate
function. Try rewriting using the Min function.
SQL Server also does not know about WITH OWNERACCESS OPTION.
-Tom.
>I have this sql that comes from the debug screen... where it fails in code. [Microsoft][ODBC SQL Server Driver][SQL Server] 'First' is not a recognized function name. I had this running on another machine where it did not question the syntax.
INSERT INTO developer_tblQualitySurvey ( Company, Job_Num, QS_Date, First_Name, Customer_Number, Email, Job_Num_Count ) SELECT Customers.Company, First(tblJobs.Job_Num) AS FirstOfJob_Num, First(#12/24/2007#) AS Expr1, Customers.[First Name], Customers. [Customer Number], Customers.Email, Count(tblJobs.Job_Num) AS CountOfJob_Num FROM Customers INNER JOIN tblJobs ON Customers. [Customer Number] = tblJobs.[Customer Number] Where (((tblJobs.Confirmed)='Yes') AND ((tblJobs.StrikeCall) #12/17/2007# And (tblJobs.StrikeCall) <= #12/24/2007#)) GROUP BY Customers.Company, Customers.[First Name], Customers.[Customer Number], Customers.Email HAVING(((Customers.EMail) Is Not Null)) WITH OWNERACCESS OPTION;
When I paste it into a query window it runs fine. Any ideas? Does the query window parse it differently for SQLServer? developer_tblQualitySurvey is attached SQLServer table and tblJobs and Customers are attached Jet tables.
Thanks, Preston
On Jan 14, 10:13*pm, Tom van Stiphout <no.spam.tom7...@cox.netwrote:
On Mon, 14 Jan 2008 12:58:16 -0800 (PST), pmacdid...@gmail.com wrote:
Ok, so i dumped the first and replaced with Min. Also deleted with
owner access. That helped. Thanks
Now the problem is with the # in the dates. Are there some other
drivers to use that will parse the query before it gets to the SQL
server.
As I mentioned this was running ok on Access 2007, it is now in Access
XP, where it does not work.
-Preston This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: M.L. |
last post by:
Hi. I visit a favorite real estate web site using IE6 but can't get a
js function on it to work at home. It works fine on the job. At home I
placed the site into my Trusted Zone and allow or prompt...
|
by: ms |
last post by:
Why does this select query return the correct records but when I make it a
delete query I get a msgbox with "Could not delete from specified
tables".
SELECT BMIDLog.*
FROM stageBMIDLog INNER...
|
by: SuffrinMick |
last post by:
Hello - I'm a newbie to coding!
I'm working on an access 2000 database which has three tables:
tblContacts - A list of customer contacts.
tblOrgTypes - A list of organisational types....
|
by: johnsonholding |
last post by:
Here is the code for a pop-up window that works in Firefox and not in
IE - I get a java error or something,
Here is the code :
</script>
<SCRIPT language="JavaScript"...
|
by: splever |
last post by:
I have a update query which updates correctly in the query window, but
not when executed in vba.
The VBA is
======================================================
strSQL = "UPDATE " & _...
|
by: Paul H |
last post by:
I seem to end up with loads of append and update queries just because it's
quick and easy to build queries or make a new ones based on an existing
query. But I end up with loads of queries with...
|
by: lmawler |
last post by:
Hi,
I am executing sql from VB to populate a form... (I'm building a search, so my code takes what the user inputs, queries the database, and then populates a table, to which the fields on my form...
|
by: deppeler |
last post by:
How do I reload a parent window that is part of a cgi script that has a query string?
I have a script that shows a record with images uploaded into a DB.
I have an image upload script (child...
|
by: vljones |
last post by:
I am either having an extended blond moment or have been looking at this too long. This is a basic question but I simply cannot get my head around the solution.
I have a Search form with grouped...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| | |