Viewing 15 posts - 7,636 through 7,650 (of 8,753 total)
You can use a query in the case statement, simplifies thing
😎
SELECT
CASE
WHEN EXISTS (SELECT * FROM DB_1.sys.tables WHERE name = 'TBL_TRIP') THEN (SELECT TOP 1 name...
August 1, 2014 at 5:41 am
danielfountain (8/1/2014)
I am shortly embarking on a project to redesign an ETL process.
Currently issues can be cause by end users running reports (SSRS, EXCEL) while a table is updating....
August 1, 2014 at 4:45 am
Impossible to say without more information. Could you post the table structure, the update code, execution plans etc., the more the merrier.
😎
August 1, 2014 at 1:28 am
Since the case statement is doing incremental steps, it can be simplified using integer division, see the example.
😎
USE tempdb;
GO
SET NOCOUNT ON;
DECLARE @SET_SIZE INT = 40000;
/* Test data 1 to @SET_SIZE...
July 31, 2014 at 10:38 pm
You can count the rows before and after or use @@ROWCOUNT
😎
USE tempdb;
GO
DECLARE @PRECOUNT INT = 0;
DECLARE @RET_VAL INT =0;
DECLARE @TABLEX TABLE (IVAL INT NOT NULL);
SELECT @PRECOUNT = COUNT(*) FROM @TABLEX
INSERT...
July 31, 2014 at 10:21 pm
GilaMonster (7/31/2014)
salomon.frid (7/31/2014)
I am aware of that one, just some people in my shop have told me that is not the preferred way of doing this ...
So according to your...
July 31, 2014 at 3:54 pm
lee.hopkins (7/31/2014)
some users refuse to leave the regional setting to english and i am haveing an issue.
a...
July 31, 2014 at 3:49 pm
Michael Valentine Jones (7/31/2014)
July 31, 2014 at 3:16 pm
Steve Jones - SSC Editor (7/31/2014)
SQLRNNR (7/31/2014)
Because you just had two pina coladas?
That's completely misworded. It's "because you had just two pina coladas."
....in each transaction....:rolleyes:
😎
July 31, 2014 at 3:08 pm
tshad (7/31/2014)
INSERT INTO Users
( User_id ,
...
July 31, 2014 at 3:06 pm
Straight forward running total and lag
😎
;WITH BASE AS
(
SELECT [R], [D]
FROM (
VALUES
(1,'A')
,(2,'B')
,(3,'B')
,(4,'A')
,(5,'B')
,(6,'B')
,(7,'A')
,(8,'A')
,(9,'A')) AS X([R],[D]))
,PRIME_GROUP AS
(
SELECT
B.R
...
July 31, 2014 at 2:59 pm
Snargables (7/31/2014)
July 31, 2014 at 1:36 pm
Jeff Moden (7/31/2014)
swasheck (7/31/2014)
July 31, 2014 at 1:06 pm
SQLRNNR (7/31/2014)
Eirikur Eiriksson (7/31/2014)
SQLRNNR (7/31/2014)
William J. Fellows (7/31/2014)
To qualify my statement, Steve stares at my legs a lot. 😛Well, you have good looking legs.
:exclamation:Unwanted details:sick:
Task achieved!!
Jason, you are a real...
July 31, 2014 at 12:58 pm
GilaMonster (7/31/2014)
Alvin Ramard (7/30/2014)
WAIT!!!! What kind of database MUST be repaired regularly???? :w00t:
MS Access ones.
That actually is correct advice, for an MS Access database (as in Access tables)...
July 31, 2014 at 12:50 pm
Viewing 15 posts - 7,636 through 7,650 (of 8,753 total)