Click here to Skip to main content
15,881,172 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
ERROR:=
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near ','.


SQL
select distinct b.WFID from WorkFlowStepsSelectionPanels a ,DynamicSelectionPanels b where 
WorkFlowID = 13,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,
5,5,5,5,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,9,9,9,10,10,10,11,11,11,11,11,
12,12,12,12,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,15,15,15,15,15,
16,16,16,16,16,16,18,18,18,18 
and FormatID=3 
and StepNameID = 30,111,118,125,128,130,131,133,134,138,18,19,2,46,47,48,49,89,146,
1,2,20,1,107,112,15,16,2,20,21,71,1,107,108,109,110,2,20,25,29,33,34,1,2,20,32,
1,129,2,25,1,2,51,60,61,65,66,67,69,70,76,88,99,1,140,2,35,44,53,1,2,20,38,39,40,
1,2,41,42,43,1,117,2,64,1,100,157,2,30,58,85,90,1,2,77,78,79,80,81,92,
1,116,120,122,2,1,113,114,119,2,3,56,57,68,63 
and a.SelectionPanelID = b.ID
Posted
Updated 30-Dec-14 21:03pm
v3
Comments
George Jonsson 31-Dec-14 3:04am    
What are the data types of WorkFlowID and StepNameID?

1 solution

You need to use in keyword

SQL
select distinct b.WFID from WorkFlowStepsSelectionPanels a ,DynamicSelectionPanels b where WorkFlowID in ( 13,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,
5,5,5,5,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,9,9,9,10,10,10,11,11,11,11,11,
12,12,12,12,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,15,15,15,15,15,
16,16,16,16,16,16,18,18,18,18) and FormatID = 3 
and StepNameID in( 30,111,118,125,128,130,131,133,134,138,18,19,2,46,47,48,49,89,146,
1,2,20,1,107,112,15,16,2,20,21,71,1,107,108,109,110,2,20,25,29,33,34,1,2,20,32,
1,129,2,25,1,2,51,60,61,65,66,67,69,70,76,88,99,1,140,2,35,44,53,1,2,20,38,39,40,
1,2,41,42,43,1,117,2,64,1,100,157,2,30,58,85,90,1,2,77,78,79,80,81,92,
1,116,120,122,2,1,113,114,119,2,3,56,57,68,63 )
and a.SelectionPanelID = b.ID
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900