Showing posts with label certain. Show all posts
Showing posts with label certain. Show all posts

Friday, March 30, 2012

Order By statement name begining with A

Hello

Can anybody tell me the correct MS SQL statement to display names: Where each name displayed is starting with a certain letter of the alphabet only. For example:

The list should show names starting with the letter A

(what must I change in my statement below)

SELECT LastN, FirstN, Tel
FROM People_DB
WHERE LastN = 'A'
ORDER BY LastN ASC

Last Name

    Adams,

    Andrews,

    Archer,

    Arrow

Thanks

Lynn

Use the LIKE operator with the % wildcard, like this:

SELECT LastN, FirstN, Tel
FROM People_DB
WHERE LastNLIKE 'A%'
ORDER BY LastN ASC

You can also use an underscore to match a single character. Check out the LIKE clause in BOL for all the options.

Don

|||

Hi Don

Thanks for the speedy reply and the information.

Lynn

ORDER BY specific values

Hi Everyone,
I was wondering if there is anyway to ORDER BY in a query by certain values first. I have a table with Projects and subprojects and sub-subprojects and I always want to display the parent project first. Is there anyway that I can do that.
Thanks for all your help.Could you give us a little inside information about your data-structure, eventually accompanied with some sample data and the way you would like to have it ?sql

Saturday, February 25, 2012

Oracle data source connection problem using Report Manager

I have an issue when using Report Manager for viewing reports that use a certain Oracle data source. When viewing the reports in Report Designer the reports display without problems. But when trying to display the reports with Report Manager, after deploying the reports to the Report Server, I now get the following error message:

blablabla....ORA-12705: invalid or unknown NLS parameter value specified

For testing purposes I am running Report Designer, Report Server and Report Manager locally on a PC with Windows XP. I am using Reporting Services 2005, IIS 6, Visual Studio 2005, an Oracle 9.x client and an Oracle 9.x (not 100% sure) database that is hosted on a remote server.

Earlier I got an error message that stated "ORA-12154: TNS: could not resolve the connect identifier specified". Access rights to some Oracle folders for the Network service account did the trick here but then I got the "NLS parameter" error message. What I have tried to do is removing the NLS_LANG register variable and also modified the value of the variable so that it matches the value of the NLS_LANG variable on the server that hosts the Oracle database, but none of them have worked. Any ideas?

Maybe this is an issue that is more appropriate in an Oracle forum but what the heck..the problem could reside in Reporting Services..

Thanks, Stefan

I found the solution to the problem. I was jerking around with the wrong NLS_LANG registry variable. Everywhere I have looked it says that the NLS_LANG variable is found in the Home0 directory in the Windows registry, so naturally I have tested settings with that NLS_LANG variable. Also, the first thing I did was to search the registry for the NLS_LANG variable and the only search result was the one found under the Home0 directory. Out of coincidence, I found another NLS_LANG variable located directly under the Oracle directory in the registry. This variable was set to "NA". I changed it to AMERICAN_AMERICA.WE8ISO8859P15, and boom shakalak!

/Stefan