Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)

  • RE: Select data but exclude Duplicates

    You may try the following code:

    select S1.intSiblingID,

     S1.intStudent1ID,

     S1.intStudent2ID

    from #stud S1 inner join #stud S2 on

     S1.intStudent1ID = S2.intStudent2ID

     and S1.intStudent2ID = S2.intStudent1ID

     and S1.intSiblingID < S2.intSiblingID

    order by S1.intSiblingID

    But it will work for those...

  • RE: Calculating a rolling total??

    Hi

    Hope, this will help:

    select T1.col1, 

     T1.col2,

     sum (T2.col2) as total

    from #Table T1 inner join #Table T2 on

     T1.col1 >= T2.col1

    group by T1.col1, T1.col2

    order by T1.col1

    Regards,

    Anna

  • RE: QA: Results to File

    Sorry, I asked about the command (text) to type in the script that would do the same as choosing the option from the menu or drop down box.

    I'd like to...

  • RE: How to expand @variables in SQL Statement

    Or you may also do it like this:

     

    create proc spListEmployees (@Active smallint = 0)
    as
    Declare @NoOfEmployee  integer
    
    select @NoOfEmployee = count(*) 
    from employee 
    where ((status in ('A')) and (@Active = 1)) 
     or...
  • RE: Question of the Day for 26 Feb 2004

    As for me, it was the first sentence which confused me: "Tonya needs to manage what user accounts can access the Accounting database.", which I interpreted as she needs not...

Viewing 5 posts - 1 through 5 (of 5 total)