Forum Replies Created

Viewing 15 posts - 256 through 270 (of 907 total)

  • RE: need help averaging numbers.

    What tool are you using to submit your commands? I'm using QA, and if you don't provide a name for the record set (DERIVEDTBL) produced by "select top 3...

  • RE: need help averaging numbers.

    When you uses a SELECT statement in the from clause to create a record set you need to give the record set a name. Here is an example:

    select *...

  • RE: Streamlining the Database Server Recovery Process

    we use veritas software to copy transaction log, full and diff backups to tape. We do this nightly.

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my...

  • RE: Schduled Job not running

    The SQL Agent log file might have some clues. That log is can be found in the following default location c:\mssql\log\sqlagent.out, although on your install it might be somewhere...

  • RE: Schduled Job not running

    So what happens when you right click and select "Start Job"? Do you get an error? or What?

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my...

  • RE: Schduled Job not running

    try right clicking on the job, then selecting "View Job History". Then click the check box to "Show step details", then review the step that failed.

    Gregory Larsen, DBA

    If you...

  • RE: need help averaging numbers.

    That just associated a name, in this case "a" , with the record set return from the subquery (select top 4 ...). Without that you get an error.

    Gregory Larsen,...

  • RE: need help averaging numbers.

    Try something like this:

    select avg(minutes) average_minutes from

    (Select Top 4 DateDiff(n, [Sub Date],[Reply date]) as Minutes

    From SNFReportView Where ([SubDate] Is Not Null} and ([Reply date] Is Not Null) and (status...

  • RE: Date extracting

    Here is another alternative:

    select cast((convert(char(13),getdate(),120) + ':00:00.000') as datetime)

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples

  • RE: Need a good Internet Mail Server

    Thank you for all the comments. If anyone else has suggestions on a MAIL Server software, I'd like to hear from you. I plan to evaluate each of...

  • RE: Streamlining the Database Server Recovery Process

    My approach reads the system tables to determine where the backups are. Now if you move the backup files to another drive then this is not recorded in the...

  • RE: Running Sum

    SELECT

    Identity(BigInt, 1, 1) As Counter,

    '1' codes, [Values], 0 as RunningSum

    INTO #Tmp

    FROM ExTbl

    declare @x int

    select top 1 @x =...

  • RE: SQL query

    Try something like this:

    select name from

    (select top 10 a.name from

    (select top...

  • RE: Veritas SQL qgent restore

    Sounds like you are restoring every DBs on the server. If that is truely want you want to do, you need to first restore master in single user mode,...

  • RE: selecting/creating new row

    You might try something like this:

    create table testit (rowname char(10), rowvalue char(10))

    insert into testit values('TOT','errl')

    insert into testit values('TOT','errl')

    insert into testit values('TOT','err2')

    select * from testit

    insert into testit select 'Rcode','00001' from (select...

Viewing 15 posts - 256 through 270 (of 907 total)