Viewing 15 posts - 931 through 945 (of 1,246 total)
MotivateMan1394 (12/19/2015)
I have this 2 SP . There is some difference between them. I need a better Analyse about them.
For example : One of them cant be profile...
December 20, 2015 at 12:16 am
Just because you CAN do something in SQL doesn't mean you SHOULD do it in SQL.
This is typically considered display functionality and should be done in application tier not in...
December 20, 2015 at 12:01 am
Sean Grebey (12/19/2015)
December 19, 2015 at 11:29 pm
Jeff Moden (12/19/2015)
Here's an article that explains the modifications that I made to Jason's good code...
http://www.sqlservercentral.com/articles/T-SQL/72503/
If the tables you're dealing with are going to get large, you may want to...
December 19, 2015 at 5:10 pm
vijaykumar587 (12/18/2015)
But If have lot of records, for example in my data-set I have 500 thousand records. The query is taking...
December 18, 2015 at 9:11 am
Recursive CTEs aren't bad once you get your head wrapped around them... If you want to post some consumable test data, I'll attempt a solution.
December 17, 2015 at 10:42 pm
This should be what you're looking for... 🙂
IF OBJECT_ID('tempdb..#orders', 'U') IS NOT NULL
DROP TABLE #orders;
create table #orders (
orderid int,
part varchar(50)
);
IF OBJECT_ID('tempdb..#parts', 'U') IS NOT NULL
DROP TABLE #parts;
create table...
December 17, 2015 at 10:35 pm
No problem. Glad to help.
December 17, 2015 at 10:10 pm
Tim Kovacich (12/17/2015)
I am successfully...
December 17, 2015 at 10:09 pm
This should do the trick...
DECLARE @CustomerOrders table
(
id int,
account NVARCHAR(20),
deposit INT
);
INSERT INTO @CustomerOrders Values(1,'AAA',10);
INSERT INTO @CustomerOrders Values(2,'AAA',12);
INSERT INTO @CustomerOrders Values(3,'AAA',15);
INSERT INTO @CustomerOrders Values(4,'AAA',22);
INSERT INTO @CustomerOrders Values(5,'AAA',13);
INSERT INTO @CustomerOrders Values(6,'BBB',20);
INSERT INTO...
December 17, 2015 at 9:32 pm
Here you go. 🙂
IF OBJECT_ID('tempdb..#UnPivotSampleTable', 'U') IS NOT NULL
DROP TABLE #UnPivotSampleTable;
CREATE TABLE #UnPivotSampleTable
(
[Year] INT, Account VARCHAR(10), CT VARCHAR(10), Budget_1 MONEY, Budget_2 MONEY, Budget_3 MONEY, Budget_4 MONEY, Budget_5 MONEY, Budget_6...
December 17, 2015 at 8:33 pm
Since a given assistant can answer to multiple managers, I'd imagine that they are allowed to appear in multiple groups.
In either case it's a simple matter to choose a "top...
December 17, 2015 at 6:23 am
martyn.dowsett (12/16/2015)
Jason, Many thanks, worked perfectly, just what was needed 🙂
No problem. Glad to help.
December 16, 2015 at 6:59 am
This simply keys off of the 1st not integer character following the start of the numeric sequence...
It could also be easily converted into a very efficient iTVF...
DECLARE @url VARCHAR(8000) =...
December 15, 2015 at 5:03 pm
Jerry Day (12/15/2015)
select col1, col2, col3 into #T1 from
(
select 1 as col1, 2 as col2, 14 as col3 union all
select...
December 15, 2015 at 1:52 pm
Viewing 15 posts - 931 through 945 (of 1,246 total)