Forum Replies Created

Viewing 15 posts - 16 through 30 (of 92 total)

  • RE: Sort Order - Include Null al last

    Steven Cameron (6/23/2008)


    When the question of the day is incorrect, everyone keeps posting the same thing over and over. Maybe we should have a standard reply form:

    -------------------------------------------------------------------------------

    I selected ...

  • RE: Sort Order - Include Null al last

    I was a bit hesitant to answer this one as I noticed there were checkboxes instead of radio buttons, and I thought to myself, "Hmmm... there's only one right answer,...

  • RE: How to loopthrough all tables in the databases

    Someone else will have to help you out with the specifics on truncating/specific maintenance, but here's some spaghetti code for looping through databases and tables...

    DECLARE @DBName varchar(128)

    DECLARE databases CURSOR FOR

     SELECT...

  • RE: SQL Query to join a column on a row

    I agree with sam.  This table design needs some help.  If you really must do what you're suggesting here, this is the only way I can think of, and I'm...

  • RE: Could not complete cursor operation because the table schema changed after the cursor was declared. [SQLSTATE 42000] (Error 16943). The step failed.

    I'm right with Kathi.  If any of the stored procs being called in the cursors (AB_FINANCIAL, AB_OVERDUE_BALANCES, or AB_RECONCILIATION) modify the table structure of either FilesInDirectory or INTERFACEFILENAMES, you'll get...

  • RE: Finding the Greatest

    Whoops, my bad...  That's what I get for not testing out my solutions beforehand.

    SELECT

    OuterQuery.ID

     , OuterQuery.School

     , ISNULL( OuterQuery.EndYear, '' )

     FROM #INSTITUTIONS_YEARS OuterQuery

      INNER JOIN

       ( SELECT ID, MAX( ISNULL(...

  • RE: Finding the Greatest

    You could try this replacing YourTableName in both places with your table name.

    SELECT OuterQuery.Id

     , OuterQuery.School

     , ISNULL( OuterQuery.EndYear, '' )

     FROM YourTableName OuterQuery

      INNER JOIN

       ( SELECT Id, MAX( ISNULL( EndYear, '' )  )

        FROM...

  • RE: UPDATE Question

    Resurrecting this thread from the dead because I have questions for you, Jeff.  It sounds like you're referring to a SQL Server solution here, but Ben was asking about Access. ...

  • RE: Converting Navigation to SP

    You might have to write an EXEC statement, but it looks like you're trying to do this from ASP.  I'm not completely familiar with doing this sort of thing in...

  • RE: Selecting max date

    Well, this changes everything.    Try this...

    SELECT COid, BIid, BRid, COofficeName, CMclientName, BRrate AS 'Client Rate',

    BIstandardRate AS 'Standard Rate', BIdescription

    FROM billrate A, clientoffice,...

  • RE: Selecting max date

    Without seeing the larger query, it's a bit hard to determine why you're getting that error.  Are you using an IN to introduce the subquery?

  • RE: Selecting max date

    Haha!  Not really.  It's just that I wrote a very similar query for someone else today over in this thread, and I figured I could just reuse it just...

  • RE: Selecting max date

    You have a good point, mrpolecat.  I'll bet that's the issue.  However, if Magy wants to keep BRid in the query, it complicates it quite a lot, but it is...

  • RE: group by help

    SELECT OuterQuery.mytable_pk, OuterQuery.col1, OuterQuery.goods, OuterQuery.maxval

     FROM mytable OuterQuery

      INNER JOIN

       ( SELECT goods, max(maxval) as maxval

        FROM mytable

        GROUP BY goods

        ) InnerQuery

       ON OuterQuery.goods = InnerQuery.goods

       AND OuterQuery.maxval = InnerQuery.maxval

  • RE: SUBSTRING Question

    In order for this to work, all the OrigCounty data must have the data exactly as you suspect... (County, State).  If you have a null or a blank or maybe...

Viewing 15 posts - 16 through 30 (of 92 total)