Viewing 15 posts - 7,951 through 7,965 (of 8,760 total)
Here is a quick solution using a CALENDAR CTE
😎
USE tempdb;
GO
;WITH SampleData (PERSON,[HOURS],[RATE],[CODEID],[DOW],[DATE]) AS
(
SELECT 1234,7.00,40.00,01,'Thursday','05/01/2014'
UNION ALL SELECT 1234,8.0,40.0,01,'Friday','05/02/2014'
UNION ALL...
June 21, 2014 at 4:03 am
N_Muller (6/20/2014)
June 21, 2014 at 2:48 am
ykonline (6/20/2014)
I want to insert data periodically from an excel file into a table using a SSIS. But each time the no. of columns in excel may vary.
Suppose, the...
June 20, 2014 at 11:46 pm
Take a look at this article, How to Return Running Product Totals.
I think the method I used earlier has already been posted on this thread, it is the same as...
June 20, 2014 at 11:38 pm
Bear with me here but is this the result you are after?
😎
MyLongDesiredRunningTotalSequenceWK NOACCOMPUSD_AMOUNTSOA_TYPE
100.00191620112003100.00Agent
300.002101620412003200.00Freight
450.003111620712003150.00Agent
700.005121620812003250.00Costs
1100.006131622412003400.00Cost
1600.007141629512003500.00Freight
2140.008151629512003540.00Cost
June 20, 2014 at 12:12 pm
pwalter83 (6/20/2014)
I am trying to calculate running total in sql as its not giving me the desired result on SSRS (on the fly calculation).
I tried using the following code but...
June 20, 2014 at 4:48 am
AndrewSQLDBA (6/19/2014)
I hope that you are having a very nice day. To some, it is already friday, the weekend is closer for you.
I am selecting data from a View...
June 20, 2014 at 3:23 am
jaimepc199 (6/19/2014)
I forget something, is there any way to use windows functions on this example?thanks 😀
As the set has only one divisor (codcategory) and there is no requirement to preserve...
June 19, 2014 at 11:24 pm
Jeff Moden (6/19/2014)
June 19, 2014 at 1:08 pm
OCTom (6/19/2014)
GilaMonster (6/19/2014)
david.tyler (6/18/2014)
My current employer is trying to convince our DB group SQL Server is a dying technology and open source is the way to go.
So what's his motivation...
June 19, 2014 at 1:02 pm
Yet two more ways
😎
USE tempdb;
GO
DECLARE @TSTR TABLE
(
TSTR_ID INT IDENTITY(1,1) PRIMARY KEY CLUSTERED NOT NULL
,TSTR_VALUE VARCHAR(50) NOT NULL
);
INSERT INTO...
June 19, 2014 at 11:13 am
Another of many
😎
DECLARE @STR_A VARCHAR(50) = '1.9999-Q1'
;WITH STR_POS AS
(
SELECT
CHARINDEX(CHAR(46),@STR_A) AS P1
...
June 19, 2014 at 7:56 am
Is it something along these lines that you are after?
😎
SELECT
TBO.schedule_time
,'OPEN' AS open_closed
FROM
(
SELECT
...
June 19, 2014 at 2:38 am
Many ways of doing this, here are two quick examples. BTW, thanks for the nice DDL/sample.
😎
Slightly long winded pre 2012.
;WITH LIC_TYPE AS
(
SELECT
TL.ID
,ROW_NUMBER...
June 18, 2014 at 10:42 pm
Viewing 15 posts - 7,951 through 7,965 (of 8,760 total)