Tuesday, November 26, 2024

Find all Tables that Contain a Specific Column Name in SQL Server

SELECT
    TABLE_CATALOG,
    TABLE_SCHEMA,
    TABLE_NAME,
    COLUMN_NAME,
    ORDINAL_POSITION as org_pos,
    DATA_TYPE,
    CHARACTER_MAXIMUM_LENGTH as CML
FROM
    INFORMATION_SCHEMA.COLUMNS
WHERE
    COLUMN_NAME LIKE '%Err%'
ORDER BY

    TABLE_NAME; 

Friday, July 19, 2024

Wednesday, July 10, 2024

single line IF statemt


 Ex:

 var vchr1099Xml = (eVoucherType == "Voucher Maintenance" ? "" : VoucherMapper.ConvertVchr1099ToXml(new Vchr1099 { Flag1099 = "N", Amount = e3EVoucher.voucher.Amount }));