Viewing 15 posts - 31 through 45 (of 95 total)
ThomasRushton (12/11/2015)
Steve Jones - SSC Editor (12/11/2015)
Take this week's survey. don't look anything up, first thing that comes to mind. Be serious, not silly.
#10? Really? Why not just...
December 12, 2015 at 5:28 am
BrainDonor (10/9/2015)
October 10, 2015 at 5:28 am
3 or 9 depends how you define different...
column AS alias
column AS 'alias'
column AS [alias]
column alias
column 'alias'
column [alias]
alias = column
'alias' = column
[alias] = column
And I didn't use double quotes.
I only lost...
September 2, 2015 at 1:03 am
If the source is always a 6 character string:
Rearrange the input to a yymmdd string with two substrings.
Convert to date using CONVERT using style 12 (yymmdd)
DECLARE @D nvarchar(6) = '083115'
SELECT...
August 31, 2015 at 3:19 am
After running the first script the table has 2 indexes, A unique non-clustered on SalesId (PRIMARY KEY) and a clustered on SalesId.
The first insert inserts one row, the second fail...
June 10, 2015 at 12:53 am
A Scaler function that trims leading and trailing spaces from a Unicode string.
dbo.Numbers is a Tally-table.
CREATE FUNCTION dbo.fn_NTRIM(@T nvarchar(4000))
RETURNS nvarchar(4000)
AS
BEGIN
DECLARE @r nvarchar(4000);
WITH cte_Space (UC) AS (
SELECT UC
FROM(
VALUES(0x20),--Space
(0xA0),--No-Break...
April 22, 2015 at 7:59 am
12288 is the Unicode character 'IDEOGRAPHIC SPACE' (0x3000),
Added to my list of Unicode-spaces... which I use in my front-end to cleanup any copy-paste strings..
April 22, 2015 at 7:27 am
SQL 2008R2 Collation SQL_Latin1_General_CP1_CI_AS
Could also be a difference in regional settings..
s(No column name)(No column name)dump
32320x2000
G712880x2001
?635440x2002
?638000x2003
3281920x0020
3281930x0120
3281940x0220
3281950x0320
April 22, 2015 at 7:19 am
The Unicode space-characters 32 and 0x2000 to 0x2003 return an ASCII value of 32.
RTRIM only trims Unicode character 32.
If a string ends with NCHAR(0x2000) RTIM will not remove the last...
April 22, 2015 at 6:37 am
Changed my code to show the effects better
DECLARE @test-2 TABLE (SpaceChar nvarchar(1), Name nvarchar(50) );
INSERT @test-2
VALUES(CHAR(32), 'Space'),
(NCHAR (0xA0),'No-Break Space' ),
(NCHAR(0x2002),'En Space'),
(NCHAR(0x2003),'Em Space'),
(NCHAR(0x2004),'Three-Per-Em Space'),
(NCHAR(0x2005),'Four-Per-Em Space'),
(NCHAR(0x2006),'Six-Per-Em...
April 22, 2015 at 5:35 am
In Unicode there are more Space-Characters than ASCII(32)
You can use UNICODE(Char) to get the Unicode value for the space-character.
Run the following code to see the (known to me) space-Characters in...
April 22, 2015 at 5:26 am
If you have any other questions, please ask, I might give you an answer.
For the last 8 years I've been developing a ERP system in VB.Net and SQLServer.
Louis.
February 26, 2015 at 3:01 pm
You can use the My.Setting object,
Set value : My.Settings("UserName") = varUserName
Save: : My Settings.Save
See https://msdn.microsoft.com/en-us/library/saa62613.aspx
Louis.
February 26, 2015 at 6:48 am
DROP DATABASE deletes the physical disk files used by the database when they are online,
sp_detach_db only removes the database from the current (SQL) server by leaves these files on...
February 24, 2015 at 1:09 am
The precision and scale of the result are calculated ( see https://msdn.microsoft.com/en-us/library/ms190476.aspx
look especially as this comment:
The result precision and scale have an absolute maximum of 38. When a result precision...
February 18, 2015 at 7:46 am
Viewing 15 posts - 31 through 45 (of 95 total)