Forum Replies Created

Viewing 15 posts - 16 through 30 (of 201 total)

  • RE: Select CASE Problem

    peseta30 (1/17/2012)


    Select Account_Number = Customer,

    AR_Amount = sum(isnull(Amount,0))

    where 1 = 1

    and Customer =...

  • RE: Time Zone

    I have never needed to store information about Timezones so excuse me if this is a stupid question. But wouldnt it be easier to store this in a separate column?...

  • RE: Query Plan Execution Order

    Going to stick my neck out and say that its wrong.

    Yes the stream aggregate gets called first... but it hasnt finished. So is the important part which gets called...

  • RE: Update table

    xiewei (10/23/2011)


    UPDATE table1 SET col1 = (select distinct case a.col1 when '1' then '0' else '1' end from table1 a where a.col1=table1.col1)

    The solution is very clever!

    No its not. Its...

  • RE: how shrinking database adds fragmentation ?

    Joy Smith San (10/4/2011)


    Experts

    I know that google is my friend...

    But still, can anyone tell me how shrinking database adds fragmentation ?

    Thanks in advance.

    Smith.

    http://www.sqlskills.com/BLOGS/PAUL/post/Why-you-should-not-shrink-your-data-files.aspx

    /T

  • RE: Table variable vs temp table

    dgvozdetsky (10/3/2011)


    Very interesting question 🙂

    In my case on SQL 2008 R2 i receive follow result:

    - table variable - 29290 ms

    - temp table - 240 ms

    Cool. The comment block in the...

  • RE: Table variable vs temp table

    stewartc-708166 (10/3/2011)


    Interesting question, Ron.

    Thanks

    Something to bear in mind: There are numerous factors that influence the choice between table variables and/or temp tables, inter alia:

    > Data set size (number of columns...

  • RE: Table variable vs temp table

    Carlo Romagnano (10/3/2011)


    tommyh (10/3/2011)


    There are several problems with this question. One being that you cant declare @Start 2 times.

    The other being that the answer is wrong. They both perform equally....

  • RE: Table variable vs temp table

    There are several problems with this question. One being that you cant declare @Start 2 times.

    The other being that the answer is wrong. They both perform equally. I have executed...

  • RE: Query all tables in all user database

    Ninja's_RGR'us (9/23/2011)


    tommyh (9/23/2011)


    I get a bunch of

    Server: Msg 16915, Level 16, State 1, Line 1

    A cursor with the name 'hCForEach' already exists.

    messages when i run that code. Maybe its...

  • RE: Query all tables in all user database

    I get a bunch of

    Server: Msg 16915, Level 16, State 1, Line 1

    A cursor with the name 'hCForEach' already exists.

    messages when i run that code. Maybe its a bug...

  • RE: Query all tables in all user database

    Create a table to store result

    create table tempdb..TableRowCounts (db varchar(128), tablename varchar(128), RecCount int primary key (db, tablename))

    Count rows in all usertables i all DBs and store in the table...

  • RE: Database Mirroring State

    There is a "slight" difference between "pausing database mirroring" and "If the mirror is unavailable".

    Better link ?

    http://msdn.microsoft.com/en-us/library/ms190664.aspx

    /T

  • RE: SubQuery

    JOIN (SELECT StudentId as StudentNumber, max(RequestNbr) as RequestNb

    FROM Request

    ...

    ...

  • RE: Sorting with Swedish letters ÅÄÖ

    christofer.jarlesjo (9/14/2011)


    When I sort a row group/column with name that starts with the Swedish letters Å, Ä or Ö, they get mixed up with A and O. They should be...

Viewing 15 posts - 16 through 30 (of 201 total)