Forum Replies Created

Viewing 15 posts - 1,501 through 1,515 (of 7,429 total)

  • RE: condition in where to avoid subquery

    This si the normal way based on what I read.

    SELECT <account info>

    FROM <table name>

    WHERE

    ( <marketing campaign> = 'z' AND <account manager> != 'x' AND <account information> between <date 1> AND...

  • RE: Where do temporary tables exist? How do I delete one?

    Change

     

    IF EXISTS( SELECT * FROM sysobjects WHERE name = '#TEST')

    To

    IF object_id('tempDB..#TEST') IS NOT NULL

     

    The reason is it is only referencable in tempDB either way and the name in sysobjects will...

  • RE: Can this be done?

    It is called a pivot table and is simple enough, however I suggest for logical reasons do it this way.

     

    SELECT

     T1.Col_1,

     T1.Col_2,

     MAX(CASE WHEN T2.Code = 'M' THEN T2.Value ELSE NULL END) AS...

  • RE: Guess even MS misses typos.

    Interesting. I also knew about the RAISERROR thing I was just typing and wasn't thinking about it. Just thought was funny MS had a typo.

     

    And BTW, if you look message...

  • RE: Guess even MS misses typos.

    No, I was writing Functons in 2000 thank you. HEHE.

  • RE: Guess even MS misses typos.

    Nope this is the response SQL Server gave me when I tried to use the RAISERROR method in the code of a UDF.

  • RE: TeraTrax Offers The SQLServerCentral.com a 15% Discount

    Not that it really matters especially if someone likes this product, but you can purchase a full version of SQL Server Develoepr Edition which includes EM and can be used...

  • RE: Index on Identity Columns

    Let's looks at this one.

    1. All the time, I believed that declaring an identity column does not add an index on it, so if any joins were made based on...

  • RE: DBCC PINTABLE

    No. It will be flushed from the cache and not repinned on creation of the new.

  • RE: Most efficient inner join

    In the INNER JOIN query in your post the results and efficiency are exactly the same. However in some cases when you get into more complex INNER JOINS moving some...

  • RE: Non-Unique Clustered Indexes and invisible Unique Identifiers

    Or in short form (because I usually am the one with the long answers) it uses the value in the Clustered Index but any duplicate values has the 4 extra...

  • RE: How can i pass different decimal values to a same function

    Unless you create an Extended Stored Procedure to create dynamic sql thru and submit the value as a varchar(39) then you cannot. The requirement to deal with an undefined datatype...

  • RE: rewrite code to eliminate isnull

    You cannot include GETDATE() inside a UDF, you can however make an input parameter to accept it. It comes from the hole deterministic/non-deterministic rules.

  • RE: Table design

    You can always split the table into two and join in a view to cover lookups and since using an SP you will not have any issue being able to...

  • RE: rewrite code to eliminate isnull

    Sorry but this is not a bug.

    where isnull(columnb,columna) = somedate

    The problem is once the query has developed an execution plan it will abide by it. So if the choice is...

Viewing 15 posts - 1,501 through 1,515 (of 7,429 total)