Forum Replies Created

Viewing 15 posts - 2,926 through 2,940 (of 10,144 total)

  • RE: Amend function to include time values

    pwalter83 (9/12/2014)


    ChrisM@Work (9/12/2014)


    If the existing function has been in use for some time then you should assume that it is tried and tested and wherever it’s in use, any changes...

  • RE: Amend function to include time values

    If the existing function has been in use for some time then you should assume that it is tried and tested and wherever it’s in use, any changes to it...

  • RE: Amend function to include time values

    USE TEMPDB

    /*

    CREATE TABLE MG_COUNTRY([COUNTRY_CD] [varchar](2) NOT NULL,[COUNTRY_DSC] [varchar](35) NOT NULL)

    INSERT INTO MG_COUNTRY VALUES ('GB','United Kingdom')

    CREATE TABLE [dbo].[MG_BANK_CALENDAR](

    [COUNTRY_CD] [varchar](2) NOT NULL,

    [BUSINESS_DT] [datetime] NOT NULL,

    [BUSINESS_TYPE_FLG] [char](1) NOT NULL,

    [DELETED_FLG] [char](1) NULL,

    CONSTRAINT [PK_MG_BANK_CALENDAR] PRIMARY...

  • RE: Amend function to include time values

    pwalter83 (9/11/2014)


    the lag should be 1 (rounded off)

    and that too in decimal format

    ignoring the half an hour afterwards

    it just takes the date part into consideration and not the time

    I hope...

  • RE: Amend function to include time values

    pwalter83 (9/11/2014)


    ChrisM@Work (9/11/2014)


    Hi Paul

    "Number of holidays for country between dates", the name of the function, gives the game away. Are there any holidays which don't last a full day? If...

  • RE: Amend function to include time values

    Hi Paul

    "Number of holidays for country between dates", the name of the function, gives the game away. Are there any holidays which don't last a full day? If there are,...

  • RE: JOIN BIG and SMALL TABLEs

    Referring to your original post in this thread:

    tony28 (8/25/2014)


    I have one small table about 150rows and second bigger about 50000rows

    Three tables are referenced in your query:

    Table [TB_WORK_ORDERDTL_CPM01] 10,856,500 rows

    Table [TB_CODE_PRTFORM]...

  • RE: JOIN BIG and SMALL TABLEs

    tony28 (9/10/2014)


    Hello guys, I disscused with one DB specialist and I found solution for my problem...

    because with data in statistics was very good results,

    ...

    tony28 (9/10/2014)


    ...result with data in statistics...

  • RE: UNION ALL Statement hangs engine

    Sean Lange (9/10/2014)


    ChrisM@Work (9/10/2014)


    Heh Fingers on Fire, Sean!

    Nah. I cheated and used poorsql.com. 😉

    "Put your mangled SQL in the box below" - then jump up and down on it.

  • RE: UNION ALL Statement hangs engine

    Heh Fingers on Fire, Sean!

  • RE: UNION ALL Statement hangs engine

    Thanks. Here's that query reformatted for readability, to show how ghastly it is. In addition to points raised by Sean and others, the table loan_balances is read five times where...

  • RE: Identify the missing element [Query]

    -- If you change your correlated NOT IN subquery to a standard NOT EXISTS subquery like this:

    SELECT *

    FROM Full_Address_Map fam

    WHERE NOT EXISTS (

    SELECT 1

    FROM tbl_street s

    INNER JOIN tbl_place...

  • RE: UNION ALL Statement hangs engine

    artisticcheese (9/9/2014)


    Still don't get it. If it will choke on it then I would assume no results will be returned, instead exactly 88 rows returned and then it hangs with...

  • RE: Case Statement in Join condition

    Priya004 (9/10/2014)


    Hey..i got the reason after posting the query..Im clear now

    Anyways Thanks a lot!

    Can you post your chosen solution please?

  • RE: Cursor - Declare variable error

    -- You can't specify a table name as a variable in a statement in TSQL. Your best bet is dynamic SQL: http://www.sommarskog.se/dynamic_sql.html

    EXEC('DELETE FROM ' + @Table_Name)

    -- or

    DECLARE @sql NVARCHAR(MAX) =...

Viewing 15 posts - 2,926 through 2,940 (of 10,144 total)