This topic is locked
[SOLVED]

 Sintax error

10/14/2014 12:11:47 PM
ASPRunner.NET General questions
M
mroman98 author

Hi Forum,
Can someone tell me what's wrong with the folowwing?
string strSQLExists = "select * from dbo.vCommonData where dbo.vCommonData.EmployeeID = 'dbo.Employee.EmployeeID'";
when i click on the "Check Syntax" button the code gets underlined...
Regards,

Manuel Roman

F
Freertool 10/14/2014



Hi Forum,
Can someone tell me what's wrong with the folowwing?
string strSQLExists = "select * from dbo.vCommonData where dbo.vCommonData.EmployeeID = 'dbo.Employee.EmployeeID'";
when i click on the "Check Syntax" button the code gets underlined...
Regards,

Manuel Roman


All you need to dos is Select from dbo.vCommonData

Employee ID is record in your table, isn't it.
Unless you have some type of parameter for EmployeeID otherwise if you
do have it declared
it would be select
from dbo.vCommonDAta where EmployeeID = @EmployeeID
Your not doing that, What is it that your trying to do exactly?

M
mroman98 author 10/14/2014



All you need to dos is Select from dbo.vCommonData

Employee ID is record in your table, isn't it.
Unless you have some type of parameter for EmployeeID otherwise if you
do have it declared
it would be select
from dbo.vCommonDAta where EmployeeID = @EmployeeID
Your not doing that, What is it that your trying to do exactly?

M
mroman98 author 10/14/2014

Hi,
I am trying to read a record from a common data table to populate default values.
Regards,

Manuel Roman

F
Freertool 10/14/2014



Hi,
I am trying to read a record from a common data table to populate default values.
Regards,

Manuel Roman


So you are just trying to list them in a specific order? Do you have another table with employees on it or is it just a single table database?

M
mroman98 author 10/14/2014

3 tables Employee, Bonus detail and Common Data... their all link by employee ID.

F
Freertool 10/14/2014



3 tables Employee, Bonus detail and Common Data... their all link by employee ID.


so you want to join the tables
Select *

from CommonData INNER JOIN

Empolyees ON Commondata.EmployeeID = Employee.ID or EmployeeID

M
mroman98 author 10/14/2014



so you want to join the tables
Select *

from CommonData INNER JOIN

Empolyees ON Commondata.EmployeeID = Employee.ID or EmployeeID

M
mroman98 author 10/14/2014

Thanks,
I am trying that next.

M
mroman98 author 10/21/2014



Thanks,
I am trying that next.