Forum Replies Created

Viewing 15 posts - 121 through 135 (of 1,473 total)

  • RE: Insert Column Default Values

    Paul White NZ (5/1/2010)


    Garadin (5/1/2010)


    Also, even though you have the overhead of a scalar UDF that accesses data, due to the pattern that I'm imagining this would take (Passing just...

  • RE: Export SQL Server 2005 Table to Excel 2007 using T-SQL

    I'm assuming a copy/paste is out of the question? =)

    What about using a data source from the excel worksheet to pull the data in?

  • RE: Need help with UPSERT query

    You had the right general idea, with a slight misunderstanding. You can't check the EXISTS first you have to check the exists for each line. Just do the...

  • RE: Insert Column Default Values

    Garadin (5/1/2010)


    Continuing with the crazy ideas...

    What about putting a trigger on the table that stored the default values to modify the default constraints of the data table. That...

  • RE: Insert Column Default Values

    Continuing with the crazy ideas...

    What about putting a trigger on the table that stored the default values to modify the default constraints of the data table. That way...

  • RE: Insert Column Default Values

    Paul White NZ (5/1/2010)


    Garadin (4/30/2010)


    I'll admit that I scanned this, but I didn't see anyone mention a UDF as the default constraint on the column that does a lookup for...

  • RE: Fault that joins between multiple tables MS SQL Server 2000

    Right, I figured as much, which is why I mentioned the where clause and the outer joins. YOu need to take the criteria out of your where clause and...

  • RE: Insert Column Default Values

    I'll admit that I scanned this, but I didn't see anyone mention a UDF as the default constraint on the column that does a lookup for the value in the...

  • RE: If One COLUMN = 'N' SET ALL TO '0'

    Why do you need such a thing? What are you trying to achieve?

  • RE: Dynamic SQL To Update Table With CASE

    Danny Sheridan (4/30/2010)


    (wish I went to college for CS or DB Development/Management :ermm:). Learn something new everyday!

    You could probably count on one hand the number of regulars here...

  • RE: Fault that joins between multiple tables MS SQL Server 2000

    I'm afraid I couldn't make out enough of that to understand the question, but I will note that having criteria in your WHERE clause targeting SIPFIS and LG_086_01_GNTOTST turns those...

  • RE: Update with sub select issue

    Perhaps...?

    UPDATE [PMReporting_CostModel]

    SET [month]= MONTH(DATEADD(dd, @dateshift, CONVERT(datetime, CAST([month] AS varchar(2))+'/1/'+CAST([year] AS varchar(4)),126) AS CostModelDate)),

    [year]= YEAR(DATEADD(dd, @dateshift, CONVERT(datetime, CAST([month] AS varchar(2))+'/1/'+CAST([year] AS varchar(4)),126) AS CostModelDate))

    WHERE...

  • RE: Rollbacks inside a trigger

    A rollback inside a trigger will roll back the row that fired the trigger. However, you can use a try/catch block to catch the error and take appropriate action...

  • RE: Update records with similar values

    Another method. (Thanks for the setup code Bob)

    declare @sample table (RecID int, RecType int, Hierarchy int, Msg char(1))

    insert into @sample

    Values

    (1, 5555, 10, null ),

    (2, 5555, 20, null ),

    (3, 5555,...

  • RE: Select with unknown where

    If Dynamic SQL isn't an option, you can also use something like this:

    WHERE

    (@FirstName IS NULL OR FirstName LIKE @Firstname)

    AND (@Lastname IS NULL...

Viewing 15 posts - 121 through 135 (of 1,473 total)