Hi All,
Trying to do something that I perceive as "simple" but I can't get the syntax in the SQL statement to work.
So, I have two tables, which have name values, but different field names, and in different tables. What I want to achieve is a single cursor that has the contents (distinctly) in one common field (called TESTNAMES). So my attempted syntax looks like this:
I had also tried:
The first example fails, the second example gives me the cursor named TESTNAMES, but two columns, where first column has all the distinct values from CONTACT repeated with the second column that has the distinct values from CONTACT.
What am I doing wrong here?
Best Regards,
Scott
ATS, CDCE, CTIA, CTDC
"Everything should be made as simple as possible, and no simpler."
Trying to do something that I perceive as "simple" but I can't get the syntax in the SQL statement to work.
So, I have two tables, which have name values, but different field names, and in different tables. What I want to achieve is a single cursor that has the contents (distinctly) in one common field (called TESTNAMES). So my attempted syntax looks like this:
Code:
SELECT DISTINCT CONTACTFIRSTNAME, UNION SELECT DISTINCT FNAME FROM CONTACT, CTFNAMES INTO CURSOR TESTNAMES
I had also tried:
Code:
SELECT DISTINCT CONTACTFIRSTNAME, FNAME FROM CONTACT, CTFNAMES INTO CURSOR TESTNAMES
The first example fails, the second example gives me the cursor named TESTNAMES, but two columns, where first column has all the distinct values from CONTACT repeated with the second column that has the distinct values from CONTACT.
What am I doing wrong here?
Best Regards,
Scott
ATS, CDCE, CTIA, CTDC
"Everything should be made as simple as possible, and no simpler."