Forum Replies Created

Viewing 15 posts - 226 through 240 (of 1,124 total)

  • RE: change collation field

    Don't worry, you wont lose any data if you change the collation. But since this behaviour hasn't been documented very well, I suggest you take the backup of...

  • RE: Is it possible to add more totals to the following PIVOT ?

    One way I can think of now is to do a UNION ALL of "YTD".

    ; WITH TestCalls

    AS

    (

    SELECTDATEADD( MONTH, DATEDIFF( MONTH, 0, createDate ), 0 ) AS MonthDate, [status],

    COUNT( * )...

  • RE: PIVOT operator

    WHERE Clause should be applied to the inner derived query of the dynamic select.

    DECLARE @PivotedColumnSQL VARCHAR(MAX),

    @sql NVARCHAR(MAX),

    ...

  • RE: Export/Import of Text fields using CSV Files

    Phil Parkin (5/12/2009)


    Ramesh (5/12/2009)


    In this case, "CleanLine" is indeed a DT_WSTR with 4000 max. characters, but I assumed:-) that you understood that "CleanLine" needs to be reversed to TEXT data...

  • RE: Query Timeout

    too_sweeeeeeeet (5/12/2009)


    I have a function that contains the following query which is always timimig out.

    select distinct @Result = sum( column1 )

    from table (nolock)

    where ((column2 = @param1) or (@param1 = 0))

    If...

  • RE: change collation field

    To change the collation of a column which is a part of an INDEX, your have to re-create the INDEX(es)

    IF ( OBJECT_ID( 'tempdb..#test' ) IS NOT NULL )

    DROP TABLE #test

    CREATE...

  • RE: Export/Import of Text fields using CSV Files

    Phil Parkin (5/11/2009)


    Hi guys - I bet you thought that this was all over? :hehe:

    I tried out Ramesh's code and have a follow-up question: what is the data type of...

  • RE: Stored procedure encrypted

    There are many free tools available in the market that can easily decrypt any of the encrypted objects.

    http://www.lmgtfy.com/?q=decrypt+procedure+in+sql+server+2005

  • RE: Export/Import of Text fields using CSV Files

    Phil Parkin (5/11/2009)


    Wow, some cool stuff there! Is there a limit on the total number of characters that ConvertBlobToString() can process and return?

    I guess the limit of String data type...

  • RE: Export/Import of Text fields using CSV Files

    I overcome this issue by converting the text column back to string and then doing the replace in SSIS Script component.

    Here is that script:

    Imports System

    Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper

    Imports Microsoft.SqlServer.Dts.Runtime.Wrapper

    Public Class ScriptMain Inherits...

  • RE: How to run data flow task parallel

    If the multiple data flows are not inter-connected with each other then the tasks will execute in parallel provided that you set the package property "MaxConcurrentExecutables" to an value higher...

  • RE: Best Option

    ningaraju.n (5/11/2009)


    Hi,Ramesh ..... May I know the reason for the Improvance of performance of your Query Over my Query....

    I am keen to know ....

    Its because of the four ROW_NUMBER()...

  • RE: How to get data in multiple columns into a single column

    You don't need a PIVOT but an UNPIVOT method.

    IF ( OBJECT_ID( 'tempdb..#test' ) IS NOT NULL )

    DROP TABLE #test

    CREATE TABLE #test

    (

    id INT NOT NULL IDENTITY(1,1) PRIMARY KEY CLUSTERED,

    col1 VARCHAR(10)...

  • RE: Best Option

    You are welcome, and I am glad I could help you.

  • RE: Best Option

    This performs better than the current solution

    set nocount on

    DECLARE @Table TABLE

    (

    SubmissionId INT,

    AssessmentId INT,

    AttemptNo INT,

    ObtainedMarks INT,

    Attempteddate DATETIME,

    Prefernce TINYINT -- 1 - Hihest Score,2- LowestScore ,3- FirstAttempt,4- LastAttempt,5 -Avg

    )

    --INSERT INTO...

Viewing 15 posts - 226 through 240 (of 1,124 total)