Showing posts with label instead. Show all posts
Showing posts with label instead. Show all posts

Friday, March 23, 2012

How can i populate sql server db with data in french ??

I'm trying to do it , but i see only ''' symbols instead my data in french.
When i retrieve it in .NET application i have ''' symbols in datagrid too.
Please help me, thanksare you using unicode data types to store your textual data? IE: nvarchar,
nchar, ntext
regards,
Mark Baekdal
http://www.dbghost.com
http://www.innovartis.co.uk
+44 (0)208 241 1762
Database change management for SQL Server
"Oxana" wrote:

> I'm trying to do it , but i see only ''' symbols instead my data in frenc
h.
> When i retrieve it in .NET application i have ''' symbols in datagrid too
.
> Please help me, thanks

Friday, March 9, 2012

How can i insert a curreny formated column

Hi i have made a column that is called carprice. Instead of just typing in £500 i want to be able to put in 500 and then have sql auto format it to £500 in the column. In other words just put the £ price infront. Is there a way of doing this thanks.A currency value should be left as a number without any symbols. The client side code should be the one formatting the value with the appropriate currency symbol. DotNet has support for this type of thing for client side formatting.|||I agree, storing as a number is the best design. Later when you need to use that data in a calculation, you dont have to try and parse it and deal with invalid entries. But the downside to just having a number is that you have no idea what currency that number is in. So if your app has any possibilities of ever going global, you might consider having a second field to track the currency. You could have a dropdown that lists all the currencies you support. You could then case on the currency to do the formatting of the output of the value you stored as a number.

How can I insert a column using a script (instead of appending)?

Hi,

I recently had to add a new column to a table that resides off-site,
in a customer's environment. Previously, the table had around 300
columns, all of which were in alphabetical order.

I found that the ALTER TABLE command appeared to be only capable of
appending a new column, but wasn't capable of inserting one into the
middle of the table.

Since alphabetical order wasn't a requirement, but just a "nice to
look at" feature, I appended it anyway, and forgot about it.

Anyone know of a clever way to do this though?

Curiously,

Warren Wright
Scorex Development TeamWarren Wright (warren.wright@.us.scorex.com) writes:
> I recently had to add a new column to a table that resides off-site,
> in a customer's environment. Previously, the table had around 300
> columns, all of which were in alphabetical order.
> I found that the ALTER TABLE command appeared to be only capable of
> appending a new column, but wasn't capable of inserting one into the
> middle of the table.
> Since alphabetical order wasn't a requirement, but just a "nice to
> look at" feature, I appended it anyway, and forgot about it.
> Anyone know of a clever way to do this though?

The "clever" way is to fiddle with syscolumns, but I highly discourge
from this.

The normal way is to go the long way: rename the old table, create
the new table including triggers, constrains and clustered index, insert
data from the old table to the new, move referencing foreign keys, drop the
old table. Restore non-clustered index.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Sunday, February 19, 2012

How can I force money field works with comma instead dot?

How can I force money field works with comma instead dot?
Hi,
How can I force money field works with comma instead dot?
The default language of my Data Base is Portuguese.
Because I have to make something as below to work ok:
LgValor = Request("txtValor")
LgValor = Replace(LgValor,",",".")
So I have to put always this in the bank: 99999.99 .....
Thanks,
VILMAR
BRAZILFor input, you cannot have comma instead of dot. This is how the SQL language and SQL Server work,
quite simply.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Vilmar Brazão de Oliveira" <suporte@.hitecnet.com.br> wrote in message
news:e9KLP4ZxDHA.1680@.TK2MSFTNGP12.phx.gbl...
> How can I force money field works with comma instead dot?
> Hi,
> How can I force money field works with comma instead dot?
> The default language of my Data Base is Portuguese.
> Because I have to make something as below to work ok:
> LgValor = Request("txtValor")
> LgValor = Replace(LgValor,",",".")
> So I have to put always this in the bank: 99999.99 .....
> Thanks,
> VILMAR
> BRAZIL
>