Forum Replies Created

Viewing 15 posts - 226 through 240 (of 309 total)

  • RE: Did the way SQL Server 2008 evaluates a CASE WHEN condition when used in a filter?

    Sorry, I dont know if this is documented anywhere, but I doubt it.

    This seems to be a very special edge case to me.

    They probably have not changed the behaviour on...

  • RE: Did the way SQL Server 2008 evaluates a CASE WHEN condition when used in a filter?

    There is no problem doing what you really want.

    Try this:

    drop table test1

    create table test1(d datetime, n int)

    insert into test1 values ('99991230 23:00', 2), ('17530101', -1), ('20100101',1)

    select

    CASE

    WHEN CAST(d as NUMERIC(38,10))...

  • RE: query

    Something like this:

    select * from (

    select row_number() over (order by object_id) rownum, *

    from sys.objects

    ) dt

    where rownum%5=0

  • RE: Did the way SQL Server 2008 evaluates a CASE WHEN condition when used in a filter?

    I suspect that what is happening in the original select is that sql server is trying to compile the case expression, and during compilation it encounters the overflow while trying...

  • RE: Query Performance

    I dont understand what you mean.

    Please be more clear.

  • RE: SQL query is not showing null or zero values

    I think the script below will solve your problem.

    By the way, next if you time post CREATE TABLE and INSERT statements it will be much easier for people to help.

    DROP...

  • RE: T-sql commands to find the pages

    You can also use

    select * from sysindexes

    or you can create a join with sys.allocation_units, sys.partitions, sys.indexes and sys.objects to create very detailed information about each partition.

    /SG

  • RE: Query Performance

    Try adding IIDON to the clustered index, like this:

    CREATE CLUSTERED INDEX [IX_t_temp] ON [dbo].[t_temp]

    (

    [obd] ASC,

    [AID] ASC,

    [LS] ASC,

    IIDON

    )

    This might help depending on the distribution of data in the table.

    /SG

  • RE: Create Views on similar table names in multiple databases

    It is still not really clear what you want.

    Assume that in database A, table X has the following columns: c1, c2, c3 and in database B, table X has the...

  • RE: FizzBuzz

    Jeff Moden (4/18/2010)


    With a bit of egg on my face (a whole omelette, actually), it would appear that IDENTITY is, in fact, the culprit and not the 3 way CROSS...

  • RE: Select Starttime

    kjkeyan (4/18/2010)


    HI,

    Thanks for your suggestion ,but i have tried this query

    SELECT StartTime

    FROM TicketTransaction

    WHERE

    convert(datetime,StartTime) <= '12:30 PM'

    ...

  • RE: FizzBuzz

    I used a triple cross join to create the results. I didn't post that query back when I did my testing. My recovery model was simple.

    Well, on my machine I...

  • RE: FizzBuzz

    Jeff Moden (4/18/2010)


    Stefan_G (4/18/2010)


    What is your recovery model ?

    Right now, I'm testing with the FULL recovery model.

    But if you are running with FULL, SELECT INTO is fully logged, so...

  • RE: FizzBuzz

    What is your recovery model ?

  • RE: FizzBuzz

    Jeff Moden (4/18/2010)


    The only thing I did was a SELECT/INTO using a triple cross join to create a Billion row table with just one column in it... "N".

    And did you...

Viewing 15 posts - 226 through 240 (of 309 total)