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

Friday, March 30, 2012

How to make Zip Code 5 characters and not 4 in Excell

Is there a way to get 5 character zip code in excell without making it
into a TEXT?
ex:
zip code: 1024
I want it : 01024
BUT (It's a big but) I dont want it to be text - I need it to stay a
numercial # so that excell can read it as a zip code.
Is this possible?When you format the cells, look under Special - there is a ZipCode
format
Sorcerdon wrote:
> Is there a way to get 5 character zip code in excell without making it
> into a TEXT?
> ex:
> zip code: 1024
> I want it : 01024
> BUT (It's a big but) I dont want it to be text - I need it to stay a
> numercial # so that excell can read it as a zip code.
> Is this possible?|||Where is this located?
In the formating all I have is:
Default
Number
Date
Time
Percentage
Currency

Monday, March 26, 2012

How to make escape characters in varchar

I am trying to use this:

INSERT INTO BizNames ( [Key], [Name] ) VALUES ( 0, 'Bob's Lumber' );

The apostrophe embedded in the name value is giving me headaches. I tried using double-quotes and [] to delineate the value but then I get complaints that a "Name" is not allowed in this context.

How do you turn the embedded characters into an escape character so they can be ignored by SQL Server and passed into the table field.

INSERT INTO BizNames ( [Key], [Name] ) VALUES ( 0, 'Bob''s Lumber' ) <--2 single quotes not 1 double quote

Adamus

Friday, March 9, 2012

how to limit the characters in the string report parameter?

i have added one string parameter in the report. is it possible to
limit the characters in the string parameter. so that use cannt enter
the characters more than 30.
any suggestions
Thanks
VinodFor your parameter, I assume you use it in your dataset right?
Well it doesn't really matter, but what I was gonig to suggest is that you
do this:
=SubString(@.reportparameter, 1, 20)
Or in your dataset SQL:
(example)
declare @.paramLimitLength
set @.paramLimitLength = substring(@.reportParameter, 1, 20)
exec somestoredprocedure @.paramLimitLength
=-Chris
"Vinod" <vinodsh_82@.hotmail.com> wrote in message
news:1161357963.532395.315200@.k70g2000cwa.googlegroups.com...
>i have added one string parameter in the report. is it possible to
> limit the characters in the string parameter. so that use cannt enter
> the characters more than 30.
> any suggestions
> Thanks
> Vinod
>|||Thanks for the reply Chris
No, i am nt using the dataset for report parameter. my new report
parameter is the input to the stored procedure. i need to limit the
characters in the report layout, so that user cant enter the value more
than 30 characters.
i dont know whether we can limit the characters upto 30 in the report
layout.
let me know if you are not clear.
Thanks
Vinod
Chris Conner wrote:
> For your parameter, I assume you use it in your dataset right?
> Well it doesn't really matter, but what I was gonig to suggest is that you
> do this:
> =SubString(@.reportparameter, 1, 20)
> Or in your dataset SQL:
> (example)
> declare @.paramLimitLength
> set @.paramLimitLength = substring(@.reportParameter, 1, 20)
> exec somestoredprocedure @.paramLimitLength
> =-Chris
> "Vinod" <vinodsh_82@.hotmail.com> wrote in message
> news:1161357963.532395.315200@.k70g2000cwa.googlegroups.com...
> >i have added one string parameter in the report. is it possible to
> > limit the characters in the string parameter. so that use cannt enter
> > the characters more than 30.
> >
> > any suggestions
> >
> > Thanks
> > Vinod
> >