Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Dear Redgate. SQL Prompt owns for the most part, but the autoformatting options are kind of weak.
- -- Here's the way I like to format my code.
- declare @dateOnly datetime
- if @dateOnly is not null
- begin
- select
- staffId, staffName, a,
- day(@dateOnly)
- from dbo.personnel
- inner join
- ( select fulladdresswithlongname
- from b
- ) ab on personnel.a = ab.a
- where
- len(empType) = 0
- and empType in
- ( 'a', 'b', 'd', 'g', 'i', 'k', 'p', 'q', 'r', 's',
- 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'D', 'F',
- 'I', 'K', 'M', 'N', 'O', 'Q', 'X', 'Z'
- )
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement