Forum Replies Created

Viewing 15 posts - 46 through 60 (of 1,047 total)

  • RE: Error handling

    can someone tell me why I am getting this error:

    Conversion from string "INSERT INTO DATALOAD_ERROR_LOG(E" to type 'Double' is not valid.

    Both columns EL_ErrorCode,EL_ErrorDescription are of datatype nvarchar(1000)

  • RE: Error handling

    But I have to insert in sql table only...

    I am getting error in my code below:

    Public Sub Main()

    Dim iErrorCode As Integer =...

  • RE: Error handling

    I tried in this manner but its not working..............

    Public Sub Main()

    Dim iErrorCode As Integer = _

    ...

  • RE: Choose Datatype for PK

    Koen Verbeeck (2/11/2014)


    kapil_kk (2/11/2014)


    Koen Verbeeck (2/11/2014)


    You are getting performance issues because the PK is an identity?

    The primary key is already unique, so adding extra columns doesn't make it more unique.

    It...

  • RE: Choose Datatype for PK

    Koen Verbeeck (2/11/2014)


    You are getting performance issues because the PK is an identity?

    The primary key is already unique, so adding extra columns doesn't make it more unique.

    It seems you are...

  • RE: Choose Datatype for PK

    Koen Verbeeck (2/11/2014)


    kapil_kk (2/11/2014)


    Koen Verbeeck (2/11/2014)


    How can a single column be a composite key?

    There is anthor columns also...

    there is an Identity column which is currently defined as PK so I...

  • RE: Choose Datatype for PK

    Koen Verbeeck (2/11/2014)


    How can a single column be a composite key?

    There is anthor columns also...

    there is an Identity column which is currently defined as PK so I want to add...

  • RE: SQL Query

    ChrisM@Work (2/10/2014)


    kapil_kk (2/10/2014)


    ChrisM@Work (2/10/2014)


    balu.arunkumar (2/10/2014)


    Hi This part shows error.

    /*------------------------

    SELECT*, SUM( Price ) OVER( Partition BY Customer_Name ORDER BY DatePurchased) AS Total_Till_Date

    FROM#sample where Customer_Name='A'

    ------------------------*/

    Msg 102, Level 15, State 1, Line 1

    Incorrect...

  • RE: SQL Query

    ChrisM@Work (2/10/2014)


    balu.arunkumar (2/10/2014)


    Hi This part shows error.

    /*------------------------

    SELECT*, SUM( Price ) OVER( Partition BY Customer_Name ORDER BY DatePurchased) AS Total_Till_Date

    FROM#sample where Customer_Name='A'

    ------------------------*/

    Msg 102, Level 15, State 1, Line 1

    Incorrect syntax near...

  • RE: SQL Query

    hi TRY THIS ONE:

    ;with cte as

    (

    select CUSTOMER_NAME, SUM(PRICE) AS TOTAL_PRICE , max(DATEPURCHASED)DATEPURCHASED, ROW_NUMBER() OVER (PARTITION BY CUSTOMER_NAME ORDER BY CUSTOMER_NAME) RN

    FROM #SAMPLE

    GROUP BY CUSTOMER_NAME

    HAVING SUM(PRICE) > 1000

    )

    SELECT

    DISTINCT S.CUSTOMER_NAME, C.TOTAL_PRICE,...

  • RE: Query with most expensive CPU usage

    you can also try this:

    select top 10 er.session_id, db.name as DBName,

    blocking_session_id,

    substring(st.text,(er.statement_start_offset/2) + 1,

    ((case statement_end_offset when -1 then datalength(st.text)

    else er.statement_end_offset end - er.statement_start_offset)/2) + 1) as statement_text ,

    cpu_time,

    total_elapsed_time,

    reads,writes,logical_reads,

    objectid

    session_id,

    status

    ,command,

    er.database_id,

    wait_type,wait_time,

    last_wait_type

    ,text

    from sys.dm_exec_requests er...

  • RE: variable Scoping

    Koen Verbeeck (2/7/2014)


    Maybe because you switched values in your example.

    ohhh I typed incorrectly here... but after make correction also its not working

  • RE: Need help with merge

    ChrisM@Work (1/30/2014)


    Can you post up some sample data, Kapil? Showing multiple rows per key? Obfuscate if necessary, but it really would be very useful to see it.

    I already posted a...

  • RE: Need help with merge

    ChrisM@Work (1/30/2014)


    Let's say you have a "dupe pair" of rows in your source table - dupes on the basis of a unique key on one or more columns.

    Does it...

  • RE: Need help with merge

    ChrisM@Work (1/30/2014)


    MERGE #temp T

    Is the table #temp always empty before you start the upsert?

    No it will not empty..

Viewing 15 posts - 46 through 60 (of 1,047 total)