Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. cwbrumett

    Is it possible to get average log backup size?

    found it ... for anyone else that reads this. SELECT CONVERT(CHAR(100), SERVERPROPERTY('Servername')) AS Server, msdb.dbo.backupset.database_name, msdb.dbo.backupset.backup_start_date, msdb.dbo.backupset.backup_finish_date, CASE msdb..backupset.type WHEN 'D' THEN...
  2. cwbrumett

    Is it possible to get average log backup size?

    I need to capture some database growth stats for a hardware purchase. I'm currently doing backup with weekly fulls, daily diffs, and t logs every 15 mins. I was thinking I could get an average of my t log backups to figure out future growth. thanks for any help.
  3. cwbrumett

    need help with a self join query

    that worked ... I knew there was a way ... I had to add the contactID join to the nested query to work correctly. thanks and here's a star select (select max(FeedRecID) from SAP_Feed where FeedRecID < t1.FeedRecID and PartnerId = t1.PartnerID) as PreviousRecId, FeedRecID, PartnerID from...
  4. cwbrumett

    need help with a self join query

    I'd still really like to see if not using a while is possible ... I'm sure it is.
  5. cwbrumett

    need help with a self join query

    I didn't want to resort to using a while .. but never could get it working without one ... this is how I did it if anyone cares. DECLARE @rCnt as int SET @rCnt = ( SELECT COUNT(A.rCnt) FROM ( SELECT COUNT( F.PartnerID ) as rCnt FROM SAP_Feed F LEFT JOIN SAP_UpdatesSetFlag U ON...
  6. cwbrumett

    need help with a self join query

    Thanks for the quick response That is returning nulls for all the occurrences of mrec. here is the actual code I plugged your query into (recID = FeedRecID and ContactID = PartnerID) Select sj.mrec, T1.FeedRecID, T1.PartnerID from SAP_Feed T1 left join (select max(FeedRecID) as mrec...
  7. cwbrumett

    need help with a self join query

    Basically I have a flat table that contains contact details AND order details (I didn't make it .. just inherited it) The pkey is a auto-incrementing field, what I need to do is get what the "previous" id is for a given contact, null if there was no preivous. sample data: RecID ContactID...
  8. cwbrumett

    using first occurrence of a found record in a join

    I've been working on this all day and just can't seem to figure it out, i'll try to explain the best i can. I have a table that holds price points by week, by year, by brand and sometimes by event. I have to join via left outer join as orders don't have to have to have a price point. the...
  9. cwbrumett

    search for text within jobs

    I just remembered you can script out all jobs to a file, just do that and search that file.
  10. cwbrumett

    search for text within jobs

    I was wondering if there was anyway to search all of the jobs for a table name (or any text for that matter). something similar to searching DTS via: http://www.sqlservercentral.com/Forums/Topic181665-8-1.aspx and searching Sprocs and views SELECT Distinct SO.Name, SO.Type FROM sysobjects...
  11. cwbrumett

    update problem when subquery returns multiple results

    AHHHHH! forgot to check for triggers! that was it, my brain has been fried all morning on why that wouldn't work. THANK YOU!
  12. cwbrumett

    update problem when subquery returns multiple results

    I'm having a weird problem, I'm trying to update a table where the pkey is InvItemNum and InvCompanyCode (on both tables) ... the problem is when I try to execute the below statement it returns the error Server: Msg 512, Level 16, State 1, Procedure trg_UpdateItem, Line 4 Subquery returned more...

Part and Inventory Search

Back
Top