IT Community - Software Programming, Web Development and Technical Support

Trim Trailing and Leading Spaces using different databases

This is a discussion on Trim Trailing and Leading Spaces using different databases within the Database Support forums, part of the Web Development category; Trim Trailing and Leading Spaces using different databases 1. Microsoft SQL Server SELECT LTRIM(' sql_in_a_nutshell'), SELECT RTRIM('sql_in_a_nutshell '), SELECT LTRIM(...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > Database Support

Register FAQ Members List Calendar Mark Forums Read
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 12-05-2007, 03:17 AM
srikumar_l srikumar_l is offline
D-Web Sr.Programmer
 
Join Date: Aug 2007
Posts: 196
srikumar_l is on a distinguished road
Default Trim Trailing and Leading Spaces using different databases

Trim Trailing and Leading Spaces using different databases


1. Microsoft SQL Server

SELECT LTRIM(' sql_in_a_nutshell'),
SELECT RTRIM('sql_in_a_nutshell '),
SELECT LTRIM(RTRIM(' sql_in_a_nutshell ')


2. MySQL [retrieving the date but not time]

SELECT LTRIM(' sql_in_a_nutshell'),
SELECT RTRIM('sql_in_a_nutshell '),
SELECT TRIM(' sql_in_a_nutshell '),
SELECT TRIM(BOTH FROM ' sql_in_a_nutshell ');


3. Oracle

SELECT LTRIM(' sql_in_a_nutshell'),
SELECT RTRIM('sql_in_a_nutshell '),
TRIM(' sql_in_a_nutshell ')
FROM dual;


4. PostgreSQL

SELECT TRIM(LEADING FROM ' sql_in_a_nutshell'),
TRIM(TRAILING FROM 'sql_in_a_nutshell '),
TRIM(BOTH FROM ' sql_in_a_nutshell ');
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

LinkBacks (?)
LinkBack to this Thread: http://www.discussweb.com/database-support/4664-trim-trailing-leading-spaces-using-different-databases.html
Posted By For Type Date
DiscussWeb IT Community - Technical Support and Technology Discussions This thread Refback 12-05-2007 03:25 AM

Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing multiple spaces from string bluesky C# Programming 3 03-19-2008 06:17 AM
XML and white spaces Sathish Kumar XML and SOAP 2 03-14-2008 03:33 AM
Trim venkatbi HTML, CSS and Javascript Coding Techniques 0 12-19-2007 07:50 AM
E-Commerce Report - Millions of Addresses and Thousands of Sites, All Leading to One vigneshgets The Lounge 0 05-29-2007 05:33 AM
Leading Software Developer tripnautic Mobile Software Development 0 03-20-2007 07:41 PM


All times are GMT -7. The time now is 06:06 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0