thanks for taking a look at this. I would like to know if the following can be done in a sql statement.
I have 2 tables that goes something like this:
TABLE1
FieldID integer
FieldDeptID integer
FieldName varchar
FieldAbbrev varchar
TABLE2
fieldDeptID
fieldDeptName
The data in this table looks like this:
Table1
fieldID FieldDeptID FieldName FieldAbbrev
1 1 Labor SNL
2 2 Labor ANL
Table2
FieldDeptID fieldName
1 accounting
2 IT
I would like to write a sql statement that looks at the fieldDeptID and then combines the fieldname from table1 with the deptname from table2
I am using this statement to populate a dropdown combox box in a VB form and in the Display member I want to see the field name with the department name for example. Since there is two "Labor" names I want the combo box to show the user which department the "labor" name belongs to.
ex: Labor Accounting
Labor IT
I hope I explained this right. Can this be done in a sql statement or do I need to do this in VB 2008 code(which i dont know how to do either) Any help would be great
thanks
Joe
I have 2 tables that goes something like this:
TABLE1
FieldID integer
FieldDeptID integer
FieldName varchar
FieldAbbrev varchar
TABLE2
fieldDeptID
fieldDeptName
The data in this table looks like this:
Table1
fieldID FieldDeptID FieldName FieldAbbrev
1 1 Labor SNL
2 2 Labor ANL
Table2
FieldDeptID fieldName
1 accounting
2 IT
I would like to write a sql statement that looks at the fieldDeptID and then combines the fieldname from table1 with the deptname from table2
I am using this statement to populate a dropdown combox box in a VB form and in the Display member I want to see the field name with the department name for example. Since there is two "Labor" names I want the combo box to show the user which department the "labor" name belongs to.
ex: Labor Accounting
Labor IT
I hope I explained this right. Can this be done in a sql statement or do I need to do this in VB 2008 code(which i dont know how to do either) Any help would be great
thanks
Joe