Question

When running this SQL code in Access I get an error saying "Syntax Error in FROM...

When running this SQL code in Access I get an error saying "Syntax Error in FROM Clause"

SELECT SUM(HoursWorked) AS TotalHoursWorked

FROM Property_Service

INNER JOIN Property_Service.EmployeeID = Employee.EmployeeID

WHERE ExperienceLevel <> 'Junior';

I was wondering if someone could help me fox it.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

The error is because you have directly used where ExperienceLevel<>'Junior' whereas it should be tableName.ExperienceLevel<>'Junior' because when we use join to join two tables, we cannot access the table columns directly as the server gets confused which table column the query is refering to. So please use TableName.ExperienceLevel<>'Junior'

Please provide a thumbs up if you like the answer.

Add a comment
Know the answer?
Add Answer to:
When running this SQL code in Access I get an error saying "Syntax Error in FROM...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Hi. Can someone please help me with this SQL question? I asked this before, but someone...

    Hi. Can someone please help me with this SQL question? I asked this before, but someone just cut and pasted a completely incorrect answer that they found online. Please be genuine in your response. Write an SQL statement to show the sum of HoursWorked for each type of OWNER but exclude services of employees who have ExperienceLevel of Junior. OWNER ( OwnerID, OwnerName, OwnerEmail, OwnerType ) PROPERTY_TYPE ( PropertyID, PropertyName, PropertyType, Street, City, State, Zip,OwnerID ) PROPERTY_SERVICE (PropertyServiceID, PropertyID, ServiceID,...

  • SQL help I am using livesql.oracle This is CTE I created for problem 4 SELECT CUST_LAST_NAME,...

    SQL help I am using livesql.oracle This is CTE I created for problem 4 SELECT CUST_LAST_NAME, CUST_EMAIL, ORDER_ID, SUM(QUANTITY) AS QTY FROM (SELECT CUST_LAST_NAME, CUST_EMAIL, ORDERS.ORDER_ID, PRODUCT_ID, QUANTITY FROM OE.CUSTOMERS INNER JOIN OE.ORDERS ON OE.CUSTOMERS.CUSTOMER_ID = OE.ORDERS.CUSTOMER_ID INNER JOIN OE.ORDER_ITEMS ON OE.ORDERS.ORDER_ID = OE.ORDER_ITEMS.ORDER_ID ORDER BY ORDER_ID ASC) CTE GROUP BY CUST_LAST_NAME, CUST_EMAIL, ORDER_ID; 5. Using the CTE named customer_information that you created for the previous problem (problem 4). Add a correlated subquery that also shows the total value of...

  • Subject: Database Notes: Please give me detailed answers so I could learn from this. Thank you....

    Subject: Database Notes: Please give me detailed answers so I could learn from this. Thank you. PS: This is a homework that I already submitted but did not know whether my answer is right or wrong. 2. Weight:15%. Please explain the difference among the following terms: (a) WHERE clause vs HAVING clause in SQL (b) alternate-key vs super-key (c) OUTER JOIN clause ya INNER JOIN

  • Trying to run an sql query in VBA but every time I run the macro I...

    Trying to run an sql query in VBA but every time I run the macro I get an error message stating " Run-time error’- 2147217900 (80040e14)’: ORA-00923: From keyboard not found where expected”. I am a newbie with using queries and am wondering if anyone knows what the problem is with the query I wrote and why I keep getting this error in VBA. Everything in my code works except this query so I know the problem has to be...

  • /* I am executing following SQL statement for the below code but I am getting error....

    /* I am executing following SQL statement for the below code but I am getting error. Pls, upload screenshot after running it. SQL Statement: SELECT OfferNo, CourseNo FROM Offering WHERE OfferTerm = 'Sum' AND OfferYear = 2012 AND FacSSN IS NULL; */ CREATE TABLE STUDENT( StdSSN INT NOT NULL PRIMARY KEY, StdFName VARCHAR2(50), StdLName VARCHAR2(50), StdCity VARCHAR2(50), StdState VARCHAR2(2), StdZip VARCHAR2(10), StdMajor VARCHAR2(15), StdYear VARCHAR2(20) ); CREATE TABLE FACULTY( FacSSN INTEGER NOT NULL PRIMARY KEY, FacFName VARCHAR(50), FacLName VARCHAR(50), FacCity...

  • NEED TO ADD COMMENTS ON WHAT EACH PIECE OF SQL CODE DOES CREATE TABLE Production.ProductAuditTrail (AuditID...

    NEED TO ADD COMMENTS ON WHAT EACH PIECE OF SQL CODE DOES CREATE TABLE Production.ProductAuditTrail (AuditID INT IDENTITY(1,1), AuditDate DATETIME NOT NULL, ChangeUser SYSNAME NOT NULL, ProductID INT NOT NULL, BeforeListPrice MONEY NOT NULL, AfterListPrice MONEY NOT NULL) GO CREATE TRIGGER tu_ProductAuditTrail ON Production.Product FOR UPDATE AS INSERT INTO Production.ProductAuditTrail (AuditDate, ChangeUser, ProductID, BeforeListPrice, AfterListPrice) SELECT GETDATE(), SUSER_SNAME(), i.ProductID, d.ListPrice, i.ListPrice FROM inserted i INNER JOIN deleted d ON i.ProductID = d.ProductID GO SELECT * FROM Production.ProductAuditTrail GO UPDATE Production.Product...

  • MYSQL Applied Database I just want to make sure that the syntax looks okay for my...

    MYSQL Applied Database I just want to make sure that the syntax looks okay for my database SQL statements, any help would be much appreciated: 1.A query that asks for customer star review for Tony Stark on Opportunity Detail. SELECT CONCAT (employee_first_name,' ',employee_last_name) AS                            employee_name, review_star_count, FROM customer_reviews, JOIN e employees ON employee_id =employee_id, WHERE employee_id=4 AND opportunity_id=1; 2.A query that shows how many orders Additional Dot Twain License, in an order totaling over $900. SELECT product_name, COUNT(o.OrderID) AS...

  • I need help fixing this code in C. It keeps giving me an error saying error:...

    I need help fixing this code in C. It keeps giving me an error saying error: ‘O_RDWD’ undeclared (first use in this function) if ((fd = open(fifo, O_RDWD)) < 0) note: each undeclared identifier is reported only once for each function it appears in. Please fix so it compiles properly. //************************************************************************************************************************************************** #include <fcntl.h> #include <stdio.h> #include <errno.h> #include<stdlib.h> #include <string.h> #include<unistd.h> #include <sys/stat.h> #include <sys/types.h> #define MSGSIZE 63 char *fifo = "fifo"; int main(int argc, char **argv){    int fd;...

  • I am working on this code and keep getting errors like "ERROR: Syntax error: Encountered "<EOF>"...

    I am working on this code and keep getting errors like "ERROR: Syntax error: Encountered "<EOF>" at line 1, column 169." and "ERROR: Table/View 'STUDENT' does not exist. ERROR: Table/View 'STUDENT' does not exist. ERROR: Table/View 'STUDENT' does not exist." I do not know why this isn't working. Here is my code: DTCCDatabase.java import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.sql.Statement; /** * This program creates the CoffeeDB database. */ public class DTCCDatabase {    public static void main(String[] args)...

  • Create the database and tables for the database. Show all SQL statements. Include primary and foreign...

    Create the database and tables for the database. Show all SQL statements. Include primary and foreign keys. Insert data into each table. Show select statements and display the output of each table. Note:Student’s name must be inserted into table as part of the data! Perform the SQL below: Query one table and use WHERE to filter the results. The SELECT clause should have a column list, not an asterisk (*). State the purpose of the query; show the query and...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT