Forum Replies Created

Viewing 15 posts - 1,726 through 1,740 (of 1,838 total)

  • RE: Need help creating a view

    OK, maybe I misunderstood ItemNo before. The problem is you'll need to SUM each of those values separately since they are not related. Maybe something with subqueries like:

    select...

  • RE: Need help creating a view

    You're getting the PackedQty = 2, because there are 2 records in OrderHeader where GroupNo = 1, and each of those has a record in the OrderDetail table with ItemNo...

  • RE: sum PROBLEM

    It may help to have a subquery in your FROM clause to do the summing:

    ...

    FROM

    (SELECT psid.SHIP_TO_CUST_ID,

    SUM(psid.QTY_SHIPPED) SHIPPING_QTY,

    SUM(psid.QTY_SHIPPED * psiiu.SHIPPING_VOLUME) SHIPPING_VOLUME

    ...

  • RE: Data View

    I'm thinking this will work better as a table valued function rather than a view, since you'll probably want to be reporting on different dates. Maybe something like this...

  • RE: My maintenance plan - ok?

    You mentioned that you have 12 databases with the largest being 3 Gig. Were you expecting these to grow much larger, say 10 times as big? How long...

  • RE: Move indexes back to primary file

    Here's a script that will create the script to move your nonclustered indexes back to Primary, at least for simple ones that only have one column. You may have...

  • RE: VARCHAR datatype

    Ugh, OK I think it depends on the setting of large value types out of row for the table, and digging into it deeper, it looks like the default is...

  • RE: Understanding of Partitioning, Primary Key and Foreign Key

    OK sorry, you're right. I misunderstood the nature of the problem.

  • RE: Return all rows where one is a match

    Subqueries with IN and EXISTS serve slightly different purposes. For this situation, an EXISTS subquery would be a correlated subquery, and the IN subquery would not have to be.

  • RE: A different Distinct Query

    D'oh! this isn't the first time I've given someone a 2005 solution to a 2000 problem, sorry about that.

  • RE: Midnight Date Function

    Gary Johnson (10/10/2008)


    It would be interesting to see what performed better. 😉

    Actually the DateAdd/DateDiff method seems to perform slightly better (like 6 milliseconds better over 25,000 rows) than convert to...

  • RE: Heap Table Consuming More Than 60% of SQL Server 2005 Buffer Cache

    I'd say you're on the right idea that the queries on heap tables are causing numerous pages to be loaded because the records can be so spread out. Depending...

  • RE: regarding full text catalog

    You'd probably be able to get better and more detailed answers on this from Microsoft's website itself:

    http://msdn.microsoft.com/en-us/library/ms203721(SQL.90).aspx

    Esentially it's a mechanism to allow queries that can find a word or word...

  • RE: A database design question

    meichner (10/10/2008)


    ...Since I know that I always have to have one Detail Item for each Master and that almost all of the time that there is only one Detail item,...

  • RE: trigger question

    I don't think it would make sense to do a transaction within the trigger, especially if it's just doing 1 UPDATE statement. What makes more sense is a transaction...

Viewing 15 posts - 1,726 through 1,740 (of 1,838 total)