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...
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.
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...
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...
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...
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...
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...
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...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.