Hi,

Aku ada masalah lain nih, mau minta tolong kasih masukan soalnya udah mumet nih 
kepala :((


Ceritanya aku manggil SP sp_date_after_clarify_close untuk return datetime 
value.

Problemnya, tiap kali SP itu aku run/compile, selalu dapat error 

Msg 257, Level 16, State 3, Procedure sp_date_after_clarify_close, Line 57
Implicit conversion from data type datetime to int is not allowed. Use the 
CONVERT function to run this query.



Problem nya itu aku perhatikan dibagian RETURN(...), kalau aku remark '--' 
hasil compile nya sukses. 

Kenapa ya? padahal @date_time = date_after_clarify_close = datetime type.

Thx sebelumnya.






----------------------------------------------------------------
Main Program


DECLARE @date_after_clarify_close datetime

EXEC @date_after_clarify_close=dbo.sp_date_after_clarify_close
                               @date_clarify_close,
                               @int_issue_id,
                               ''


-----------------------------------------------------------------

STORED PROCEDURE


set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go

ALTER PROCEDURE [dbo].[sp_date_after_clarify_close]
                 @date_clarify_close datetime,
                 @int_issue_id int,
                 @date_after_clarify_close datetime OUTPUT
AS
BEGIN
    SET NOCOUNT ON;

    DECLARE @date_temp datetime
    
    DECLARE cr_date_after_clarify_close CURSOR                         
    FOR
    SELECT date_response
    FROM responses
    WHERE issue_id = @int_issue_id
    ORDER BY date_response

    OPEN cr_date_after_clarify_close
    
    FETCH NEXT FROM cr_date_after_clarify_close into @date_temp

    WHILE @@FETCH_STATUS = 0
    BEGIN

         IF @date_temp = @date_clarify_close
            BEGIN
               FETCH NEXT FROM cr_date_after_clarify_close into @date_temp
        
               SET @date_after_clarify_close = @date_temp      
            END
         ELSE         
            FETCH NEXT FROM cr_date_after_clarify_close into @date_temp

    END

    CLOSE cr_date_after_clarify_close 

    DEALLOCATE cr_date_after_clarify_close

    RETURN (@date_after_clarify_close) ---> Suspect issue disini, karena kalo 
aku remark '--', run/compile nya jalan mulus.

END

--------------------------------------------------------------------


Msg 257, Level 16, State 3, Procedure sp_date_after_clarify_close, Line 57
Implicit conversion from data type datetime to int is not allowed. Use the 
CONVERT function to run this query.



[Non-text portions of this message have been removed]


------------------------------------

-- 
www.itcenter.or.id - Komunitas Teknologi Informasi Indonesia 
Gabung, Keluar, Mode Kirim : [EMAIL PROTECTED] 

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ITCENTER/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ITCENTER/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Kirim email ke