ms access - Simplifying a SQL Query with multiple columns -


I was wondering if you could simplify the questions given below in the Single Question can help me.

I have 10 questions that are given below. The only difference between all those fields is the "Outgoing Task" that starts at 1 and runs to 10.

  SELECT S1 [Main project] AS Co., S1 [Main link] AS Project, S1 [Name] milestone, S1 [Start] MilestoneDueDate, S2 [Name] As successor, S2 [Start] SuccessorDueDate as sheet 1 as S1 interiors as included in sheet 1 S2 on S1. As [outcoming Task 1] = S2 [ID] where S1.Start & gt; S2 [Start] and S1 [% Compl #] & lt; & Gt; 100 and (S1 [Task Class]. & Lt; & gt; '*** Sammelvorgang' and S1 [Task Class]. & Lt; & gt; '' and S1 [Task Class]. & Lt; & Gt; 'Md-Muster') and (S2 [Task Class]. & Lt; & gt; '*** Sammelvorgang' and S2 [Task Class]. & Lt; & gt; '' and S2 [Task Class]. << 'Md-Muster'} by order S1 [Main project], S1 [Main link], S1 [Name]; Because of this I have made it, because instead of creating a table for connection between work, DBA has created 10 fields such as External Work 1, External Task 2 and External Task 3 ...  

Is it possible to add all the questions in the same? Can you tell me how?

INFO: MS-ACCESS 2010

Thanks,

Try something like the query below. I also think that, the empty space in the column name is not really the best practice.

  SELECT S1 [Main project] AS Co., S1 [Main link] AS Project, S1 [Name] milestone, S1 [Start] As MilestoneDueDate, S2. [Name] As successor_Task1, S2 [Start] As SuccessorDueDate_Task1, S3 [Name] As Successor_Task2, S3 [Start] As SuccessorDueDate_Task2, ... 3, 4 As, 5, 6, 7, 8, 9, 10 ... Join Sheet 1 to S1 Left Join S1 on S2 as Sheet 1 [Outcoming task 1] = S2. [ID] Join left S1 as S1 on sheet 1. [Outcoming Task 2] = S3 [ID] ... 3, 4, 5, 6, 7, 8, 9, 10 ... where S1.Start> S2 [Start] and S1 [% Compl #] & lt; & Gt; 100 and (S 1 [Task Class] << *** Samvolvorgang and S 1. [Task Class] 
"S" and "S 1" [Task Class] & lt; & Gt; 'Md-Muster' and (S2 [Task Class] << *** CemelvorGang & S. 2. [Task Class] & gt; "& S 2. [ Task Class] & lt; & gt; Md-Muster ') and (.3 S3 [Task Class] <<' Sammelvorgang 'and S3 [Task Class]. & gt; 'And S3 [Task Class].
' Md-Muster '). 3, 4, 5, 6, 7, 8, 9, 10 ... by order S 1. [Main project ], S 1. [Main Link], S 1. [Name];

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -