Viewing 15 posts - 2,701 through 2,715 (of 8,753 total)
KGJ-Dev (11/15/2016)
declare @val varchar (10) = "20:11";
How do i display this as 20 hours and 11 minutes. If it is 00:20 then 20 minutes. If it's 20:00 then 20 hours....
November 16, 2016 at 12:43 am
Jeff Moden (11/15/2016)
Eirikur Eiriksson (11/15/2016)
😎
DECLARE @pString VARCHAR(8000) = 'Chlu' + CHAR(30) + CHAR(2) + CHAR(0) + CHAR(13) + CHAR(10) +...
November 15, 2016 at 11:44 am
Here is a quick solution, quite efficient
😎
DECLARE @pString VARCHAR(8000) = 'Chlu' + CHAR(30) + CHAR(2) + CHAR(0) + CHAR(13) + CHAR(10) + CHAR(20) + ...
November 15, 2016 at 9:42 am
Jeff Moden (11/15/2016)
Eirikur Eiriksson (11/15/2016)
November 15, 2016 at 9:17 am
Quick XML XQuery shredding example
😎
USE TEEST;
GO
SET NOCOUNT ON;
DECLARE @TXML XML = '<pllog>
<log>
<datetime>20151021183108</datetime>
<ms>900</ms>
<type>Info</type>
<action>RES ONE Workspace initializing</action>
<result>Version 9.10.0.1</result>
</log>
<log>
<datetime>20151021183108</datetime>
<ms>900</ms>
<type>Info</type>
<action>Session GUID</action>
<result>{6E332C48-207F-4619-A25C-2B8716A19E31}</result>
</log>
<log>
<datetime>20151021183109</datetime>
<ms>134</ms>
<type>Info</type>
<action>TS client name</action>
<result>LAPTOP-HEV</result>
</log>
</pllog>
'
SELECT
XLOG.DATA.value('(datetime/text())[1]' ,'VARCHAR(50)' ) AS...
November 15, 2016 at 9:12 am
Jeffery Williams (11/15/2016)
The query just runs indefinitely...
November 15, 2016 at 8:51 am
Y.B. (11/15/2016)
November 15, 2016 at 8:41 am
Grant Fritchey (11/15/2016)
VARCHAR(1) is my favorite data type of all time... Well, behind VARIANT, but hopefully that's going to be on the ash heap soon.
Even better when the length isn't...
November 15, 2016 at 8:34 am
dothedev (11/15/2016)
Wow, thanks! :w00t:Just needed to add some (finnish) characters in the IS_CAPS case and that's it!
It's going to take a while to understand though 🙂
Can you list the...
November 15, 2016 at 8:29 am
Luis Cazares (11/15/2016)
Here's an option using a modified version of the pattern splitter explained in here: http://www.sqlservercentral.com/articles/String+Manipulation/94365/The only modification was to make it CASE sensitive.
Nice one Luis!
😎
November 15, 2016 at 8:25 am
Adi Cohn-120898 (11/15/2016)
November 15, 2016 at 8:24 am
Jeff Moden (11/13/2016)
TheTrojan (11/13/2016)
-- if the parameter is 1000: 76...
November 15, 2016 at 8:12 am
Adi Cohn-120898 (11/15/2016)
declare @Org varchar(150) = 'Lorem ipsum dolor sit amet, CONSECtetur adipiSCIng elit. PelleNTesque in ELIT ut ex accumsan sagittis in a urna'
declare @Results varchar(200)...
November 15, 2016 at 7:26 am
dothedev (11/15/2016)
Wow, thanks! :w00t:Just needed to add some (finnish) characters in the IS_CAPS case and that's it!
It's going to take a while to understand though 🙂
You are very welcome.
😎
To...
November 15, 2016 at 6:16 am
farax_x (11/15/2016)
GilaMonster (11/15/2016)
November 15, 2016 at 5:29 am
Viewing 15 posts - 2,701 through 2,715 (of 8,753 total)