Viewing 15 posts - 1,156 through 1,170 (of 2,458 total)
-- TheTimeIs Script
-- start script
CREATE PROC TheTimeIs AS
SELECT CREATED FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_NAME = 'TheTimeIs';
GO
EXEC TheTimeIs;
DROP PROC TheTimeIs;
GO
-- end script
-- Itzik Ben-Gan 2001
November 19, 2015 at 6:54 pm
Lynn Pettis (11/19/2015)
Jeff Moden (11/19/2015)
Eirikur Eiriksson (11/19/2015)
😎
SELECT
GETDATE()
,SYSDATETIME()
...
-- Itzik Ben-Gan 2001
November 19, 2015 at 6:29 pm
Just for fun and practice:
DECLARE @x varchar(100) = 'AB_CD_EF_GH_IJ';
WITH L1 AS (SELECT N=1 FROM (VALUES (1),(1),(1),(1),(1),(1),(1),(1),(1),(1))X(x)), -- 10 rows
iTally(N) AS (SELECT ROW_NUMBER() OVER (ORDER BY (SELECT 1)) FROM L1...
-- Itzik Ben-Gan 2001
November 17, 2015 at 12:53 pm
Sean Lange (11/17/2015)
Alan.B (11/16/2015)
The Dixie Flatline (11/16/2015)
-- Itzik Ben-Gan 2001
November 17, 2015 at 9:05 am
Brandie Tarvin (11/17/2015)
Ed Wagner (11/17/2015)
Brandie Tarvin (11/17/2015)
Ed Wagner (11/17/2015)
Lynn Pettis (11/16/2015)
Ed Wagner (11/16/2015)
Lynn Pettis (11/16/2015)
************(11/16/2015)
-- Itzik Ben-Gan 2001
November 17, 2015 at 6:48 am
The Dixie Flatline (11/16/2015)
-- Itzik Ben-Gan 2001
November 16, 2015 at 5:00 pm
I thought more people would jump on this. :Whistling:
Anyhow I took a few minutes to throw some stuff together for you. Perhaps this will be helpful.
USE tempdb
GO
/****************************************************************************************
(1) Create Sample...
-- Itzik Ben-Gan 2001
November 16, 2015 at 4:29 pm
alex_martinez (11/14/2015)
Thank you, I still a little fizz on this, can you give me an example. Thank you.
I'm not at a PC so I can't test this but...
-- Itzik Ben-Gan 2001
November 14, 2015 at 5:01 pm
Jeff beat me to it. Tables are either HEAPS or Clustered Tables (e.g. a table with a clustered index which means it's a B-Tree).
I would add, you could run this...
-- Itzik Ben-Gan 2001
November 13, 2015 at 9:14 pm
Luis Cazares (11/12/2015)
Do you know what the stuff function does?https://msdn.microsoft.com/en-us/library/ms188043.aspx
SELECT STUFF ( 'This is a lack of knowledge' , 11 , 7 , 'great' )
Though STUFF is an insignificant and...
-- Itzik Ben-Gan 2001
November 12, 2015 at 1:47 pm
This should get you started.
http://www.sqlservercentral.com/articles/comma+separated+list/71700/%5B/url%5D
-- Itzik Ben-Gan 2001
November 12, 2015 at 11:04 am
But if you're in a hurry and cannot wait for enlightenment, I suggest you find and download sp_BlitzIndex
+1 😉
-- Itzik Ben-Gan 2001
November 11, 2015 at 4:46 pm
sgrimard (11/11/2015)
Any suggestion on good books or site to learn how to create good index?
SQL Server 2012 Query Performance Tuning (Expert's Voice in SQL Server) by Grant Fritchey is a...
-- Itzik Ben-Gan 2001
November 11, 2015 at 3:36 pm
MonkSup (11/10/2015)
Is OPENXML something I should look into?
https://msdn.microsoft.com/en-us/library/ms187897(v=sql.110).aspx
I can find plenty of examples for importing and creating structures for XML...
-- Itzik Ben-Gan 2001
November 10, 2015 at 6:47 pm
How about ISNULL? ISNULL(<whatever>,'') for blank values, ISNULL(<whatever>,0) to get a 0.
-- Itzik Ben-Gan 2001
November 10, 2015 at 6:35 pm
Viewing 15 posts - 1,156 through 1,170 (of 2,458 total)