Forum Replies Created

Viewing 15 posts - 271 through 285 (of 1,114 total)

  • RE: computed columns

    Please post the table structre with sample data. Anyway i have created it for you.

    create table price

    (

    p_id varchar(10),

    qty int,

    nou int

    )

    go

    insert into price

    select 'a001',1,2

    union all

    select 'a001',2,3

    union all

    select 'a001',3,5

    union all

    select 'a001',2,4

    union all

    select...

  • RE: Bizarre Ordering Behavior

    I have tested the same query in sybase 12.5.3 and oracle 10g.

    SYBASE is sorting the result based on the expression.

    ORACLE is not sorting the result based on the expression.

    is the...

  • RE: Get Month Name

    A little modification in Jeff's code.

    SELECT DateName(mm,DATEADD(mm,MonthNumber,-1))

  • RE: time difference computation

    thomyes,

    if you need help from here, post the table structure with sample data. I am sure you will get some good replies from this forum.

    are you going to store...

  • RE: How to find Week start date and Week end date

    Hi All,

    A small modification in the requirement. Earlier we showed if user has selected 'Monday' then we will populate previous week's

    Edited: date's

    start date and end date . Now...

  • RE: Finding Missing Date

    I am looking for some other workaround to do the same. So that i can get extend my knowledge.

  • RE: Finding Missing Date

    I have tested the execution time of the query.

    SQL Server Execution Times:

    CPU time = 0 ms, elapsed time = 0 ms.

    SQL Server parse and compile time:...

  • RE: Finding Missing Date

    Going little

    I have written the below query to get the expected result.

    Declare @MinDate datetime,@MaxDate datetime

    select @MinDate = min(dt) from t_date

    select @MaxDate = max(dt) from t_date

    SELECT x.full_dt,t.dt,datename(dw,x.full_dt),case when Holiday_dt is null...

  • RE: Finding Missing Date

    Meantime i have witten the below query to identify the missing date.

    Declare @MinDate datetime,@MaxDate datetime

    select @MinDate = min(dt) from t_date

    select @MaxDate = max(dt) from t_date

    SELECT x.full_dt,t.dt

    FROM t_date t right...

  • RE: Finding Missing Date

    ALL TYPES.

  • RE: PATINDEX & Spliiting comma seperated values

    Any inputs?

  • RE: Bizarre Ordering Behavior

    Yes. It is interesting.

    I have also tested the query plan.

    #1 query ordering is done based on the expression.

    #2 query ordering is done based on the column.

  • RE: how can i convert this date'200702071630+1100' in datetime or in string '20070207'

    Jeff Moden (3/11/2009)


    Did that answer your questions, Karthik?

    Yes. I got it.Thanks a lot.

    So shall we order the string function based on their performance as below?

    The order is like fastest,faster,fast,good,normal.

    1) LEN()

    2)...

  • RE: how can i convert this date'200702071630+1100' in datetime or in string '20070207'

    Jeff,

    Yes.

    Result on my box is here.

    SQL Server Execution Times:

    CPU time = 16967 ms, elapsed time = 0 ms.

    ==================== No Mod's (Baseline) ====================

    SQL Server Execution Times:

    ...

  • RE: how can i convert this date'200702071630+1100' in datetime or in string '20070207'

    I have also tested the below query.

    SELECT CONVERT(DATETIME,CONVERT(CHAR(8),DATE_TIME))

    FROM TBL

    Test1:

    SQL Server parse and compile time:

    CPU time = 0 ms, elapsed time = 0 ms.

    (110000 row(s) affected)

    Table 'TBL'....

Viewing 15 posts - 271 through 285 (of 1,114 total)