dbTalk Databases Forums  

Europe syntax for desimal

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss Europe syntax for desimal in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Kaitsu
 
Posts: n/a

Default Europe syntax for desimal - 03-18-2007 , 05:49 AM






What is the easiest way to solve "," problem

Fields A, B and C are float-values

INSERT INTO Table
(A, B, C)
VALUES (1,2,3)

This is ok, but. How can I insert values A=1,1 B=2,2 C=-11,123

This is not working

INSERT INTO Table
(A, B, C)
VALUES (1,1, 2,2 -11,123)



Reply With Quote
  #2  
Old   
Dan Guzman
 
Posts: n/a

Default Re: Europe syntax for desimal - 03-18-2007 , 10:13 AM






Quote:
This is ok, but. How can I insert values A=1,1 B=2,2 C=-11,123

This is not working

INSERT INTO Table
(A, B, C)
VALUES (1,1, 2,2 -11,123)
You need to specify a decimal point as the decimal separator in SQL
literals:

INSERT INTO Table
(A, B, C)
VALUES (1.1, 2.2, 11.123)


--
Hope this helps.

Dan Guzman
SQL Server MVP

"Kaitsu" <kaitsu (AT) luukku (DOT) com> wrote

Quote:
What is the easiest way to solve "," problem

Fields A, B and C are float-values

INSERT INTO Table
(A, B, C)
VALUES (1,2,3)

This is ok, but. How can I insert values A=1,1 B=2,2 C=-11,123

This is not working

INSERT INTO Table
(A, B, C)
VALUES (1,1, 2,2 -11,123)



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.