Forum Replies Created

Viewing 15 posts - 4,711 through 4,725 (of 5,393 total)

  • RE: How to eliminate bad data

    It could be:

    SELECT SomeColumn

    FROM SomeTable

    WHERE LEN(Name) > 1

    AND LEN(Address) > 1

    AND LEN(Phone) > 1

    ... etc

    It depends on what you want to achieve. If you set those conditions in the where...

    -- Gianluca Sartori

  • RE: This SqlTransaction has completed; it is no longer usable.

    It might not be the right answer, but check your code for DDL operations inside of TRY/CATCH blocks. Even if your code runs perfectly without a transaction when it gets...

    -- Gianluca Sartori

  • RE: How to eliminate bad data

    SELECT SomeColumn

    FROM SomeTable

    WHERE LEN(SomeColumn) > 1

    -- Gianluca Sartori

  • RE: Are the posted questions getting worse?

    Alvin Ramard (11/17/2009)


    Steve Jones - Editor (11/17/2009)


    That's funny. I wonder how many people will go there right away and not get it?

    Probably as many as the one that wouldn't do...

    -- Gianluca Sartori

  • RE: Are the posted questions getting worse?

    Is Google down?

    No, it's working. I tried google.com and google.it and it seems to work.

    Dave, looks like a good thread for lmgtfy. 😀

    -- Gianluca Sartori

  • RE: Count data using condition

    Now that I see Gail's reply I understand that you need it in one single row.

    Another way to achieve it is with PIVOT:

    SELECT [Active], [Inactive], [Total] = [Active] + [Inactive]

    FROM...

    -- Gianluca Sartori

  • RE: Count data using condition

    ROLLUP is what you're looking for:

    DECLARE @TempTab TABLE (

    [ID] int,

    [Status] varchar(10)

    )

    INSERT INTO @TempTab VALUES (123, 'Active')

    INSERT INTO @TempTab VALUES (234, 'Active')

    INSERT INTO @TempTab VALUES (345, 'Inactive')

    INSERT INTO @TempTab VALUES (567,...

    -- Gianluca Sartori

  • RE: Best way to pull data for Crystal Report

    No there isn't. The same applies to Crystal XI, just to be clear. The reporting engine has to know which columns will be returned by the procedure, so it makes...

    -- Gianluca Sartori

  • RE: Is C# Better?

    Charles Kincaid (11/16/2009)


    Gianluca Sartori (11/16/2009)


    Which is better between C# and VB.Net? ....Uhmmmm.... Java! 😀

    No, seriously, it's just a personal choice. I like languages that force...

    -- Gianluca Sartori

  • RE: Is C# Better?

    Which is better between C# and VB.Net? ....Uhmmmm.... Java! 😀

    No, seriously, it's just a personal choice. I like languages that force you to think in...

    -- Gianluca Sartori

  • RE: Nested Select statement

    Edited: strange double post.

    Anyway you have to test against your DB to decide which one is faster. It depends on your indexes and volumes, there's no single good answer. Check...

    -- Gianluca Sartori

  • RE: Nested Select statement

    There's at least two ways to achieve it. One is the code you posted, that can be changed to match the outer query and the subquery.

    The other way that comes...

    -- Gianluca Sartori

  • RE: Are the posted questions getting worse?

    You could also help him with the ADSL line if he has issues uploading the screenshot. You should be quite expert...:-P

    -- Gianluca Sartori

  • RE: Are the posted questions getting worse?

    Florian Reischl (11/12/2009)


    I completely confirm Jeff! Some random values are really important to ensure some fine tests.

    I prefer this method:

    😀

    :hehe::-D:hehe::-D:hehe::-D

    Thanks Flo for starting my day with a good laugh!

    -- Gianluca Sartori

  • RE: Are the posted questions getting worse?

    GSquared (11/9/2009)


    Steve: Might want to remove that image. This site doesn't validate age of people with accounts, and it also could cause some work issues.

    Sorry for posting that image....

    -- Gianluca Sartori

Viewing 15 posts - 4,711 through 4,725 (of 5,393 total)