Forum Replies Created

Viewing 15 posts - 6,241 through 6,255 (of 6,486 total)

  • RE: Active/Active Clustering

    Well - we're now talking about two distinct concepts: High availability and "load balancing". In many ways - the two have opposing priorities, so talking about them as if they...

  • RE: Aggregate function

    derived table is the name of the game.

    select e.empid, e.empname, e.salary, da.avgsalary, e.deptid

    from

    edtl inner join

    (select deptid, avg(salary) as avgsalary from edtl group by deptid) da

    on e.deptid=da.deptid

    where e.salary<da.avgsalary

  • RE: ODBC Sql link in excel on vista wont update

    You want to look into what protocols are enabled on the SQL server, and set up the client Network Utility for SQL to match on the new Vista machine. ...

  • RE: Free Training

    I'd be curious to know if they would have had better response if they were ask to pay something. There's a HUGE bias against anything "free" (based no doubt...

  • RE: Active/Active Clustering

    ...well - they DO talk about the concept of setting up "Federated Databases", so as to partition load across multiple SQL servers. Not automated, and does take a fair...

  • RE: Time and day of week (BETWEEN) question

    You can use these for your filtering parameters. Not that this makes a HUGE assumption that no call is ever >24 hours (which you seem to be making, since...

  • RE: using Datediff function between Rows

    A Join will work a LOT better than a correlated sub-query.  If you have a reasonable sized table you'd see a difference trying to run this:

    select d1.Id, d1.theDate,

    isnull(datediff(hour, d2.theDate, d1.thedate),0)

    from...

  • RE: hostel reservation system

    Select s.sessionnumber, sum(datediff(dd,s.startdate,s.enddate)*a.rate) as TotalOwed,

    min(isnull(p.totpaid, 0)) as TotalPaid, sum(datediff(dd,s.startdate,s.enddate)*a.rate)-min(isnull(p.totpaid, 0)) as Balance

    from sessions s inner join accounts a on s.sessionnumber=a.sessionnumber

    left join (select sessionnumber, sum(amountpaid) Totpaid from payments group by sessionnumber) p

    on...

  • RE: Problem in Query

    Ahmad -

    I can't tell what the actual question/issue is.  There simply isn't enough info to tell.  Are you looking to have the values on the same line?  It would...

  • RE: Decimal hours / Decimal places

    By the way - if you should simply flip the CASE syntax around so that you can express it as an IN as opposed to a NOT IN, it actually...

  • RE: Need help in adding Percentage column

    Understood Lynn - I noticed OP had calculation backwards.  I should have specified WHO the comment was directed at.  I haven't figured out the quote thingie in the new version...

  • RE: Need help in adding Percentage column

    For what it's worth - that's the INVERSE of a percentage.

    Percent of total = group total/Grand total (NOT Grand total/Group Total).

    Might as well save you the pain before an accounting...

  • RE: Failure Attaching MSSQL 2000 Database

    Try creating a DB of the same name, with empty files in the same places, etc...

    Shut SQL down and replace the new files with the corrupted ones.  Start SQL,...

  • RE: Help with TSQL, getting StartDate and EndDate from WeekDate !!!

    This should give you correct results, but won't be the fastest thing on the planet on your large dataset. 

    Indexing could help quite a bit, and/or a computed column with...

  • RE: add summary row to the pivot table

    Performance-wise, you might care to revert back to the "case" syntax for creating your pivot table (i.e. the SQL 2000 "way" for pivoting tables) and adding in the WITH ROLLUP option...

Viewing 15 posts - 6,241 through 6,255 (of 6,486 total)