Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)

  • RE: Function to format a datetime variable by a mask

    Hallo,

    very good function often needed.

    German SQLservers need adaptation.

    Since Wednesday in German "Mittwoch" gets corrupted by the MI=minute mask, some workarounds are necessary. I added month and day without leading zero.

    /*

    YYYY...

  • RE: Find Foreign Key Tables

    simpler statement

    select object_name(referenced_object_id) as PrimaryKeyTable

    ,object_name(parent_object_id) as ForeignKeyTable

    ,*

    fromsys.foreign_keys

    whereobject_name(referenced_object_id) like '%mySearchedPrimaryKeyTable%'

    order by object_name(referenced_object_id)

    ,object_name(parent_object_id)...

  • RE: Extracting a String Within Delimeters - Part 2

    drop table Sample_table

    CREATE TABLE #Sample_table (Particulars varchar(120))

    GO

    INSERT INTO #Sample_table VALUES('LDR ; LUC20031026901 ; Vehicle')

    INSERT INTO #Sample_table VALUES('LDR ; Consolidated                                                     ')

    INSERT INTO #Sample_table VALUES('LDR ; SUB35030172701 ; Building')

    INSERT INTO #Sample_table VALUES('LDRR...

Viewing 3 posts - 1 through 3 (of 3 total)