Forum Replies Created

Viewing 15 posts - 91 through 105 (of 131 total)

  • RE: Calculate 3 week average

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

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

  • RE: ssis filename

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

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

  • RE: Pass System.Object to SendMail Message Body

    From the research I have done so far, the answer appears to be no, it cannot be done.

    You cannot simply try to cast the system.object variable into a string...

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

  • RE: Index Types and Primary Keys versus Space Used

    I did finally find some information in BOL (Creating Nonclustered Indexes) which helps explain things for me. For the benefit of people who do not know what a "heap" is...

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

  • RE: Inner and Outer Loop to add count to existing table data

    Jeff,

    Good question. First, the problem was the Invoice Total (a seperate record in the file we receive) did not always match the sum of the charge(s) (sum was sometimes...

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

  • RE: Inner and Outer Loop to add count to existing table data

    Oh... oh.... now why did I not think about that! I use the Row_Number() function in other SQL statements... never thought about it in this case. Another case of posting...

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

  • RE: Inner and Outer Loop to add count to existing table data

    Thinking about it some more, we came up with a solution that might be a bit faster... instead of doing an update for ever record (processing row by row may...

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

  • RE: sp_msforeachdb not processing each DB

    Alan,

    Yes... I was just getting to resort to an older, cursor method for going through all of the databases when I decided to give it one more try.

    1)...

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

  • RE: sp_msforeachdb not processing each DB

    I tried both SA and "windows authentication", both of which have full permissions in in the SQL Server Express instance and access to all of the databases.

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

  • RE: sp_msforeachdb not processing each DB

    Nope... putting the [] in did not help retrieve any more databases with without the [].

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

  • RE: @@servername ????????? empty output

    Thanks for the suggestion about using EXEC sp_dropserver 'yourServerName,'droplogins'.

    We were just trying to use EXEC sp_dropserver 'yourServerName without the droplogins directive and received errors about a linked server (another...

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

  • RE: Capturing TableName MonYY Name

    Please ignore the CODE GOES HERE comments... I use templates when I create some of these scripts. 😉

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

  • RE: Capturing TableName MonYY Name

    Hmmm.... no matter what I did, I could not get the WHERE clause to use the DATEDIFF function without getting a conversion error message.

    I re-did the process... here it...

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

  • RE: WildCard Expression

    Thanks for the suggestions all! 🙂

    Doing a replace would not work, as any occurrences such as 0901 would become 9 1 (char data). But doing WHERE CAST(ActualTime AS INT) <>...

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

  • RE: IF NOT EXISTS and Create Function Statement

    IF NOT EXISTS

    (

    SELECT *

    FROM SYS.OBJECTS

    WHERE TYPE = 'FN'

    AND

    NAME = 'GETMONTHEND'

    )

    EXEC sp_executesql @Statement = N'CREATE FUNCTION GETMONTHEND(@DATE DATETIME)

    RETURNS DATETIME

    ...

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

Viewing 15 posts - 91 through 105 (of 131 total)