Forum Replies Created

Viewing 15 posts - 3,646 through 3,660 (of 6,486 total)

  • RE: Chastised for recommending use of bit data type

    Lynn Pettis (4/15/2008)


    #1 is really a "it depends". If the number of 0's and 1's is about even, then yes the selectivity is questionable. I used a bit...

  • RE: Querying multiple tables using one script

    Then you need to specify which business area you want to display....That's a where clause...

    SELECT DISTINCT

    t1.Application_name, t2.Application_Vendor

    FROM table1...

  • RE: Chastised for recommending use of bit data type

    gkruchten (4/15/2008)


    I was asked to develop some data base recommendations for the development team to reference. One of my recommendations was:

    "Consider using BIT data type columns for Boolean values, as...

  • RE: Querying multiple tables using one script

    Terrence -

    there's no looping going on in what it being displayed - the result should display all of the app names and vendor names in a single query.

    What is...

  • RE: Linking to next row using a join on row_number()+1=row_number()

    ...actually - by adding a clustered index right before that last results query - it drops to 14 seconds (14221 ms) for 500,000 rows.

    create unique clustered index #pkm2 on #matt2(id,grp)

  • RE: Linking to next row using a join on row_number()+1=row_number()

    Perhaps I'm missing some of the subtleties here, but this processes 350,000 pairs out of 500,000 records in 17 seconds.

    [font="Courier New"]--clean up the environment

    DROP TABLE #t

    DROP TABLE #matt

    DROP TABLE #matt2

    GO

    --create...

  • RE: Calculate pmt in t-sql (like excel)

    declare @pv money

    declare @fv money

    declare @nper int

    declare @APR float

    declare @months int

    declare @pmt money

    set @pv=106344;

    set @fv=75960;

    set @nper=36;

    set @months=12;

    set @APR=.074;

    select (@PV-@FV)/@NPER ...

  • RE: Bad Performance on SQL 2005 compared to SQL 2000

    berto (4/15/2008)


    Of course testing is urgent but you can't check everything and it will be enough that there will be 1-2 such queries and you end in with 100 %...

  • RE: view tsql

    15 correlated sub-queries will do that (kill performance).

    Use the CASE syntax like Chirag pointed out. Looks something like this:

    SELECTNAME,

    Code,

    max(case when (AccMonth = 200801) then amount end) as...

  • RE: ROUND problem

    There's something flawed in your math -

    326.760000*1.105 = 361.070 is not true. 361.0698 is the actual number.

    You can't round "mid operations" unless you plan on introducing large...

  • RE: Subsitute of TO_CHAR in transact SQL???

    Jeff Moden (4/14/2008)


    Heh... I'm thinking "tie" and I'm thinking that, once again, only RegEx replace beats T-SQL... you sure it can't be done using some magic RegEx replace?

    And, by the...

  • RE: Slow clustered index seek?

    I'm going to pretend I didn't see SSN and TaxID being transmitted in the "open" to user queries...(I'm sure your doctors will appreciate having that broadcast...:)). Is that...

  • RE: Subsitute of TO_CHAR in transact SQL???

    I knew I was tired....forgot to flag the CLR function as deterministic....that shaves 3 secs or so off of the execution time.

    --CLR without the Deterministic flag

    SQL Server Execution Times:

    ...

  • RE: String concatenation as a procedure variable

    I'm thinking xml_preparedocument doesn't want a formula as one of its parameters. You need to do the concatenation first.

    As in - try this:

    declare @xmlfull avrhcar(4000)

    Set @xmlfull='''' + @xml_0 +...

  • RE: Find Port Number in SQL Server 2005

    Marios Philippopoulos (4/12/2008)


    Thanks guys!

    I have been able to locate the following path in the registry, but there is no "port" entry under there:

    Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer\SuperSocketNetLib\Tcp\

    I wonder if I'm looking in...

Viewing 15 posts - 3,646 through 3,660 (of 6,486 total)