Viewing 15 posts - 76 through 90 (of 129 total)
Unfortunately I do have to do all of those contortions as I am using CONVERT(varchar,InvoiceDate,101) in the SELECT statement and the GROUP BY. If I just try and use just...
January 11, 2010 at 7:42 am
I know that I had a similar problem with some of my reports... I would convert the date to a varchar to eliminate the time component, i.e., CONVERT(varchar,InvoiceDate,101) as InvoiceDate...
January 11, 2010 at 6:32 am
For anyone else researching the "sp_MS_marksystemobject", I found the following excerpt from Kalen Dalaney:
http://sqlblog.com/blogs/kalen_delaney/archive/2008/08/10/geek-city-system-objects.aspx
Kalen says:
...The objectproperty function has an argument called 'IsSystemTable', that will show you which tables...
December 15, 2009 at 12:38 pm
Thanks! 🙂
I was hoping the solution might be something simple. Here we go:
EXEC sp_msforeachDB 'USE ?; DECLARE @Name VARCHAR(30), @NewName VARCHAR(30), @Statement varchar(1000);
SET @Name = ''Smith''; SET...
October 21, 2009 at 7:43 am
Ok... took about 40 hours to figure out the problem. Basically, the foreign key relationship between the table I was inserting to and the "parent" table were being violated (due...
October 6, 2009 at 2:02 pm
I ran some of the speed tests using the SQL code from the article and I do not see much difference in performance (time-wise) in the queries... but the logical...
September 23, 2009 at 2:15 pm
My experience with doing restores and permission problems with "EXECUTE AS" is where the database is coming from. If it is from a different server you have SID mismatch. Try...
July 31, 2009 at 9:19 am
There was a great script developed by Shivaram Challa, http://www.sqlservercentral.com/scripts/Administration/63841/, which I used to get a listing of all DBs (i.e., mappings) for a individual user.
You can then use...
July 31, 2009 at 8:09 am
I do not believe you can do a count on an aggregate function, i.e, COUNT(MIN(si)). I believe the data would have to be broken up into seperate results then a...
June 19, 2009 at 11:47 am
For my example data, the final result would look as follows:
ArchivedDate 3 Week Average
3/18/200933,573
4/7/2009 ...
June 19, 2009 at 11:43 am
I was going to try to get the MAX(CONVERT(varchar,Archived,101)) as the Date and the 3-week average.
I could do this programmatically (either via cursor or cursor-less), but that is a...
June 19, 2009 at 11:37 am
The problem is you are doing a RIGHT OUTER JOIN on #temptable, so Incident_ID 101 will never get touched...
CREATE TABLE #temptable (Incident_ID int, [Name] varchar(4), Date varchar(10), NotifyDFS varchar(3),...
June 19, 2009 at 10:41 am
As a general rule, I typically will run the query as a SELECT statement to ensure the records being returned (or modified) are correct before converting the query to an...
June 19, 2009 at 9:55 am
Easy enough to generate the data... as for the "beginning" date, it would be a rolling three-month time period from todays date....
WHERE Archived > ''+GetDate()-90+''
DECLARE @Hist TABLE (Seq INT...
June 19, 2009 at 9:51 am
I would use the for each loop container,
http://www.sqlis.com/post/Looping-over-files-with-the-Foreach-Loop.aspx
then write a .NET script to parse out the filename.
I would then do a conversion of the file "number" into a...
March 6, 2009 at 1:49 pm
Viewing 15 posts - 76 through 90 (of 129 total)