Forum Replies Created

Viewing 15 posts - 31 through 45 (of 92 total)

  • RE: Selecting max date

    Try taking BRenteredDate out of your GROUP BY.

    SELECT MAX(BRenteredDate), BRid, BRclientOfficeID, BRbillItemId

    FROM billrate GROUP BY BRid, BRclientOfficeID, BRbillItemId

  • RE: UPDATE Question

    You're right that Access is probably making the difference.  I have Access 2003 on my machine (hardly ever use it, though), so I was able to set up a quick...

  • RE: UPDATE Question

    This worked for me...

    UPDATE clean

    SET clean.branchid = branches.branchid

    FROM clean

    INNER JOIN branches

    ON clean.ppi = branches.ppi

    Perhaps you were doing the WHERE instead of the ON?

  • RE: get a percentage

    Ninja, that's a really awesome solution.  Better not to clutter everything up with CASTs.  One thing though... If you want the percentage in a whole number format, you'll have to...

  • RE: get a percentage

    If the two values are integers, it won't work because SQL returns a result of the same datatype as the data it's dividing.  If you want a decimal percentage, you'll...

  • RE: beginner sql - how to select a sum, but multiply that by another column

    I'm not really sure what you're trying to accomplish here... I imagine you're grouping by TraderName and multiplying the Sum of each TraderName's [Net P&L] values by which value of [Net P&L]?  All...

  • RE: DST

    I might be just missing something, but it looks to me like all the problems you are listing are one hour off, not 12.  Your 3/9 backup actually occurred on...

  • RE: Most tricky

    I had posted this in your other post in the 2005 forum just before you moved it:

    I would think you would just want to add an identity column and then...

  • RE: Most tricky

    I would think you would just want to add an identity column and then specify the columns you want to insert as follows:

    create table tab (id INT IDENTITY(1,1), [values] varchar(100))

    insert...

  • RE: Access Query to SQL

    I was going to give this a try, but admittedly, I don't know a whole lot about Access.  There's an article on pivot tables in Books Online that might help you. ...

  • RE: Missing data

    If you're using Query Analyzer, it's possible that your Maximum characters per column setting is set to display only 1015 characters.  Go to Tools -> Options -> Results tab and...

  • RE: Every monday in date range

    I made my query more efficient by only inserting the Mondays into the temporary date table in the first place...

    SET NOCOUNT ON

    DECLARE @DateTable TABLE ( ADate DATETIME )

    DECLARE @StartDate DATETIME

    DECLARE...

  • RE: Every monday in date range

    There's probably a better way to do this, but here's my solution...

    SET NOCOUNT ON

    DECLARE @DateTable TABLE ( ADate DATETIME )

    DECLARE @CurrentDate DATETIME

    SET @CurrentDate = '01/01/2007'

    WHILE @CurrentDate <= '02/13/2007'

    BEGIN

     INSERT INTO @DateTable

      SELECT...

  • RE: Help needed on update statement

    SET COST_PROJECT_PHASE.CONSTRUCTION_CONST = COST_PROJECT_PHASE_UNIFORMAT.UNIFORMAT_COST

  • RE: Help with Select Statement

    Never mind my previous post.  I created some makeshift tables to try to piece together a good solution for you, and I think this will give you what you want. ...

Viewing 15 posts - 31 through 45 (of 92 total)