Forum Replies Created

Viewing 15 posts - 61 through 75 (of 77 total)

  • RE: Slow-running SP

    Hi Chris,

    I decided to use table variables instead of temp tables, and that gave me a small performance increase, but the whole thing is still pretty slow. It's not...

  • RE: Dynamic Order By with two columns

    I got it to work by breaking all of the conditions down into individual statements, as follows:

    CASE WHEN @SortBy = 'S' THEN column1 END

    CASE WHEN @SortBy = 'L' THEN column3...

  • RE: Dynamic Order By with two columns

    John, CONCAT_NULL_YIELDS_NULL is set to false (according to the Properties window for the database).

    Ken, I'm getting some wierd results with your solution. When sorting by column1 and column2, the...

  • RE: Working with dates

    I fixed the problem. I had forgotten to surround a group of OR-qualified statements in parenthesis, which had an odd effect on the rest of the query. Thanks...

  • RE: Working with dates

    I can't really post that much information (it's not mine to post). The query involves inner joins on seven very large tables, and the query is very much as...

  • RE: Working with dates

    The problem must lie with another part of the query because when I isolate the date comparisons they appear to work correctly, but when run with the other criteria the...

  • RE: Group By errors

    Can you please give me an example involving temp tables?

  • RE: Group By errors

    I think so. So how are you supposed to manage the group by clause when you have to return so many rows? Is there another way to do...

  • RE: Group By errors

    The problem is with the result set (assuming that my group by clause exactly mirrors my select clause). When the group by is so large, it seems like it...

  • RE: Group By errors

    Hi Chris,

    This is essentially what I am attempting:

    SELECTs.PartNumber, s.PartName, s.Date, s.Qty, s.Price, sr.Reason, pc.Description, psc.Description, s.SID, p.NonInventory, p.Return, p.Stock

    FROMSales AS s, SaleReasons AS sr, PartClasses AS pc, PartSubClasses AS psc,...

  • RE: SELECT Statements with multiple sets of criteria

    @var2 is a cell in table A, but there could be several rows returned.  I think I got this working by nesting my selects and using IN as opposed to...

  • RE: Proper way to set up connection

    Hi Shaun,

     

    I'm using Sql Server Express, but I am using it to make a Sql Server 2000 compatible db.  I am also using VS 2005 to make the web app. ...

  • RE: Complex queries with multiple tables

    I've got it working.  Thanks for all the help.  It's appreciated.

  • RE: Complex queries with multiple tables

    I am pulling data from nine different tables.  It makes the select statement very cumbersome.  If I want to use a field in the WHERE clause, it must be included...

  • RE: Returning entire record from stored procedure

    Adding the length of the field did the trick.  I don't understand why that makes a difference, tho.  Can it only compare fields that defined as being the same size?

Viewing 15 posts - 61 through 75 (of 77 total)