Forum Replies Created

Viewing 2 posts - 16 through 18 (of 18 total)

  • RE: count the order on weekly basis

    Hello,

    Please find an example sql below. Hope it helps.

    -- Drop table if it already exists

    IF (OBJECT_ID('tempdb..#tmpOrders') IS NOT NULL)

    BEGIN

    DROP TABLE #tmpOrders ;

    END ;

    -- Create temp table...

  • RE: Format Cast INT as Text

    A bit longer, but more obvious.

    DECLARE @INTINT= 1 ;

    SELECT REPLICATE('0', 2 - LEN(@INT)) + CAST(@INT AS VARCHAR)

    Pass the column name instead of @INT

Viewing 2 posts - 16 through 18 (of 18 total)