|
Yeah, that is a really ugly querry of "frescoes".
Just because the code works, it doesn't mean that it is good code.
|
|
|
|
|
Is fresco Italian for widget? I'm hungry, how do you ever stop eating over there?! I'm 50% Italian, my mother was born there, but I've never visited. I would have to stay though, because I wouldn't fit on the plane back.
Craigslist Troll: litaly@comcast.net
"I have a theory that the truth is never told during the nine-to-five hours. "
— Hunter S. Thompson
|
|
|
|
|
"fresco" means something "fresh". I can't think of an word sounding the same with a useful meaning in software developing.
regards
Torsten
I never finish anyth...
|
|
|
|
|
|
Are you saying he's all fresco?
Maybe he should work on this[^]?
|
|
|
|
|
Hi Bruno,
Clearly this programmer is using "fresco" as a code-word for "obfuscatore al dente."
best, Bill
"Many : not conversant with mathematical studies, imagine that because it [the Analytical Engine] is to give results in numerical notation, its processes must consequently be arithmetical, numerical, rather than algebraical and analytical. This is an error. The engine can arrange and combine numerical quantities as if they were letters or any other general symbols; and it fact it might bring out its results in algebraical notation, were provisions made accordingly." Ada, Countess Lovelace, 1844
|
|
|
|
|
EDIT: This is LOOOONG. Sorry.
The following code is used to create "WHERE" clause criteria, for all possible cominations of 8 "class" parameters if the "group_a" parameter is passed with a value. I know there's a better way of doing this, but I can't be bothered to unravel this convoluted piece of code!
Function grpStatement(group_a As String, class_aa As String, class_ab As String, class_ac As String, _
class_ad As String, class_ae As String, class_af As String, class_ag As String, _
class_ah As String, classCondition_a As String) As String
Dim groupCondition_a As String
If group_a <> "" Then
If class_aa <> "" Then
classCondition_a = classCondition_a & "'" & class_aa & " %'"
If class_ab <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ab & " %'"
If class_ac <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ac & " %'"
If class_ad <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ad & " %'"
If class_ae <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ae & " %'"
If class_af <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_af & " %'"
If class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_af <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_af & " %'"
If class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ae <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ae & " %'"
If class_af <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_af & " %'"
If class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_af <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_af & " %'"
If class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ad <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ad & " %'"
If class_ae <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ae & " %'"
If class_af <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_af & " %'"
If class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_af <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_af & " %'"
If class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ae <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ae & " %'"
If class_af <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_af & " %'"
If class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_af <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_af & " %'"
If class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ac <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ac & " %'"
If class_ad <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ad & " %'"
If class_ae <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ae & " %'"
If class_af <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_af & " %'"
If class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_af <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_af & " %'"
If class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ae <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ae & " %'"
If class_af <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_af & " %'"
If class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_af <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_af & " %'"
If class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ad <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ad & " %'"
If class_ae <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ae & " %'"
If class_af <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_af & " %'"
If class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_af <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_af & " %'"
If class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ae <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ae & " %'"
If class_af <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_af & " %'"
If class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_af <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_af & " %'"
If class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ab <> "" Then
classCondition_a = classCondition_a & "'" & class_ab & " %'"
If class_ac <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ac & " %'"
If class_ad <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ad & " %'"
If class_ae <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ae & " %'"
If class_af <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_af & " %'"
If class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_af <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_af & " %'"
If class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ae <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ae & " %'"
If class_af <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_af & " %'"
If class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_af <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_af & " %'"
If class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ad <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ad & " %'"
If class_ae <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ae & " %'"
If class_af <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_af & " %'"
If class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_af <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_af & " %'"
If class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ae <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ae & " %'"
If class_af <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_af & " %'"
If class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_af <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_af & " %'"
If class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ac <> "" Then
classCondition_a = classCondition_a & "'" & class_ac & " %'"
If class_ad <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ad & " %'"
If class_ae <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ae & " %'"
If class_af <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_af & " %'"
If class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_af <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_af & " %'"
If class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ae <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ae & " %'"
If class_af <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_af & " %'"
If class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_af <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_af & " %'"
If class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ad <> "" Then
classCondition_a = classCondition_a & "'" & class_ad & " %'"
If class_ae <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ae & " %'"
If class_af <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_af & " %'"
If class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_af <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_af & " %'"
If class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ae <> "" Then
classCondition_a = classCondition_a & "'" & class_ae & " %'"
If class_af <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_af & " %'"
If class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_af <> "" Then
classCondition_a = classCondition_a & "'" & class_af & " %'"
If class_ag <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ag <> "" Then
classCondition_a = classCondition_a & "'" & class_ag & " %'"
If class_ah <> "" Then
classCondition_a = classCondition_a & " OR Level4 LIKE '" & class_ah & " %'"
End If
ElseIf class_ah <> "" Then
classCondition_a = classCondition_a & "'" & class_ah & " %'"
Else
classCondition_a = classCondition_a & "'%'"
End If
groupCondition_a = "Level3 LIKE '" & group_a & " %' AND " & "(" & classCondition_a & ")"
End If
grpStatement = groupCondition_a
End Function
|
|
|
|
|
What the...
It's an OO world.
|
|
|
|
|
|
This is one clear line of commands. You can't say the programmer wanted to confuse you!
regards
Torsten
I never finish anyth...
|
|
|
|
|
That guy tricked you. He wrote a code generator (which he hides from you, and the boss) to generate such long lines of code, and thus he earns lots of money since he gets paid for lines of code.
|
|
|
|
|
I guess he would be able to retire after this one...
|
|
|
|
|
|
zee googles, zey do nuthing.
|
|
|
|
|
See... This is what happens when a developer writes in VB for too long..
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
What's worse is that this is obviously just one part of a very messy inline-SQL generation procedure... Since this would only make one part of a WHERE clause, there are no doubt similar structures elsewhere that you're not showing us...
VB, plus messy inline-SQL generation... ick.
|
|
|
|
|
|
Don't feel too bad about it, yours was pretty horrible too.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Thanks... that's, uh, comforting.
Chris Maunder: Fixign now.
|
|
|
|
|
|
I was the one that formatted it! You should have seen what it looked like before. I won't post it because it's way too large, but trust me, it was pretty bad!
|
|
|
|
|
I am not at all surprised that the original code was not nicely formated. Which means that the original code had no redeeming features.
Just because the code works, it doesn't mean that it is good code.
|
|
|
|
|
Eeeegads!
This code is why code reviews were invented.
That programmer should be forced to keep working on that until it's fixed, that way you at least contain them and stop them doing this elsewhere.
If they haven't fixed it after a week, fire their ass.
Whoever the developers were that let it through a code review...Fire their asses too.
Of course I jest.
There wasn't a code review, there never is in these situations. So fire whoever is responsible for ensuring there are code reviews.
If nobody is responsible for ensuring there are code reviews, fire the person responsible for ensuring that there is a person responsible for ensuring that there are code reviews.
When you've recursively made your way to the top of the Org Chart and fired everyone and the company no longer exists, this mess of code will have served it's purpose.
-Rd
Hit any user to continue.
|
|
|
|
|
... where they breed such ingenious people?
I have a similar thing here. Thousands of lines in one (static) method which are supposed to generate each and every database query the entire application may need. A nightnare to debug...
"I just exchanged opinions with my boss. I went in with mine and came out with his." - me, 2011
--- I am endeavoring, Madam, to construct a mnemonic memory circuit using stone knives and bearskins - Mr. Spock 1935 and me 2011
|
|
|
|
|
Where did you get this stuff? Didn't teachers in university/college tell that you need to split a job into smaller chunks like subfunctions?
|
|
|
|