March 29, 2016 at 3:39 pm
1)Assuming Process, Organization and Department tables all exist. please show me how you would create table(s) as it relates to these 3 existing tables/keys (OrganizationID, DepartmentID and ProcessID); Facts: In each organization there can be 1 or more departments and within each department there can be 1 or more processes.
2)Status lookup values are configured by organization/departments
3)Status lookup values created by the organization/department are then assign to different Process
4)Be able to inactivate or activate these dropdown values
March 29, 2016 at 3:58 pm
Can you post what you've attempted already? How about sample rows of data to go along with it? Is there a specific problem that you've encountered while trying to design this solution out?
March 29, 2016 at 4:05 pm
Create table #Status as
(Select OrgName, OrgID, DeptName, DeptID, ProcessName ProcessID from #Org, #Dept, #process where #process.DID = #Dept.DID and #Dept. OrgID = #Org. OrgID)
March 29, 2016 at 4:43 pm
Are you trying to create a temp table? The #prefix in front of your table names makes them temp tables...
Anyways, if you need to create a table from a query, you can use the INTO clause in the query. This can load the results of the query into a permanent or temp table. My example below uses a temp table since that's how your other tables were named. It can be changed if need be.
SelectOrgName
, OrgID
, DeptName
, DeptID
, ProcessName
, ProcessID
INTO #NewTable
from#Org
INNER JOIN #Dept ON #Dept.OrgID = #Org.OrgID
INNER JOIN #process ON #process.DID = #Dept.DID
March 29, 2016 at 8:11 pm
Thank you so much I will work on it.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy