Forum Replies Created

Viewing 15 posts - 181 through 195 (of 441 total)

  • RE: Need to Add year using Dateadd function

    r_prasanna82 (9/15/2009)


    Hi

    I tried the same but my bad its not working. It says substring does not support the data type DT_TIMESTAMP.

    I tried like

    (DB_DATE)(SUBSTRING(columnname, 6,4) + '-' + SUBSTRING(columnname, 4,2)...

  • RE: Need to Add year using Dateadd function

    You can use the Derived column transformation, and use a substring function with your date field.

    Something like this

    substring([DateString],1,6) + substring([DateString],9,2)

    Add it as a new column to check the output, and...

  • RE: Need to Add year using Dateadd function

    What I would do is add a derived column using only the 2 digits of the year.

    In example the dates 22/10/2005 or 22/10/0005 would be trimmed as 22/10/05.

    Then...

  • RE: Save Source Code with line breaks in Table

    Hi,

    I might be really out of bounds there, but.. have you considered using a Source manager like SourceSafe? Maybe I don't get your requirement correctly, but I find it a...

  • RE: Looking For optimized solution

    Hi,

    Can you post the chosen solutions, and why you chose it? We would certainly appreciate feedback from you, as well as others looking for the "Best" approved solution by you.

    Thanks...

  • RE: Easy multiply

    They have the same exact behavior, the parenthesis are optional around the equation, too. You could remove every parenthesis, and it would still do the same.

    P.S. Be sure the datatype...

  • RE: Looking For optimized solution

    Hi, I hope this helps, it reads the table only once...

    SELECT stage,

    sum(CASE

    WHEN UserID = @user-id

    AND CheckFlag IN (1)

    THEN...

  • RE: Trace a single session

    Filter by the SPID of the connection you are looking for in the Profiler.

  • RE: Is there tsql to change the server connection for Mgmt Studio?

    Flo,

    I will certainly look into this, this looks like a great opportunity for my bunch of servers to maintain.

    Thanks for the piece of script, it's really appreciated.

    Have a nice day,

  • RE: Is there tsql to change the server connection for Mgmt Studio?

    Florian Reischl (9/2/2009)


    Hi

    You can set your query window to SQLCMD mode (menu -> Query -> SQLCMD) and use the ":connect" method

    :connect MyServer1 -U MyUserName -P MyPwd

    SELECT @@SERVERNAME

    GO

    :connect MyServer2\MyInstance

    SELECT @@SERVERNAME

    Greets

    Flo

    Now that...

  • RE: Weird Conversion Problem

    Remove the convert to money from the code, to see the real total for those 1000 rows, it might be more than what a money field can hold?

  • RE: Calculate Groups based on date ranges (aka episodes of care)?

    Hi Peter, nice challenge you got there,

    Can you provide the data in a ready consumable format along with the table definition, I'll hop on this 1, and I bet I...

  • RE: BCP - SP returns multiple record set

    bcp will always take the first result set it finds in the stored procedure, you cannot overcome this.

    What you could do, is create 2 procedures, or append the outputs using...

  • RE: Send e-mail based on a condition

    Thanks a lot, you're right, the severity was not high enough (I tested with 2 departments this time, :-P)

    I will look into the parametrization of the error messaging, and how...

  • RE: Send e-mail based on a condition

    Hi John,

    First of all, thanks for your input, it has helped me discover a new facet of SSIS, the event handlers.

    I might a few questions regarding the usage of this...

Viewing 15 posts - 181 through 195 (of 441 total)