December 26, 2019 at 10:06 pm
In a WHERE clause.
SELECT
SCHEMA_NAME([o].[schema_id])
, [o].[name]
FROM
[sys].[objects] [o]
WHERE
[o].[type] = 'U'
AND [o].[name] NOT LIKE '% %'
I guess I'm having a brain fade, that makes no sense to me. In the query in question removing the AND line doesn't change the result.
December 27, 2019 at 12:03 am
I've not executed the code but it looks to me like they're trying to reject rows where the name has any spaces.
--Jeff Moden
Change is inevitable... Change for the better is not.
December 27, 2019 at 12:21 am
Agreed. I guess I’ve just never seen a SQL object with spaces in the name!
December 27, 2019 at 3:34 pm
Unfortunately, I've seen that and more. I've even seen people add trailing spaces to all of their object names to make it more difficult to use what they've built. Crazy stuff.
p.s. If that's a picture of you in your avatar, nice beard!. Mine is a touch longer but same shape. I can store a box of MidRats, a six pack, and a small scooter to get home on in it. 😀 Fun stuff.
--Jeff Moden
Change is inevitable... Change for the better is not.
December 27, 2019 at 4:32 pm
“Security through obscurity.”
Yep, that’s me. At the longest it’s been another 2”, but i live in Jackson, Wyoming and the beard can collect inconvenient amounts of ice sometimes.
December 27, 2019 at 5:54 pm
ISO standards forbid embedded spaces in the encodings. There's also a set of Unicode characters that have to be used. It's the digits, Latin letters, and a limited set of punctuation marks.
Please post DDL and follow ANSI/ISO standards when asking for help.
December 27, 2019 at 5:56 pm
ISO standards forbid embedded spaces in the encodings. There's also a set of Unicode characters that have to be used. It's the digits, Latin letters, and a limited set of punctuation marks.
Yep... we both get that. However, Reality <> ISO Standards. 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
December 27, 2019 at 5:59 pm
“Security through obscurity.”
Yep, that’s me. At the longest it’s been another 2”, but i live in Jackson, Wyoming and the beard can collect inconvenient amounts of ice sometimes.
I live in South East, Michigan. It doesn't usually get so cold that we need to bring the iron monkeys into the house but, when it does and the ice collects on the beard, I look at it as free-refrigeration for perishable MidRats. 😀 Heh... and, no... that's not an ISO standard either, Joe. 😀
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply