20070811

Where are you going with that?

This is the where clause I found when fixing a procedure one day...

FROM Rotation SR LEFT JOIN Break_Type BT ON BT.BT_ID = SR.BT_ID,
(select bandklocka, sp_id from Spot) S,
spot cg
where sr.rotationid = @CopyGroupRef
and sr.rotationid = cg.bandklocka
and s.bandklocka = sr.spotid
and sr.spotid = s.bandklocka
ORDER BY SR.STARTDATE

Now you may not know what a Bandklocka is, but I bet you can see what is off with its usage here.

No comments:

Post a Comment

Be nice... it's the only internet we have.

License & copyright

Creative Commons License
StinkySQL weblog and any related pages, including the weblog's archives are licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.