Viewing 15 posts - 6,736 through 6,750 (of 8,760 total)
Quick question, could you describe the problem you are trying to solve?
😎
October 20, 2014 at 12:24 pm
Quick addition of another key element (SRC_ID)
😎
USE tempdb;
GO
;WITH BASE_DATE(BD_ID,SRC_ID,BD_FLAG) AS
( SELECT BD_ID,SRC_ID,BD_FLAG FROM (VALUES
(1 ,1,'ABC' )
,(2 ,1,'123' )
...
October 20, 2014 at 12:18 pm
Quick thought, use the stuff function
😎
USE tempdb;
GO
DECLARE @SAMPLE_SIZE INT = 123;
DECLARE @PADDING CHAR(3) = '000';
;WITH T(N) AS (SELECT N FROM (VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL))...
October 20, 2014 at 12:00 pm
Marcus Farrugia (10/20/2014)
What is the best way or is it possible to call a stored procedure within another stored procedure ...
Quick demonstration
😎
USE tempdb;
GO
CREATE PROCEDURE dbo.PROC_ONE
(
@PARAM ...
October 20, 2014 at 11:01 am
Phil Parkin (10/20/2014)
Eirikur Eiriksson (10/18/2014)
Quick window function solution, should be self explanatory😎
Eirikur, do you ever do anything slowly? 😛
According to the better half, yes:-P
😎
October 20, 2014 at 10:50 am
Quick "skeleton" suggestion
😎
USE tempdb;
GO
;WITH BASE_DATE(BD_ID,BD_FLAG) AS
( SELECT * FROM (VALUES
(1,'ABC' )
,(2,'123' )
,(3,'DEF' )
,(4,'FOO'...
October 20, 2014 at 10:43 am
KoldCoffee (10/19/2014)
SELECT
...
October 19, 2014 at 10:27 pm
On the contrary, it is very useful as it respects the left outer join, which in essence return all records from the right hand side and only those on the...
October 19, 2014 at 12:26 pm
Think of it this way, the AND will satisfy all records on the right hand side and return NULL on the left hand side for those records not satisfying the...
October 19, 2014 at 11:59 am
Quick suggestion, change this to a merge statement, look into the merge match conditionals "when matched" straight forward to handle this that way.
😎
October 19, 2014 at 4:38 am
Of course the more information provided the better the answer/advice;-)
The tables can of course be created beforehand, the solution posted is one of many ways of doing this. Tell...
October 19, 2014 at 1:46 am
Quick thought, conditioning a left outer join query on a column on the left side of the join effectively turns the join into an inner join, when the same predicates...
October 19, 2014 at 12:12 am
Good input @Seong-Bae Hwang, your approach is much more efficient as it bypasses the expensive XML table value functions and the string manipulation. Well done!
Must admit that I got a...
October 18, 2014 at 11:09 pm
The task of populating a table from a stored procedure is simple, isolating the data for each client which makes this slightly more complicated as preferably each client should have...
October 18, 2014 at 10:52 pm
Google doesn't like nnnnn..nnnnnn, try searching any set of numbers and the G guy will tell you he's sorry. Probably an effort to stop certain type of searches like ip...
October 18, 2014 at 1:34 pm
Viewing 15 posts - 6,736 through 6,750 (of 8,760 total)