Sorry for x-post. Using Access 2000, what is wrong with this syntax?
INSERT INTO Activity (
IDType, ID, ProjectID, ComponentID, SubComponentID, ProcessDate )
VALUES (
'Employee', SELECT EmployeeID FROM tbl1104Mess , 6, 28,341, #11/02/04#
)
The desired result is to place 1 record into Activity for each 1 record in
tbl1104Mess.
With all the literal values and the EmployeeID from tbl1104Mess. I get an
error when I execute this statement. Thanks for any feedback.
Regards,
Chris 2 2098
Chris Kettenbach wrote: Sorry for x-post. Using Access 2000, what is wrong with this syntax?
INSERT INTO Activity ( IDType, ID, ProjectID, ComponentID, SubComponentID, ProcessDate ) VALUES ( 'Employee', SELECT EmployeeID FROM tbl1104Mess , 6, 28,341, #11/02/04# )
The desired result is to place 1 record into Activity for each 1 record in tbl1104Mess. With all the literal values and the EmployeeID from tbl1104Mess. I get an error when I execute this statement. Thanks for any feedback.
Regards, Chris
Uh...the problem is you can't have a query in your values list like you do.
Try:
INSERT INTO Activity (IDType, ID, ProjectID, ComponentID,
SubComponentID, ProcessDate )
SELECT 'Employee', EmployeeID, 6, 28, 341, #11/02/04#
FROM tbl1104Mess
Also, I don't know Access formatting but I'd recommend putting your date
into a more standard format. Is that November 2nd or February 11th?
Zach
Nevermind, I figured it out, I just built it this way
INSERT INTO Activity(IDType, ID, ProjectID, ComponentID, SubComponentID,
ProcessDate)
SELECT "Employee" as IDType, EmployeeID as ID, "6" as ProjectID, "28" as
ComponentID,
"341" as SubComponentID, "11/02/04" as ProcessDate FROM
tbl1104Mess
That had the desired result. Thanks for reading!!!
Chris
"Chris Kettenbach" <ch***@piasd.org> wrote in message
news:Gd********************@giganews.com... Sorry for x-post. Using Access 2000, what is wrong with this syntax?
INSERT INTO Activity ( IDType, ID, ProjectID, ComponentID, SubComponentID, ProcessDate ) VALUES ( 'Employee', SELECT EmployeeID FROM tbl1104Mess , 6, 28,341, #11/02/04# )
The desired result is to place 1 record into Activity for each 1 record in tbl1104Mess. With all the literal values and the EmployeeID from tbl1104Mess. I get an error when I execute this statement. Thanks for any feedback.
Regards, Chris
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Philip Hachey |
last post by:
I think this is do-able, and possibly even simple, but it's been too
many years since I've done anything significant with SQL. Any help
would be appreciated.
I have two tables, PAY and CHG. ...
|
by: Jimmy Tran |
last post by:
Hi All,
I have a table below and I want to design a query to pull all the
members from the TABLE into a Query Result and into a single column with
points assigned appropriately, but I am having...
|
by: Preston Landers |
last post by:
Hello all.
I am trying to write a query that "just" switches some data around so
it is shown in a slightly different format. I am already able to do
what I want in Oracle 8i, but I am having...
|
by: stu_gots |
last post by:
I have been losing sleep over this puzzle, and I'm convinced my train
of thought is heading in the wrong direction. It is difficult to
explain my circumstances, so I will present an identical...
|
by: KoliPoki |
last post by:
Greetings.
I'm having a little trouble with a query. The idea is simple I need to
display a list of recently unique visited URLs and the last time I
visited.
I have 2 table one stores the...
|
by: Chad |
last post by:
I have a problem that I am desperate to understand.
It involves dynamically adding controls to a Table control that is built as a result of performing a database query.
I am not looking to...
|
by: Shapper |
last post by:
Hello,
I have created 3 functions to insert, update and delete an Access
database record. The Insert and the Delete code are working fine.
The update is not. I checked and my database has all...
|
by: sujithegr8 |
last post by:
HIii...
Its me sujith
i've done something with AJAX.
but for the rest i need someo ones help..
i've done half the work.
there are two tables. "ajax1" and "ajax2" (check db.sql)
|
by: Tonio Tanzi |
last post by:
I have the following problem in a Win 2000 Server + SQL Server 2000
environment and I hope somewhat can help me to resolve it (after many
days of useless attempts I am desperate).
In my database...
|
by: Dinesh |
last post by:
Hi experts,
I am working on SQL Server 2005.
Now i have to write a query which will extract some information from a
table.
My main table is having few columns supose 3 columns.
EmpID ...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |