Forum Replies Created

Viewing 15 posts - 25,966 through 25,980 (of 26,487 total)

  • RE: GOING OUT OF MY FRIGGIN MIND!!!

    Could you post the code you are using for your INSERT INTO?  Also, where are you running it from and where is the original database?

  • RE: SQL Query

    Try this:

    declare @startdate datetime,

    @finishdate datetime

    select

        RM.fldPriorityCode as 'Priority',

        sum(case when datediff(day,RM.fldRequestDate,RM.fldComCanDate) <=5

            then 1

            else 0

        end) as 'Closed Calls 0-5 Days',

        sum(case when datediff(day,RM.fldRequestDate,RM.fldComCanDate) between 6 and 10

            then...

  • RE: Tricky Query - Help Please?

    Try this:

    select

        Case.CaseID,

        Borrower.BorrowerID

    from

        dbo.Case

        inner join dbo.Borrower on (Case.CaseID = Borrower.CaseID)

     

  • RE: 64-Bit SQL 2005 (Enterprise)

    It is my understanding that you can go either direction without any problems.

  • RE: Tdb log filling up

    Tempdb is used during query processing for sorts, joins, unions, etc.  If you have enough poorly written code and a number of users, it is possible that tempdb is getting...

  • RE: Newbie question

    Okay... You will need to elaborate on that one.  Not really sure what you are talking about regarding "forms".

  • RE: Newbie question

    Since you have a backup, just restore the database.  When you do that, the database will be in 2000 compatibility mode.  You will need to go into the properties and...

  • RE: Tdb log filling up

    After doing the above, restart SQL and then delete the original tempdb data and log files, as they will still exist in their original location.

  • RE: Returning Records

    Also depends on indexes as well.  If the datefield is indexed it should still run well, but I guess we'd have to find someone willing to test it on a...

  • RE: Returning Records

    Got beat, oh well!

  • RE: Returning Records

    Or you can try this:

    select

        a.dtDate,

        datediff(dd,(select min(b.dtDate) from dbo.testtbl b where b.dtDate <= a.dtDate), a.dtDate) as AccumTime,

        datediff(dd,isnull((select max(c.dtDate) from dbo.testtbl c where c.dtDate < a.dtDate), a.dtDate), a.dtDate) as...

  • RE: Query Problem Column to string

    Why do you need the result returned as a comma seperated list?

  • RE: Can the agent be running while the server is Stopped

    No, SQL Server Agent can not be running while SQL Server is stopped.  It would be unable to access the msdb database.

     

  • RE: BUILD Dynamic SQL STING

    You don't need a cursor:

    declare @SQLString varchar(max)

    select @SQLString = isnull(@SQLString,'') + Column1 + ',' from myTable

    set @SQLString = substring(@SQLString, 1, len(@SQLString) - 1)

    select @SQLString

     

  • RE: SQL Server memory and Log questions

    I can help answer part of your questions, mainly question 2.

    The transaction log is not truncated by either full or differential backups.  To truncate the transaction log, you need to...

Viewing 15 posts - 25,966 through 25,980 (of 26,487 total)