Hi All,
I seem to remember from years ago when I was active in VFP and SQL, that you could have two (or more tables, but I'll keep it simple) tables, one with data, and one with a code. You could put something in your SQL statement so that you would get the "data" value of the "code" instead of the code.
For example:
Table 1 (Customers) has the following fields
FirstName
LastName
DOB
MemberType (a value 1 - 4)
Where MemberType is a value from 1 - 4
Table 2 (MemberTypes) has the following fields
MemberType (a value 1 - 4)
MemberCode
(Where MemberCode is)
"Active"
"Inactive"
"Prospect"
"Closed"
So what I want is a SQL (I think maybe this is a JOIN, but I'm very rusty) statement that in my resulting CURSOR I have the LASTNAME and the MEMBERCODE that is equivalent to the Customer MemberType.
How can I accomplish that in SQL?
Best Regards,
Scott
ATS, CDCE, CTIA, CTDC
"Everything should be made as simple as possible, and no simpler."
I seem to remember from years ago when I was active in VFP and SQL, that you could have two (or more tables, but I'll keep it simple) tables, one with data, and one with a code. You could put something in your SQL statement so that you would get the "data" value of the "code" instead of the code.
For example:
Table 1 (Customers) has the following fields
FirstName
LastName
DOB
MemberType (a value 1 - 4)
Where MemberType is a value from 1 - 4
Table 2 (MemberTypes) has the following fields
MemberType (a value 1 - 4)
MemberCode
(Where MemberCode is)
"Active"
"Inactive"
"Prospect"
"Closed"
So what I want is a SQL (I think maybe this is a JOIN, but I'm very rusty) statement that in my resulting CURSOR I have the LASTNAME and the MEMBERCODE that is equivalent to the Customer MemberType.
How can I accomplish that in SQL?
Best Regards,
Scott
ATS, CDCE, CTIA, CTDC
"Everything should be made as simple as possible, and no simpler."