Forum Replies Created

Viewing 15 posts - 76 through 90 (of 131 total)

  • RE: EXECUTE SQL Task Keeps Hanging

    Here is a bit more of an update....

    First, you can get errors in SSIS that would not fail in SQL Server (in this case, when Ignore_dups is set on)........

    Argue for your limitations, and sure enough they're yours (Richard Bach, Illusions)

  • RE: getting date in descending order in Sql server 2005

    Not that I am trying to take over someone's elses post, but here was the example query I was using:

    SELECT CONVERT(varchar,Invoicedate,101) as PostedDate ----- Group by date as there...

    Argue for your limitations, and sure enough they're yours (Richard Bach, Illusions)

  • RE: getting date in descending order in Sql server 2005

    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...

    Argue for your limitations, and sure enough they're yours (Richard Bach, Illusions)

  • RE: getting date in descending order in Sql server 2005

    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...

    Argue for your limitations, and sure enough they're yours (Richard Bach, Illusions)

  • RE: get_sid and sp_ms_marksystemobject: Question on how to register/use properly?

    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...

    Argue for your limitations, and sure enough they're yours (Richard Bach, Illusions)

  • RE: User Name versus Login Name

    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...

    Argue for your limitations, and sure enough they're yours (Richard Bach, Illusions)

  • RE: EXECUTE SQL Task Keeps Hanging

    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...

    Argue for your limitations, and sure enough they're yours (Richard Bach, Illusions)

  • RE: Comparing Table Variables with Temporary Tables

    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...

    Argue for your limitations, and sure enough they're yours (Richard Bach, Illusions)

  • RE: Questions on EXECUTE AS

    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...

    Argue for your limitations, and sure enough they're yours (Richard Bach, Illusions)

  • RE: script login mappings

    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...

    Argue for your limitations, and sure enough they're yours (Richard Bach, Illusions)

  • RE: can't get count() to work for group by select with min and max

    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...

    Argue for your limitations, and sure enough they're yours (Richard Bach, Illusions)

  • RE: Calculate 3 week average

    For my example data, the final result would look as follows:

    ArchivedDate 3 Week Average

    3/18/200933,573

    4/7/2009 ...

    Argue for your limitations, and sure enough they're yours (Richard Bach, Illusions)

  • RE: Calculate 3 week average

    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...

    Argue for your limitations, and sure enough they're yours (Richard Bach, Illusions)

  • RE: The update statement only updates the first occurance

    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),...

    Argue for your limitations, and sure enough they're yours (Richard Bach, Illusions)

  • RE: The update statement only updates the first occurance

    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...

    Argue for your limitations, and sure enough they're yours (Richard Bach, Illusions)

Viewing 15 posts - 76 through 90 (of 131 total)