Forum Replies Created

Viewing 15 posts - 3,226 through 3,240 (of 6,036 total)

  • RE: Getting server error on Delete

    This works:

    [Code]

    Declare @tempt table (tblid int identity, tblchar varchar(5))

    insert into @tempt (tblchar) -- load some data

    select 'abcd' union all

    select 'bcd' union all

    select 'cd'

    delete T

    from...

  • RE: concatenation problem

    grkanth81 (12/17/2007)


    i am having data something like this:

    number ...

  • RE: DateTime Problem

    This topic is named improperly.

    There is no any problem with datetime.

    The only problem is with column not being datetime.

    Make it datetime and the problem will disappear.

  • RE: Retrieving Only The Portion Of a Field That Meets the Condition

    Or you may find dependencies from system table sysdepends.

  • RE: Query using Case and Group by

    No subqueries!

    SELECT LEFT( str_Sitename , 3) AS SiteName

    , YEAR(dat_UsageDate) AS [YEAR],

    SUM(Case MONTH(dat_UsageDate) When 1 THEN dbl_FuelUsage ELSE NULL END) AS Jan,

    SUM(Case MONTH(dat_UsageDate) When 2 THEN dbl_FuelUsage ELSE NULL END) AS...

  • RE: Selecting Columns Multiple Times within a stored procedure

    Any time the table changes

    How often the table is changed?

    If more than 2 times in a lifetime you better rethink you application design.

    And you don't need 2 statements for...

  • RE: Instead Of Triggers

    From BOL:

    if a trigger is defined as an INSTEAD OF INSERT trigger for a table, and the trigger executes an INSERT statement on the same table, the INSERT statement executed...

  • RE: Instead Of Triggers

    Matt Miller (12/12/2007)


    That's not the behavior that's happening here. With both nested triggers AND recursive triggers on (and restarting the service just to make sure) - it fires once...

  • RE: Instead Of Triggers

    Matt Miller (12/12/2007)


    And it's essentially right out of BOL on instead of triggers...

    Is it SQL2005 BOL?

    Because I'm thinking about writing a book discussing errors in SQL2005 BOL.

    Appears to be quite...

  • RE: Instead Of Triggers

    Well, what's gonna happen when you execute

    [Code]

    insert into real_table --will get posted to the current table regardless of type

    select col_list

    ...

  • RE: CURSOR speed - SQL 2000 vs. SQL 2005

    I just did something like that today - using a staging table - the 1M or so records took 13 seconds to finish. You'll be lucky if you can...

  • RE: Stop execution of SQL script

    I guess you need to read about osql utility in BOL.

    Pay special attention to -i and -b parameters.

  • RE: Trigger and @@Identity

    Reading Help helps a lot.

  • RE: EXISTS does not work with INSERT

    PatrickSimons (12/12/2007)


    I think your approaches should work (I didn't test it yet), but nobody answered my question: why does my SubSelect on Table1 not work?

    Is the SQL-Engine not so intelligent...

  • RE: TinyInt, SmallInt, Int and BigInt

    I would not say the article is rubbish (getting older? 😉 ), but I have to say it's far from being good.

    I tend to agree with Jeff, it's probably the...

Viewing 15 posts - 3,226 through 3,240 (of 6,036 total)