Forum Replies Created

Viewing 15 posts - 721 through 735 (of 1,183 total)

  • RE: Random Data

    I may be misunderstanding your request, but why not just use NEWID()

    SELECT TOP 1000 FirstName

    FROM SampleData..First_Names

    ORDER BY NEWID()

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: help with isnull()

    FIRST: I'm not attacking anyone, I'm just convinced that my second answer (Only after Matt pointed out an error) will work.

    SECOND: Ravi's code will work as well. 😀

    Matt, I think...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: help with isnull()

    Jeff Moden (11/29/2007)


    ... and, unless you made the serious mistake of how the server handles null, you cannot compare against a null with signs of equality. It just doesn't...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: help with isnull()

    Matt Miller (11/29/2007)


    Jason Selburg (11/29/2007)


    Use COALESCE. It returns the first NON-NULL value in the list.

    WHERE

    col1 = COALESCE(@variable, col1)

    Sorry Jason - gotta part ways with ya here......

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: help with isnull()

    Use COALESCE. It returns the first NON-NULL value in the list.

    WHERE

    col1 = COALESCE(@variable, col1)

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: SQL Server 2005 reporting services

    Sorry, you got me on this one.

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: SQL Server 2005 reporting services

    On the Datasource Properties, what are the settings for Connect using: ?

    The error points to a Datasource Security issue not report parameter.

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: NOT IN condition

    I'm not sure, but I'll bet it's obvious. 😀

    Anywho, I believe this would be more efficient.

    INSERT INTO DC_CLAIMS (CLAIM_SK)

    SELECT DISTINCT

    ...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: CASE with SELECT * FROM TableName not possible?!

    Ahmed Bouzamondo (11/29/2007)


    Sorry Jason the 2 way SET and SELECT 😛

    Ahmed, I'm not clear on what you mean here.:ermm:

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: CASE with SELECT * FROM TableName not possible?!

    Ahmed,

    Actually that's not true. However, Lowell is correct in that the @Result= needs to appear directly after the SELECT.

    So...

    SELECT

    CASE @Ind

    ...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: column into a row using select

    And for more complex "Columns into Rows/Rows into Columns" Look up the PIVOT and UNPIVOT functions new to 2005. They've proven quite handy.

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: CASE with SELECT * FROM TableName not possible?!

    What about ...

    DECLARE

    @Ind int

    ,@Result nvarchar(50)

    SELECT

    CASE @Ind

    WHEN 1 THEN...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Convert from Byte to Megabyte

    You guys and your details! :w00t:

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Convert from Byte to Megabyte

    divide the number by 1,024. :w00t:

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Topic Rating

    Too funny.. :hehe:

    It does appear to "remember" the votes. I just noticed while hovering over the stars, it tells you how many votes were made.

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg

Viewing 15 posts - 721 through 735 (of 1,183 total)