Forum Replies Created

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

  • RE: Calculate Weighted Median

    Hi,

    There is no index because this is a temp table to find the Median value per Code.

    Hope this clears.

    Thanks

  • RE: Calculate Weighted Median

    Hi

    Apoligize for the confusion..

    Here is what I want

    ID CODE Value Volume RunningTotal Average

    1 ...

  • RE: Calculate Weighted Median

    Hi,

    Actually 46 will not be there as the next row will be for different ID

    i.e

    Insert into dr_temp(ID,Code,Value,Volume) Values(

    2,'120',31,2311)

    if present then Yes! it matches, I think Let's get the 1st...

  • RE: Calculate Weighted Median

    Hi,

    Yep we can use the last one.

    Can this done in a SQL Query?

    Thanks

  • RE: Calculate Weighted Median

    Hi,

    Thanks for the reply

    Here is the business rule

    280164.5 falls in the range b/w 106886 and 380683

    However the ending range i.e 380683 > than 280164.5, due to which we need to...

  • RE: SQL COMPLEX QUERY - Urgent

    Thanks...

    But the only problem is Description is ntext field and Distinct doen't work on this type.

    I cannot convert to nvarhar(4000) since only 4000 charactes will be fetched.

    :hehe:

    its taking time to...

  • RE: SQL COMPLEX QUERY - Urgent

    Hi Seth Phelabaum,

    DECLARE @Language VARCHAR(10)

    SET @Language = 'JP'

    SELECT DISTINCT T1.ID, COALESCE(T2.Name, T3.Name) Name, COALESCE(T2.Description, T3.Description) Description,

    COALESCE(T2.Language, T3.Language) Language

    FROM #Table1 T1

    ...

  • RE: SQL COMPLEX QUERY - Urgent

    Thanks for you reply.

    Actually let me explain what I am looking for

    Insert into Table1 (ID, NAME, Descrition, Language)

    Select 1,’TEST’,’English Testing’,’EN’ UNION ALL

    Select 1,’JP TEST’,’JAPAN Testing’,’JP’ UNION ALL

    Select ...

  • RE: SQL COMPLEX QUERY - Urgent

    Any one can please provide me a soluition.

    Thanks

  • RE: SQL COMPLEX QUERY - Urgent

    Hi gardian

    The Query you have provided works well for this cond

    Insert into Table1

    (ID, NAME, Descrition, Language)

    Select 1,’TEST’,’English Testing’,’EN’ UNION ALL

    Select 1,’JP TEST’,’JAPAN Testing’,’JP’ UNION ALL

    Select 1,’CH TEST’,’CHINA...

  • RE: SQL COMPLEX QUERY - Urgent

    Thanks..Its work perfectly.

  • RE: SQL COMPLEX QUERY - Urgent

    Here are my replies

    You supply a language and return a row for each ID, attempting to grab the one for that language. If that language does not exist in...

  • RE: SQL COMPLEX QUERY - Urgent

    Thanks. It works well.

    If I am not wrong this will always get the max of the Version id.

    However my requirement is this

    Insert into Table1

    (ID, NAME, Descrition, Language)

    Select 1,’TEST’,’English...

  • RE: SQL COMPLEX QUERY - Urgent

    Create Table Table1

    {

    VersionID INT IDENTITY(1,1) PRIMARY KEY CLUSTERED,

    ID INT,

    NAME Varchar(50),

    Description varchar(100),

    Language Char(5)

    }

    Insert into Table1

    (ID, NAME, Descrition, Language)

    Select 1,’TEST’,’English Testing’,’EN’ UNION ALL

    Select 1,’JP TEST’,’JAPAN Testing’,’JP’ UNION ALL

    Select...

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