Viewing 15 posts - 2,956 through 2,970 (of 10,144 total)
david.dartnell (9/3/2014)
Thank you for your suggestions. I have now managed to find the line in my query which is returning NULL values.
(T0.TotalSales - T0.StockValue) / NULLIF(T0.StockValue, 0) AS 'Gross...
September 4, 2014 at 2:00 am
kbhanu15 (9/3/2014)
can you please provide me some suggestion how to avoid this conflict.
estimated rows are greater than actual rows.
and also please provide some tuning tips for this procedure.
please find...
September 3, 2014 at 8:26 am
Hi Luis
Spot on - split the comma-delimited list into a table. The function looks horribly slow though, I'd recommend you switch to the SSC function which is linked in the...
September 3, 2014 at 7:30 am
sunitha.yanagandala (9/3/2014)
select * from(
select ROW_NUMBER()over(Partition by coveragecode) rowno,* from Contract
)t
where rowno<=5
Msg 4112, Level 15, State 1, Line 1
The function 'row_number' must have an OVER clause with ORDER BY.
A version...
September 3, 2014 at 6:36 am
luissantos (9/3/2014)
Hello comunityI solve the problem.
Many thanks
Luis Santos
Hi Luis
Can you post up the solution you are using? I'm sorry your thread went a little off-track. Luis' suggestion should work just...
September 3, 2014 at 5:12 am
Adi Cohn-120898 (9/3/2014)
create table #MasterDates (D DATE)
go
insert into #MasterDates (D) VALUES
('2014-08-01'),
('2014-08-02'),
('2014-08-03'),
('2014-08-04'),
('2014-08-05'),
('2014-08-07'),
('2014-08-09')
go
create table #Employees (EmployeeID char(6), StartDate date, EndDate date)
go
INSERT INTO #Employees (EmployeeID,...
September 3, 2014 at 4:56 am
Faster than the usual algorithm I use. Here's a little tidyup:
;WITH
Step1 AS( SELECT a = @year%19, b = FLOOR(1.0*@year/100), c = @year%100),
Step2...
September 3, 2014 at 4:26 am
DROP TABLE #Represent
CREATE TABLE #Represent (EmployeeID INT, StartDate DATE, EndDate DATE)
INSERT INTO #Represent (EmployeeID, StartDate, EndDate)
SELECT 003505, '2014-08-01', '2014-08-02' UNION ALL
SELECT 003505, '2014-08-04', '2014-08-09'
DROP TABLE #MasterDate
CREATE TABLE #MasterDate ([Date]...
September 3, 2014 at 3:51 am
david.dartnell (9/3/2014)
I am in the midst of writing a report which shows the 'Total Sales', 'Gross Profit', and 'Gross Profit %' by Sales Person. Traditionally I have used a...
September 3, 2014 at 2:02 am
Hardy21 (9/2/2014)
If your queries are not using SELECT * then you are ok to add new column (as it will not affect your...
September 2, 2014 at 6:03 am
Sure, but suggestions will depend upon the execution plan for the query exhibiting the problem. Can you post it please? - actual not estimated.
September 2, 2014 at 5:48 am
Twin-devil: I think the OP wants to apply a row-level condition using values from table X, in which case dynamic sql won't work.
The most common choice would be left...
September 2, 2014 at 4:24 am
Indu-649576 (9/2/2014)
Select X.* From TABLE X
INNER JOIN
(case when (condition) then TABLE A else TABLE B end) AS Y
ON X.Col1 =...
September 2, 2014 at 3:22 am
michael.petrone (9/1/2014)
I'm fine with declaring the table in the beginning.
I want to check the temp table while selecting - first time through temp table will be empty.
So...
September 1, 2014 at 7:28 am
michael.petrone (9/1/2014)
OUTPUT from Stored Procedure
FOUND a copy of the stored procedure I'm working with----- see below----
DECLARE @ItemClient TABLE
(
ClientSSN Varchar (11),
LastName...
September 1, 2014 at 6:22 am
Viewing 15 posts - 2,956 through 2,970 (of 10,144 total)