RTRIM (Transact-SQL)
Posted by Jayceooi
What is the function of RTRIM? It will returns a character string after truncating all trailing blanks.For example,DECLARE @string_to_trim varchar(60);
SET @string_to_trim = ‘Four spaces are after the period in this sentence. ‘;
SELECT @string_to_trim + ‘ Next string.’;
SELECT RTRIM(@string_to_trim) + ‘ Next string.’;
GOThe result == “Four spaces are after the period in this sentence. Next string.“. As you can see, the 4 spaces behind the word ‘sentence’ was trim off.[...]
Continue ReadingSET @string_to_trim = ‘Four spaces are after the period in this sentence. ‘;
SELECT @string_to_trim + ‘ Next string.’;
SELECT RTRIM(@string_to_trim) + ‘ Next string.’;
GOThe result == “Four spaces are after the period in this sentence. Next string.“. As you can see, the 4 spaces behind the word ‘sentence’ was trim off.[...]
SUBSTRING (Transact-SQL)
Posted by Jayceooi
SUBSTRING will return part of the original string based on the expressions.SUBSTRING (value_expression, start_expression, length_expression)Example code,SELECT x = SUBSTRING(‘ABCDEFGHIJ’, 3, 5);The returned result is “CDEFG”. It will start a index ’3′ and with length ’5′ characters.[...]
Continue ReadingCHARINDEX (Transact-SQL)
Posted by Jayceooi
What is CHARINDEX use for? It will return the starting position if the searched value is found. For example,CHARINDEX (SearchedValue, StringToBeSeached)StringToBeSeached == “I like to eat durian”
SearchedValue == “eat”The result will be ’11′. The word “eat” start on index 11.[...]
Continue ReadingSearchedValue == “eat”The result will be ’11′. The word “eat” start on index 11.[...]
How to delete / drop SQL table?
Posted by Jayceooi
How to delete / drop SQL table? The following code will guide you to drop the temporary SQL table. Basically, you just need to type in ‘DROP TABLE tableName‘.IF OBJECT_ID(N’tempdb..#temptable’, N’U') IS NOT NULL
DROP TABLE #temptable;
GO[...]
Continue ReadingDROP TABLE #temptable;
GO[...]
How to create temporary SQL table
Posted by Jayceooi
How to create temporary SQL table? Just look at below CREATE TABLE statement.CREATE TABLE #tempTable (
ID int,
Name char(30) ) (more…)[...]
Continue ReadingID int,
Name char(30) ) (more…)[...]
Panasonic punts out firmware updates for DMC-G1, GH1 & GF1 cameras
Posted by Wirefresh
Panasonic has announced firmware updates for its Lumix DMC-G1, GH1 and GF1 Micro Four Thirds cameras, with the downloads becoming available on May 10.[...]
Continue ReadingLeica unveils V-Lux 20 superzoom compact with built-in GPS
Posted by Wirefresh
Leica, camera makers for the pros, sharp street-shooters and the inordinately well heeled have announced their� first compact superzoom, the V-Lux 20. The camera – basically the Panasonic ZS7/ TZ10...[...]
Continue ReadingHTC Incredible gets gushing video intro, awesome specs listed
Posted by Wirefresh
If you’re interested in HTC’s aptly named Incredible Android handset, Verizon – who will be carrying the phone in the States – have posted up a video to tell you...[...]
Continue ReadingMicrosoft’s ‘Fix It’ program aims to detect and repair common PC problems
Posted by Wirefresh
Microsoft has made its new “Fix It” software available as beta release, with the program promising to sort out problems on your PC. The company says that its new Fix...[...]
Continue ReadingIs this the *real* Apple iPhone 4G? [updated]
Posted by Wirefresh
As you know, we’ve been pretty dismissive of traffic-hungry sites trotting out endless fact-lite iPhone stories based on the flimsiest of evidence, but Gizmodo’s claim to have bagged Apple’s next...[...]
Continue Reading
No comments:
Post a Comment