important question

01/12/2010 19:10 l2zeo#1
All question solution completions !!;)
01/12/2010 20:29 daddycool.#2
For first question,
Yes, cuz the function responsible for that is on the Database (Character to be more exactly), so if you restore the old databases you get this error.
01/12/2010 20:43 l2zeo#3
Quote:
Originally Posted by Darth Nerd View Post
For first question,
Yes, cuz the function responsible for that is on the Database (Character to be more exactly), so if you restore the old databases you get this error.
is it error of function part?
are you bug of sql2000?
:(
01/12/2010 20:50 xfactorbowler#4
its not a bug everyone got this error the minute we rolled over to 2010
01/12/2010 20:57 daddycool.#5
This error is caused by a bug in the function, FN_BinDateToDateTime, where can be found at the database Character/User Defined Functions. So, you need to adapt the function to accept decades. I have managed how, but i need to do more tests.

Edit #1
Here is what i have made...

Code:
USE [Character]
GO

/****** Object:  UserDefinedFunction [dbo].[FN_BinDateToDateTime]    Script Date: 01/10/2010 19:35:14 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO




/******************************************************************************
   이  름 : dbo.FN_BinDateToDateTime
   설  명 : Binary Date를 DateTime 형식으로 반환한다.
   반환값 : 
   수정내역:
   Ver        Date        Author           Description
   ---------  ----------  ---------------  ------------------------------------
   1.0        2006-05-05  Han Ji Wook      1. 초기생성
  ******************************************************************************/
ALTER  FUNCTION [dbo].[FN_BinDateToDateTime] (
	@i_bin_time	binary(4)
) RETURNS datetime
AS
BEGIN
	DECLARE @v_datetime	datetime
	DECLARE @v_strAux varchar(20)
	DECLARE @v_strtime	varchar(20)
	SET @v_strAux = CAST(CAST(@i_bin_time as int) as varchar(20))
	IF len(@v_strAux) = 7	
		SELECT	@v_strtime	= '20100' + CAST(CAST(@i_bin_time as int) as varchar(20))
	ELSE
		IF len(@v_strAux) = 8 
			SELECT	@v_strtime	= '2010' + CAST(CAST(@i_bin_time as int) as varchar(20))
		ELSE
				SELECT	@v_strtime	= '200' + CAST(CAST(@i_bin_time as int) as varchar(20))

	
	SELECT	@v_strtime	= SUBSTRING(@v_strtime,1,4)
						+'-'+SUBSTRING(@v_strtime,5,2)
						+'-'+SUBSTRING(@v_strtime,7,2)
						+' '+SUBSTRING(@v_strtime,9,2)
						+':'+SUBSTRING(@v_strtime,11,2)	
	SELECT	@v_datetime = CAST(@v_strtime as datetime)
	RETURN @v_datetime
END
Good luck to all... i don't see any advantage in keep knowledgement safe... so share yours knowledgement too.
01/12/2010 21:06 EliteWarrior#6
im running sql 2005 atm ,i might try youre sql query dath nerd ill let u know what the outcome is.
01/12/2010 23:17 *JayKay*#7
congratulations guy happy now siege woeked