
SQL - amateur question: What syntax do I use?
I am new to SQL and Jet. I have a book that describes an SQL statement
as follows:
PARAMETERS EmployeeIDSelect Long, SalaryIncreaseFactor Single;
SELECT
Employee.LastName,
Employee.FirstName,
Employee.Salary,
CCur(Employees.Salary*SalaryIncreaseFactor) AS NewSalary
FROM Employees
WHERE Employees.EmployeeID = EmployeeIDSelect;
How do I assign this to a variable? Would it be like this:
S = "PARAMETERS EmployeeIDSelect Long, SalaryIncreaseFactor
Single;SELECT Employee.LastName, Employee.FirstName, Employee.Salary,
CCur(Employees.Salary*SalaryIncreaseFactor) AS NewSalary FROM Employees
WHERE Employees.EmployeeID = EmployeeIDSelect;"
or like this
S = "PARAMETERS EmployeeIDSelect Long, SalaryIncreaseFactor Single; _
SELECT _
Employee.LastName, _
Employee.FirstName, _
Employee.Salary, _
CCur(Employees.Salary*SalaryIncreaseFactor) AS NewSalary _
FROM Employees _
WHERE Employees.EmployeeID = EmployeeIDSelect;"
or none of the above?
G.Doucet