October 13, 2017 at 2:52 am
Hello,
Can you please help me understand what am I doing wrong in below code?
Thank you
SELECT
COLUMN_NAME,
DATA_TYPE,
DATA_TYPE2 =
( case
when (DATA_TYPE = 'varchar') then '(' + convert(varchar,(CHARACTER_MAXIMUM_LENGTH)) + ' )'
when (DATA_TYPE = 'decimal') then '(' + convert(varchar,(NUMERIC_PRECISION + NUMERIC_SCALE)) + ')'
^ else null
end ),
CHARACTER_MAXIMUM_LENGTH,
NUMERIC_PRECISION,
NUMERIC_SCALE ,
IS_NULLABLE
FROM
INFORMATION_SCHEMA.COLUMNS
WHERE
TABLE_SCHEMA='genericdata' and TABLE_CATALOG = 'dwhStaging'
order by
October 13, 2017 at 2:54 am
Sorry I just found. Its a simbol. thanks
October 13, 2017 at 9:08 am
river1 - Friday, October 13, 2017 2:52 AMHello,
Can you please help me understand what am I doing wrong in below code?
Thank you
Hopefully, you'll take these observations as ways to improve and not as mere criticism.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply