Forum Replies Created

Viewing 15 posts - 1 through 15 (of 196 total)

  • RE: Adjusting Budget Balances

    Without more information (like DDL for the table) the best we can do is give you an algorithm.  If (big if) you have some means of idnetifying the sequence of...

  • RE: Cursor needed to relate different records?

    Mark,

    It would be much easier to assist if we can see the actual table you are working with.  Maybe not the entire table, but at least the columns you are...

  • RE: Ranking in tsql

    <<< edited to include the proper order by clause >>>

    This may do something like you are asking for...

    create

    table tblTestSalary (

  • RE: Shortest Path Algorithm

    At the risk of sounding like an academic, are you sure you are using the right tool to solve the problem?  Or phrased differently, are you using a hammer to turn...

  • RE: The 400,000 Member Milestone

    Thanks all for the opportunity to spend time in the community.  I learn more from every post I answer.

    So, just out of curiosity, what...

  • RE: SELECT help

    G'day,

    This is one of the rare cases where a cross join makes sense.  Be careful if you use this solution in a real production situation.  Performance may demand a slightly...

  • RE: 3rd party db compare and synch tools

    I have used SqlDIFF by AdeptSql for a few years now.  I have used all of the other tools mentioned so far, and like SqlDiff in terms of feature set...

  • RE: Looking for "search" advice

    G'day,

    Your best bet may be avoiding the problem rather than solving it.  Simply place two buttons on the search form - "Quick Search" which does the full text currently implemented,...

  • RE: Horizontal Calculations

    Hi Brian,

    You will get a better answer if you post DDL for the table, as well as some sample data and expected results.  Without that, a simple method might be...

  • RE: Parsing this String?

    G'day all,

    The following code assumes a particular pattern for the string.  Specifically, a space before the ';' as our example shows.  A bit of tweaking will make this a more...

  • RE: Dynamic SQL

    G'Day,

    This might work...

    CREATE TABLE ApptFields (

    ColumnName VARCHAR(25),

    IsAvailable INT

    )

    GO

    INSERT INTO ApptFields (ColumnName, IsAvailable)

    SELECT 'Referral', 1 UNION ALL

    SELECT 'Balance', 1 UNION ALL

    SELECT 'Remark', 0 UNION ALL

    SELECT 'Home', 0 UNION ALL

    SELECT 'DOB',...

  • RE: US states and adjacent states

    Another thought that will save you some work...  Or maybe make your life harder. 

    This sort of table is typically used for path traversal...

  • RE: use cursor or what?

    G'Day,

    Here is an example that uses coalesce and does not use cursors.  This is an example to show you might approach the problem.  It is not a proper production grade...

  • RE: Calculate total and move to new Table

    G'day,

    create table Family (

    ID   int,

    Name   varchar(200),

    charges  int,

    payments  int,

    balance  int

    )

    go

    create table Billing (

    ID   int,

    Name   varchar(200),

    charge   int,

    payment  int

    )

    go

    UPDATE Family

       SET FAMILY.CHARGES = B.Charge

      FROM (SELECT ID,SUM(CHARGE) Charge FROM BILLING GROUP BY ID) B

     WHERE FAMILY.ID...

  • RE: New SQL Queries Are Coming To Town

    Wonderful thoughts Steve,

    But don't quit your day job yet in hopes of making a living as a poet... 

    Happy holidays all

    Wayne

Viewing 15 posts - 1 through 15 (of 196 total)