Showing posts with label defined. Show all posts
Showing posts with label defined. Show all posts

Monday, March 12, 2012

I can not insert CURRENT_TIMESTAMP into column type timestamp

I can not insert CURRENT_TIMESTAMP into column type timestamp

I defined a data Table that has column type timestamp.

I did not achieve insert CURRENT_TIMESTAMP data into column typed timestamp.

My statement is below.What is wrong with it? Thanks

set@.cmdS2 ='Insert Into TABLOLAR Values('+CHAR(39) + @.TABLO +CHAR(39) +','+CHAR(39) + @.TABLO_ACIKLAMASI +CHAR(39) +','+CHAR(39) +CURRENT_TIMESTAMP+CHAR(39) +','+CHAR(39) + @.KLLNC +CHAR(39) +')'

Hello my friend,

This is a common misconception. The timestamp type is not a date field, it is a binary reference. When you update any field in the record, the value of the timestamp field changes. It has its uses. For example, if I take a copy of your data, work on it and then wish to update your data with my changes, the first thing I would do is check that your timestamp value is the same as the one I have (the same as when I took it). If it is, I know it is safe to update your record. If not, then someone has changed the record at your end since I took a copy of it to work on so I do not update it. In your example that requires dates, just use a DATETIME or a SMALLDATETIME field.

Kind regards

Scotty

Friday, March 9, 2012

I am having a problem with percision which appears to be a documented bug is there a work around

I have been working on an application which require as much percision as we can get. We have defined all numeric values as (38,16) however when ever we divide a number by the result of a built in function it truncate the percision to 5 decimal place this cause us to have a small but enoying loss in the numbers being caculated we need a minimuim of 8 decimal places or better is there a work around or solution for this problem in sql server 2005. The more percision the better.

example: select tna/(select sum(tna) from taum) from taum where fund_id = 2345

the result is always 5 decimal places even though fund_id tna = 2569698.23 and sum(tna) =98745612325879.36 which should equal .00000002602341683313994 instead the result = .00000

if it is a reporducable bug use the product feedback center to report the bug:

http://connect.microsoft.com/Main/content/content.aspx?ContentID=2220

Otherwise you can use the SQL Server Data Access forum to ask your question

http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=87&SiteID=1

|||

Hi Caverman1,

It isn't bug. I resolve this issue in other thread.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=661591&SiteID=1

Good coding!

Javier Luna
http://guydotnetxmlwebservices.blogspot.com/

I am having a problem with percision which appears to be a documented bug is there a work ar

I have been working on an application which require as much percision as we can get. We have defined all numeric values as (38,16) however when ever we divide a number by the result of a built in function it truncate the percision to 5 decimal place this cause us to have a small but enoying loss in the numbers being caculated we need a minimuim of 8 decimal places or better is there a work around or solution for this problem in sql server 2005. The more percision the better.

example: select tna/(select sum(tna) from taum) from taum where fund_id = 2345

the result is always 5 decimal places even though fund_id tna = 2569698.23 and sum(tna) =98745612325879.36 which should equal .00000002602341683313994 instead the result = .00000

if it is a reporducable bug use the product feedback center to report the bug:

http://connect.microsoft.com/Main/content/content.aspx?ContentID=2220

Otherwise you can use the SQL Server Data Access forum to ask your question

http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=87&SiteID=1

|||

Hi Caverman1,

It isn't bug. I resolve this issue in other thread.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=661591&SiteID=1

Good coding!

Javier Luna
http://guydotnetxmlwebservices.blogspot.com/