0

i have two MySQL tables with the following structures

CREATE TABLE tbldepartments (
    departmentID TINYINT( 2 ) UNSIGNED NOT NULL AUTO_INCREMENT,
    department VARCHAR( 20 ) UNIQUE NOT NULL,
    PRIMARY KEY ( departmentID )
)

and 

CREATE TABLE tblemployees (
    employeeID SMALLINT( 5 ) UNSIGNED NOT NULL AUTO_INCREMENT,
    departmentID TINYINT( 2 ) UNSIGNED NOT NULL,
    firstName VARCHAR( 20 ) NOT NULL,
    lastName VARCHAR( 20 ) NOT NULL,
    dateHired DATE NOT NULL,
    salary FLOAT UNSIGNED NOT NULL,
    FOREIGN KEY ( departmentID ) REFERENCES tbldepartments ( departmentID ),
    PRIMARY KEY ( employeeID )
)

i want to create a report using Crystal Reports in Visual Basic 2010. the query for the report is

SELECT CONCAT( e.firstName, ' ', e.lastName ) AS Employee, d.department AS Department,
e.salary As Salary, e.dateHired as DateEmployeed FROM tblemployees e, tbldepartments d
WHERE e.departmentID = d.departmentID
2
Contributors
2
Replies
7
Views
4 Years
Discussion Span
Last Post by dinhunzvi
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.