Showing posts with label characters. Show all posts
Showing posts with label characters. Show all posts

Wednesday, March 21, 2012

Displying rtf database field properly formatted

I am a simple user- I have a SQL Server database that stores a particular field as rtf, including all of the formatting characters in addition to the actual user-entered text.

I use the report wizard to easily build reports, but this particular field outputs all of the gobbldygook but I just want the user-entered text.

Crystal Reports easily translates rtf- why can't Microsoft easily translate their own format? Any help would be appreciated.

Hi kc,

This is a feature we are looking at for later releases. We want something like this too.

sql

Friday, March 9, 2012

displaying extra characters with COLUMN-defined number format?

Here's a tricky SQL question that has definitely driven me to the end of
my rope. I'm using Oracle 9i and I need to perform some simple
multiplication on a field and then display it with a percent sign using
the COLUMN command. Here's the code thus far:

COLUMN price format 9,999.99 HEADING 'Charged%'
SELECT pricecharged * .231 as price
FROM VT_examdetail

The output from this reads:

Charged%
---
23.10
34.65
34.65
...

The kicker here is that I need to add a percent sign to the right of the
output, so that it reads:

Charged%
---
23.10%
34.65%
34.65%
...

I thought I could do this by just adding "|| ('%')" into the SELECT
statement, but when I do this the decimal position defined in the COLUMN
command is lost. Does anyone know another way around this?

Thanks,
AlexOn Tue, 07 Oct 2003 08:58:56 -0700, Alex <raindogs_1@.yahoo.com> wrote:

>Here's a tricky SQL question that has definitely driven me to the end of
>my rope. I'm using Oracle 9i and I need to perform some simple
>multiplication on a field and then display it with a percent sign using
>the COLUMN command. Here's the code thus far:
>COLUMN price format 9,999.99 HEADING 'Charged%'
>SELECT pricecharged * .231 as price
>FROM VT_examdetail
>The output from this reads:
> Charged%
>---
> 23.10
> 34.65
> 34.65
>...
>
>The kicker here is that I need to add a percent sign to the right of the
>output, so that it reads:
>
> Charged%
>---
> 23.10%
> 34.65%
> 34.65%
>...
>I thought I could do this by just adding "|| ('%')" into the SELECT
>statement, but when I do this the decimal position defined in the COLUMN
>command is lost. Does anyone know another way around this?
>Thanks,
>Alex
TO_CHAR(number, '99.99') || '%'|||Hi,

You could do this:

select cast( charged as varchar(10)) + '%' from orders

Regards,
-Manoj|||"Alex" <raindogs_1@.yahoo.com> wrote in message
news:3F82E2C0.4030204@.yahoo.com...
> Here's a tricky SQL question that has definitely driven me to the end of
> my rope. I'm using Oracle 9i and I need to perform some simple
> multiplication on a field and then display it with a percent sign using
> the COLUMN command. Here's the code thus far:

Couple of comments, this is a ms-sqlserver forum, not Oracle.

However, the other answers should work.

But, I'd say you're going about this the wrong way. Formatting should be
done at an entirely different level than the DB.

> COLUMN price format 9,999.99 HEADING 'Charged%'
> SELECT pricecharged * .231 as price
> FROM VT_examdetail
> The output from this reads:
> Charged%
> ---
> 23.10
> 34.65
> 34.65
> ...
>
> The kicker here is that I need to add a percent sign to the right of the
> output, so that it reads:
>
> Charged%
> ---
> 23.10%
> 34.65%
> 34.65%
> ...
> I thought I could do this by just adding "|| ('%')" into the SELECT
> statement, but when I do this the decimal position defined in the COLUMN
> command is lost. Does anyone know another way around this?
> Thanks,
> Alex

Displaying Encoded Characters

some special characters are saved in an encoded form. However reporting
services does not convert it back to the regular form when it retreives it
from the database, instead it would output get wierd characters.the code for keystrokes ALT 250 and others are whats being outputted not the
correct symbol.
"Marvin" wrote:
> some special characters are saved in an encoded form. However reporting
> services does not convert it back to the regular form when it retreives it
> from the database, instead it would output get wierd characters.

Wednesday, March 7, 2012

Displaying Chinese Character in varchar columns

I would like to store some data in Chinese Big5 using a varchar column. However, all the data turn in to some garbage characters like Ru¥Uao? .
I ran into no problem if i use nvarchar but I would like to use varchar because I can only store less than 4000 characters using nvarchar.

It works if I paste the characters directly into the SQL Express Client. It only turns into some garbage characters if i use C++ to insert the data.

I am using Chinese_Taiwan_Stroke_BIN collation (The chinese won't show if I use the default latin collation) on the column and my computer regional setting for non-unicode application is Traditional Chinese(Taiwan).

Any ideas how can I fix this problem? I am suspecting there's a problem with my computer setting?

Thanks!

If you need more than 4000 characters, you should consider using an NText column type. A standard varchar column can only hold characters from its native character set.|||but then ntext insertion and retrival time would be slower and we don't want that

Sunday, February 19, 2012

Display over 256 characters for VARCHAR(3500) field

Hopefully, someone can help me.
I am working with a database that contains multiple fields within the tables that are being used for Clinical notes. The fields are defined as VARCHAR(3500). But when I try to extract data (either through Query Analyzer or Crystal Reports), only the first 256 characters are displayed. I ran a query to give me the length of the maximum entry size which returned 2722 characters, yet only 256 are displayed.

How do I go about extracting ALL of the data from this field? Any help is much appreciated.

Thanks in advance.In Query Analyzer, select Options from the menu and bump up the maximum output characters, which defaults to 256.