Forum Replies Created

Viewing 15 posts - 121 through 135 (of 1,216 total)

  • RE: Retrieving latest date from 2 fields in table

    Just a warning... The proposed solutions are probably OK in this case, where DateCreated of a row will never change (at least one can assume it). It wouldn't work if...

  • RE: Overlapping query help

    Hi,

    please read the info about posting data (link in previous reply) and post structure of table Reservations along with some test data and required result from the supplied test data....

  • RE: Included index

    IMHO the problem is not whether it 2 or 3 is correct, but what is the answer 3?

    If you read the "Sorry you were wrong" message, you!ll see that it...

  • RE: Which PK Generation system variable is reliable?

    Why does anyone impose such requirements as what must be coded in the primary key? In my opinion, this is not a good idea. I would go with IDENTITY column...

  • RE: Expressions based on data in the SELECT statement

    Actually, my first attempt could have been simpler - no grouping in the outer query is necessary, since the derived table c already handles that.

    I've removed it, and added column...

  • RE: Expressions based on data in the SELECT statement

    Hello,

    I've been looking at your sample data and it seems there is a slight mistake - Things table contains 3 rows, but 5 things appear in Captures table. Also, it...

  • RE: TOP N records

    Matt Miller (10/7/2008)

    select TOP (@rows) WITH TIES *

    From myTable

    ORDER BY CustomerID

    This will pull the first 2000 VALUES for customerID, and return any rows that match those.

    This is a little...

  • RE: Job processing all views in DB

    OK, now we know a bit more about how you want to use it, and I hope you'll get some assistance soon. I know almost nothing about replication, so I...

  • RE: Job processing all views in DB

    Yes, it is possible. You could do it for example using dynamic SQL.

    select * from sys.views

    select * from sys.tables

    will help you to find all missing tables. Once you have identified...

  • RE: I am not getting the o/p with procedure but getting with the same Query

    IF @iMenuId=NULL

    That's probably yout problem, along with other uses of = or <> or other standard comparision operators with NULL value. This only works with ANSI NULLS OFF, and...

  • RE: A different Distinct Query

    Alvin,

    that's not gonna work... the two MIN() are independent.

    If you have the same salary of 1000 in 12/2007 and 01/2008 (before and after that it was different), what will...

  • RE: A different Distinct Query

    When I first looked at Jacob's solution, I thought "what a nice solution". Unfortunately, it is simple, understandable and easily maintainable, but it works only in an ideal life where...

  • RE: SQL Query - join table

    Matt is right, using left join to derived table is better than correlated subquery. Unfotunately he has a typo in his post (ID and group by missing in the inner...

  • RE: combining multiple rows into one

    And now on a serious note... this is a bit scary for me:

    all columns from brand---subcategory need to be renamed and included/repeated for all items in a single purchase by...

  • RE: combining multiple rows into one

    Please, teacher, I know, I know :w00t:

    (sorry, I'm in a good mood today, so I couldn't miss the opportunity for a stupid joke 😛 )

Viewing 15 posts - 121 through 135 (of 1,216 total)