Help with Make table Query

V

Vijay

Hi,
I Am trying to Export values to a new table but i want to
ive it a new name and not able to iam typing the query
Pls help me correct it for mistakes in syntax.

"PARAMETERS [Name] Text ( 255 );
SELECT [Employees Master].EmployeeNumber, [Employees
Master].Designation, [Employees Master].PFNumber,
[Employees Master].Title, ([Employees
Master].[FirstName]+[Employees
Master].[MiddleName]+[Employees Master].[LastName]) AS
EMPName, [Employees Master].OfficeLocation, [Employees
Master].Salary, [Employees Master].Basic, [Employees
Master].HRA, [Employees Master].Conveyance, [Employees
Master].Medical, [Employees Master].LTA, [Employees
Master].OT, [Employees Master].Gratuity, [Employees
Master].OtherAllowance, [Employees Master].Arrears,
[Employees Master].LoanDeductions, [Employees
Master].OtherDeductions, ([Employees Master].LeaveMedical +
[Employees Master].LeaveCasual + [Employees
Master].Leaveprevilige+[Leave Master].PLOpeningBalance+
[Leave Master].SLOpeningBalance+ [Leave
Master].CLOpeningBalance) AS [Total Leave], ([Leave
Master].PLAvailedApril+ [Leave Master].CLAvailedApril+
[Leave Master].SLAvailedApril+ [Leave Master].PLAvailedMay+
[Leave Master].CLAvailedMay+ [Leave Master].SLAvailedMAy+
[Leave Master].PLAvailedJune+ [Leave Master].CLAvailedJune+
[Leave Master].SLAvailedJune+ [Leave Master].PLAvailedJuly+
[Leave Master].CLAvailedJuly+ [Leave Master].SLAvailedJuly+
[Leave Master].PLAvailedAugust+ [Leave
Master].CLAvailedAugust+ [Leave Master].SLAvailedAugust+
[Leave Master].PLAvailedSEP+ [Leave Master].CLAvailedSEP+
[Leave Master].SLAvailedSEP+ [Leave Master].PLAvailedOCT+
[Leave Master].CLAvailedOCT+ [Leave Master].SLAvailedOCT+
[Leave Master].PLAvailedNOV+ [Leave Master].CLAvailedNOV+
[Leave Master].SLAvailedNOV+ [Leave Master].PLAvailedDEC+
[Leave Master].CLAvailedDEC+ [Leave Master].SLAvailedDEC+
[Leave Master].PLAvailedJAN+ [Leave Master].CLAvailedJAN+
[Leave Master].SLAvailedJAN+ [Leave Master].PLAvailedFEB+
[Leave Master].CLAvailedFEB+ [Leave Master].SLAvailedFEB+
[Leave Master].PLAvailedMAR+ [Leave Master].CLAvailedMAR+
[Leave Master].SLAvailedMAR) AS [Availed Leave] INTO [Name]
FROM [Leave Master] INNER JOIN ([Employees Master] INNER
JOIN [Wage Master] ON [Employees Master].Designation =
[Wage Master].Designation) ON [Leave Master].EmployeeNumber
= [Employees Master].EmployeeNumber;"
 
J

John Vinson

Hi,
I Am trying to Export values to a new table but i want to
ive it a new name and not able to iam typing the query
Pls help me correct it for mistakes in syntax.

Parameters cannot be used for the name of the target table.

I have to ask - why do you need this new table AT ALL? It appears that
you're trying to create a separate table for a selected employee; this
is *extremely* bad design and is unnecessary! Storing data redundantly
should be avoided.

Note that if you want to generate a Report, an export, a Form, a new
query, almost anything, using the data in this Query - you can simply
use a Select Query instead of a MakeTable query.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top