Skip to content

Instantly share code, notes, and snippets.

@matt40k
Created March 26, 2019 11:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matt40k/da9917b43efbb501300a4b302c1e5abb to your computer and use it in GitHub Desktop.
Save matt40k/da9917b43efbb501300a4b302c1e5abb to your computer and use it in GitHub Desktop.
select
concat('select top 10 [', c.name, '] from [', schema_name(t.schema_id), '].[', t.name, '] where [', c.name, '] like ''%.%'' and [', c.name, '] not like ''%.0%''')
from
sys.tables t
inner join sys.columns c on
t.object_id = c.object_id
inner join sys.types ty on
c.user_type_id = ty.user_type_id
and ty.name = 'decimal'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment