You are here: Datatype-convertion in TSQL « MsSQL Server « IT news, forums, messages
Datatype-convertion in TSQL

Posted by Filips Benoit on 06/20/06 16:55

Dear all,

Tables: COMPANY: COM_ID, COM_NAME, .....
PROPERTY: PRP_ID, PRP_NAME, PRP_DATATYPE_ID, PRP_DEFAULT_VALUE
( nvarchar)
COMPANY_PROPERTY: CPROP_COM_ID, CPROP_PRP_ID, CPROP_VALUE
(nvarchar)

Use: Without adding new field the user can add new properties to the
companies just by adding a new property in table PROPERTY and mapping the
new property to a companie. CPRP_VALUE contains all kind of datatypes but is
stored as text.

Problem: when I query the database ( SP, views, etc) I have problems with
floats and date bacause in the interface ( Access2000.adp) :
> the float-format is 0,11 and in TSQL is 0.11
>the date-format is DD/MM/YYYY and in TSQL it is YYYY-MM-DD

Can I convert the data within the Stored Procedure for selecting and sorting
on those fields.

for example: How to sort on CPRP_VALUE containing floatvalues stored as
nvarchar ??

The client wants to stay with the comma-format because it is common-used
here.
The format can be TSQL-format in the resultset of a Stored Procedure without
changing the format in the database because this is used for the output to
the clients.

>>> Same problem with dates !!!

thanks,

Filip

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация