Seems rather general but I am wanting to get some rationale for further tasks.
I have the following query and it works great. However, needing the query results to have a codetitle. The query below does not have any mention of codetitle and the table mentioned, firms, does not have this field. It does have a naicscode field. My idea is to do an inner join to a table called codes which has the following fields in an effort to have the codetitle to show up in the query. The naicscode field in firms and the code field in codes are one in the same. First, would I want to do an inner join or right join? Second, is it as simple as adding a join expression between the "from" and "group by"?
state char(2)
codetype char(2)
code char(6)
codetitle varchar (115)
select state,areatype,area,indcodetype AS indcodtyp, 'S' AS Indsource, naicscode,...