Showing posts with label return. Show all posts
Showing posts with label return. Show all posts

Thursday, March 8, 2012

Adding New Languages

I have a SQL Server 2000 application that must return raiserrors in multiple
languages. One of the languages is not in the list of supported languages
in master..syslanguages.
In SQL 6.5, there was a procedure sp_addlanguage that could be used to add
unsupported languages. This procedure is no longer available in SQL 2000.
The upgrade documentation suggests removing all references to sp_addlanguage
... as if to suggest that adding languages to SQL 2000 is not supported and
should not be done.
I could add the language directly to syslanguages (it works, I've tried it).
My question is: Is there actually a risk in adding a new language to
syslanguages? Are there any factors that I should be aware of?
Thanks,
BB
There may not be problem for the time being, but the structure of system
tables may change between versions of SQL Server, and selecting directly
from system tables is discouraged.
Sincerely,
William Wang
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
This posting is provided "AS IS" with no warranties, and confers no rights.
--
>From: "bbofloma" <bbofloma@.online.nospam>
>Subject: Adding New Languages
>Date: Mon, 4 Apr 2005 15:55:03 -0400
>Lines: 20
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
>Message-ID: <e7$DLDVOFHA.3848@.TK2MSFTNGP14.phx.gbl>
>Newsgroups: microsoft.public.sqlserver.server
>NNTP-Posting-Host: d150-29-198.home.cgocable.net 24.150.29.198
>Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP14.phx.gbl
>Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.server:51233
>X-Tomcat-NG: microsoft.public.sqlserver.server
>I have a SQL Server 2000 application that must return raiserrors in
multiple
>languages. One of the languages is not in the list of supported languages
>in master..syslanguages.
>In SQL 6.5, there was a procedure sp_addlanguage that could be used to add
>unsupported languages. This procedure is no longer available in SQL 2000.
>The upgrade documentation suggests removing all references to
sp_addlanguage
>... as if to suggest that adding languages to SQL 2000 is not supported and
>should not be done.
>I could add the language directly to syslanguages (it works, I've tried
it).
>My question is: Is there actually a risk in adding a new language to
>syslanguages? Are there any factors that I should be aware of?
>Thanks,
>BB
>
>

Adding New Languages

I have a SQL Server 2000 application that must return raiserrors in multiple
languages. One of the languages is not in the list of supported languages
in master..syslanguages.
In SQL 6.5, there was a procedure sp_addlanguage that could be used to add
unsupported languages. This procedure is no longer available in SQL 2000.
The upgrade documentation suggests removing all references to sp_addlanguage
... as if to suggest that adding languages to SQL 2000 is not supported and
should not be done.
I could add the language directly to syslanguages (it works, I've tried it).
My question is: Is there actually a risk in adding a new language to
syslanguages? Are there any factors that I should be aware of?
Thanks,
BBThere may not be problem for the time being, but the structure of system
tables may change between versions of SQL Server, and selecting directly
from system tables is discouraged.
Sincerely,
William Wang
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
This posting is provided "AS IS" with no warranties, and confers no rights.
--
>From: "bbofloma" <bbofloma@.online.nospam>
>Subject: Adding New Languages
>Date: Mon, 4 Apr 2005 15:55:03 -0400
>Lines: 20
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
>Message-ID: <e7$DLDVOFHA.3848@.TK2MSFTNGP14.phx.gbl>
>Newsgroups: microsoft.public.sqlserver.server
>NNTP-Posting-Host: d150-29-198.home.cgocable.net 24.150.29.198
>Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP14.phx.gbl
>Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.server:51233
>X-Tomcat-NG: microsoft.public.sqlserver.server
>I have a SQL Server 2000 application that must return raiserrors in
multiple
>languages. One of the languages is not in the list of supported languages
>in master..syslanguages.
>In SQL 6.5, there was a procedure sp_addlanguage that could be used to add
>unsupported languages. This procedure is no longer available in SQL 2000.
>The upgrade documentation suggests removing all references to
sp_addlanguage
>... as if to suggest that adding languages to SQL 2000 is not supported and
>should not be done.
>I could add the language directly to syslanguages (it works, I've tried
it).
>My question is: Is there actually a risk in adding a new language to
>syslanguages? Are there any factors that I should be aware of?
>Thanks,
>BB
>
>

Adding New Languages

I have a SQL Server 2000 application that must return raiserrors in multiple
languages. One of the languages is not in the list of supported languages
in master..syslanguages.
In SQL 6.5, there was a procedure sp_addlanguage that could be used to add
unsupported languages. This procedure is no longer available in SQL 2000.
The upgrade documentation suggests removing all references to sp_addlanguage
... as if to suggest that adding languages to SQL 2000 is not supported and
should not be done.
I could add the language directly to syslanguages (it works, I've tried it).
My question is: Is there actually a risk in adding a new language to
syslanguages? Are there any factors that I should be aware of?
Thanks,
BBThere may not be problem for the time being, but the structure of system
tables may change between versions of SQL Server, and selecting directly
from system tables is discouraged.
Sincerely,
William Wang
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
This posting is provided "AS IS" with no warranties, and confers no rights.
--
>From: "bbofloma" <bbofloma@.online.nospam>
>Subject: Adding New Languages
>Date: Mon, 4 Apr 2005 15:55:03 -0400
>Lines: 20
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
>Message-ID: <e7$DLDVOFHA.3848@.TK2MSFTNGP14.phx.gbl>
>Newsgroups: microsoft.public.sqlserver.server
>NNTP-Posting-Host: d150-29-198.home.cgocable.net 24.150.29.198
>Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP14.phx.gbl
>Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.server:51233
>X-Tomcat-NG: microsoft.public.sqlserver.server
>I have a SQL Server 2000 application that must return raiserrors in
multiple
>languages. One of the languages is not in the list of supported languages
>in master..syslanguages.
>In SQL 6.5, there was a procedure sp_addlanguage that could be used to add
>unsupported languages. This procedure is no longer available in SQL 2000.
>The upgrade documentation suggests removing all references to
sp_addlanguage
>... as if to suggest that adding languages to SQL 2000 is not supported and
>should not be done.
>I could add the language directly to syslanguages (it works, I've tried
it).
>My question is: Is there actually a risk in adding a new language to
>syslanguages? Are there any factors that I should be aware of?
>Thanks,
>BB
>
>

Monday, February 13, 2012

Adding columns at runtime

I have a procedure that will return a dataset with an unknown number of columns (the user chooses a date range, and there will be one column per day). Since the columns are not always the same, the report designer doesn't want to help me with this. How can I make this work?

Thanks

Hello my friend,

For performance and ease-of-use reasons, I strongly recommend you take a different approach than using columns in this way, especially for reporting services. Please give details on what you are trying to do (the table structure and the query, etc) and I will try to suggest an alternative to achieving the same result.

Kind regards

Scotty

|||

Currently, I have this table:

CriticalUnitHistory
(
CritcalUnitHistory int (PK),
MarketID int,
UnitLCN int,
CriticalDate datetime,
CriticalReason varchar(50)
)

Every day, I look through a list of computers (each with a UnitLCN that is unique to its city) in different cities (MarketID corresponds to each city), and if its current status satisfies certain criteria, I add a record to this table with the MarketID, UnitLCN, current date and a short description of the criteria that it met to be included on the critical list.

I have been asked to create a report that will take a list of UnitLCNs and MarketIDs, and a date range, and show a table with the UnitLCNs down the left side, the dates across the top, and, if the computer was critical on a certain day, show the CriticalReason in the corresponding cell.

It would look something like this:

MarketID UnitLCN 1/20/2007 1/21/2007 1/22/2007 1/23/2007
1 519 No Contact No Contact
1 234 DL Error DL Error
1 219 GPS Fail GPS Fail

Hope that helps. Thanks for your assistance

|||

Hello my friend,

I take it you are having problems generating the data in this way from the original query. Refer to the following url: -

http://www.sqlteam.com/item.asp?ItemID=2955

It is really good. It shows you how to do a cross tab pivot to make data come out in this way. I tested the code myself with my own database tables and it works.

Kind regards

Scotty

Adding Carriage Return and Line Feeds to a text box

Hi All,

I am trying to print 10 values in a single cell in a text box.....

To make it readable I put carriage returns and line feeds into the boxes.

These rendered ok in visual studio but did not render ok in explorer....no carriage return or line feed.

This is what I added...

=Fields!segment_sdesc_00.Value & chr(10) & chr(13)

Can anyone advise me as to what is wrong with this? There must be a way to put a cr/lf or newline into a report in a text box.....

Thanks in Advance

Peter

www.peternolan.com

Try using the + sign over the ampersand.

Code Snippet

=Fields!segment_sdesc_00.Value + chr(10) + chr(13)

This has worked for me in Explorer so far.

|||

If you are working with SRS and need to combine two CRM fields together, but having each on its own line, use the following expression:

=Fields!ShipToName.Value & vbCRLF & Fields!ShipToAddress.Value

vbCRLF is a special system constant that contains the values of carriage return and line feed characters.

- Mitch Milam’s Microsoft Discussions

|||

Hi All,

thanks for the tips...will try both....

Peter

|||

Hi Simone,

some of the fields are numbers and from memory it complained about the plus sign when there was a mixture of numeric and string fields...but I will try again.

Thanks

Peter