Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

This challenge to is implement similarly functionality in TSQL, that works similar to INITCAP function of ORACLE.

TSQL Beginners Challenge 22 - Create SQL Server version of the ORACLE INITCAP function

TSQL Beginners Challenge 22 - Create SQL Server version of the ORACLE INITCAP function

Dec 6 2010 9:30AM by Niladri Biswas   

Introduction

This challenge deals with converting the phrases to proper case.

In Oracle/PLSQL, the INITCAP function sets the first character in each word to uppercase and the rest to lowercase.

For example, initcap('challenge'); would return 'Challenge'.

The challenge to is implement similarly functionality in TSQL, that works similar to INITCAP function of ORACLE.

Sample Data

ID Data
-- -----------------------------
1  welcome to TSQL Challenge #22

Expected Results

ID Data				             Results
-- ----------------------------- -----------------------------	
1  welcome to TSQL Challenge #22 Welcome To TSQL Challenge #22

Rules

  1. Results should be sorted in ascending order of ID.
  2. The program should run in SQL SERVER 2005 and above.
  3. The output should be in the same way as it has been shown.

Sample Script

Use the following script to generate the sample data.

DECLARE @t TABLE(ID INT IDENTITY, Data VARCHAR(100))
INSERT INTO @t 
SELECT 'welcome to TSQL Challenge #22' 
SELECT * FROM @t

Restrictions

  1. The solution should be a single query that starts with a "SELECT" or “;WITH”.

Notes

Tags:Puzzles, TSQL Beginners Challenge, TC, TSQL Beginners Challenge 22

Niladri Biswas
7 · 21% · 6720
TSQL Beginners Challenge 22 - Create SQL Server version of the ORACLE INITCAP function , 5.0 out of 5 based on 1 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]