?
Solved

fixing lowercase letters to uppercase

Posted on 2010-09-16
4
Medium Priority
?
443 Views
Last Modified: 2012-05-10
Hi I have the following query which gives the lower case lettered words, is there a way we can fix the lowercase letters to get the uppercase ones?
USE CONTROLM_EM
SELECT      SCHED_TABLE, JOB_NAME
FROM  DEF_JOB A
JOIN  DEF_TABLES B ON A.TABLE_ID = B.TABLE_ID
WHERE DATA_CENTER = 'PROD'
AND SCHED_TABLE NOT LIKE 'WORKSPACE%'
AND CAST(JOB_NAME AS VARBINARY(8000)) <> CAST(UPPER(JOB_NAME) AS VARBINARY(8000))
ORDER BY SCHED_TABLE, JOB_NAME
0
Comment
Question by:shyamaladevib
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 3

Accepted Solution

by:
ad4m1 earned 668 total points
ID: 33697013
Simply prefix your fields with upper(**FieldName**)
so presuming you want your JOB_NAME to be returned in upper case you would have the following code.
SELECT      SCHED_TABLE, upper(JOB_NAME)
FROM  DEF_JOB A
JOIN  DEF_TABLES B ON A.TABLE_ID = B.TABLE_ID
WHERE DATA_CENTER = 'PROD'
AND SCHED_TABLE NOT LIKE 'WORKSPACE%'
AND CAST(JOB_NAME AS VARBINARY(8000)) <> CAST(UPPER(JOB_NAME) AS VARBINARY(8000))
ORDER BY SCHED_TABLE, JOB_NAME
 
Hope this helps.
0
 
LVL 32

Assisted Solution

by:Ephraim Wangoya
Ephraim Wangoya earned 664 total points
ID: 33697739
Use update  

UPDATE DEF_JOB
SET SCHED_TABLE = UPPER(SCHED_TABLE), JOB_NAME = UPPER(JOB_NAME)
WHERE DEF_JOB.TABLE_ID IN
(SELECT A.TABLE_ID
      FROM  DEF_JOB A
      JOIN  DEF_TABLES B ON A.TABLE_ID = B.TABLE_ID
      WHERE DATA_CENTER = ' PROD'
      AND SCHED_TABLE NOT LIKE 'WORKSPACE%'
      AND CAST(JOB_NAME AS VARBINARY(8000)) <> CAST(UPPER(JOB_NAME) AS VARBINARY(8000)))
0
 
LVL 4

Assisted Solution

by:parthmalhan
parthmalhan earned 668 total points
ID: 33710974
try the following code:

USE CONTROLM_EM
SELECT      upper(SCHED_TABLE),upper(JOB_NAME)
FROM  DEF_JOB A
JOIN  DEF_TABLES B ON A.TABLE_ID = B.TABLE_ID
WHERE DATA_CENTER = 'PROD'
AND SCHED_TABLE NOT LIKE 'WORKSPACE%'
AND CAST(JOB_NAME AS VARBINARY(8000)) <> CAST(UPPER(JOB_NAME) AS VARBINARY(8000))
ORDER BY SCHED_TABLE, JOB_NAME
0
 

Author Closing Comment

by:shyamaladevib
ID: 33737364
thanks!
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have written a PowerShell script to "walk" the security structure of each SQL instance to find:         Each Login (Windows or SQL)             * Its Server Roles             * Every database to which the login is mapped             * The associated "Database User" for this …
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question