Viewing 15 posts - 6,286 through 6,300 (of 8,761 total)
For fun, few different counts/metrics
😎
USE tempdb;
GO
SET NOCOUNT ON;
;with UnionTables as
(
SELECT CAST(TestDateTime AS Date) TestDate,
SerialNumber,
TestType
FROM Coat
UNION ALL
SELECT CAST(TestDateTime AS Date) TestDate,
SerialNumber,
TestType
FROM Cutoff
UNION ALL
SELECT CAST(TestDateTime AS Date) TestDate,
SerialNumber,
TestType
FROM Geo
UNION ALL
SELECT CAST(TestDateTime AS...
January 15, 2015 at 10:33 pm
sqldriver (1/15/2015)
USE tempdb
DECLARE @cntr BIGINT = 0;
;WITH T(N) AS (SELECT N FROM (VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL)) AS X(N))
,NUMS(N) AS...
January 15, 2015 at 10:25 pm
Many ways of doing this, here is one
😎
USE tempdb;
GO
SET NOCOUNT ON;
DECLARE @SAMPLE_DATA TABLE
(
[Date] DATE ...
January 15, 2015 at 1:45 pm
Koen Verbeeck (1/14/2015)
Luis Cazares (1/14/2015)
Congratulations Koen! When I grow up I want to be like you. :hehe:Action figures will soon be available! 😎
Certainly there is a branded Witbier on it's...
January 14, 2015 at 1:11 pm
Quick though, unless you have an under-performing/resource starved system, 10000 sounds like a very small number for an insert batch size, any particular reason for this number? Cannot see it...
January 14, 2015 at 11:56 am
kiran 4243 (1/13/2015)
How to get the lowest U.Price along with FX and Rate.
ID-U.Price-FX-Rate
1280 19.1196 EUR 3.85
1280 46.2462 USD 3.63
1280 6.32 RM 1.00
Required output.
ID-U.Price-FX-Rate
1280...
January 13, 2015 at 10:54 pm
Koen Verbeeck (1/13/2015)
FYI, I received the Author of the Year award at MSSQLTips.com!Thanks everyone for voting!
Congratulations, good job and well done, justly deserved I would say!
😎
January 13, 2015 at 1:58 pm
srinivas.akyana (1/12/2015)
I have a scenario where I would need to add +4 IDs with the existing IDs, below is an example:
IDWorkloadUnits
1EXO 3
7SPO ...
January 12, 2015 at 3:48 pm
Thomas Abraham (1/12/2015)
Hugo Kornelis (1/12/2015)
January 12, 2015 at 3:16 pm
Polymorphist (1/9/2015)
Folks i'm dead in the water here - can anyone help at all? Nothing I try works and I have a feeling i'm overlooking something very simple.
Quick thought,...
January 12, 2015 at 2:48 pm
Quick partial solution, missing the handling of negative stock count though.
😎
SELECT w.ItemId
,w.DateID
,w.OpenningWareHouseUnits
,w.FcastSales
,w.GoodsIncoming
,w.TargetRunningStock
, SUM((ISNULL(w.OpenningWareHouseUnits,0) + ISNULL(w.GoodsIncoming,0)) - w.FcastSales) OVER
...
January 12, 2015 at 6:41 am
Quick simple solution, note that the output is not formatted but that's easy
😎
USE tempdb;
GO
SET NOCOUNT ON;
--INVOICE DATA
IF OBJECT_ID('tempdb..#RawData') IS NOT NULL DROP TABLE #RawData;
CREATE TABLE #RawData (Invoice varchar(7), Quantity int,...
January 12, 2015 at 4:13 am
Quick questions, are these assumptions correct?
😎
1) Definition: Territory is a Geographical Area, defined by a collection of Zip Codes, each of which represents either a Geographical or a Pseudo location....
January 12, 2015 at 2:31 am
Slightly simpler solution for SQL Server 2008 and later, produces the same results
😎
declare @pSomeDate as varchar(20) = '04/2011';
SELECT
recid
,weeknumber
,title
...
January 12, 2015 at 12:11 am
chef423 (1/11/2015)
No worries...Ill figure it out on my own then.
If you don't understand the original code then...
January 11, 2015 at 4:11 pm
Viewing 15 posts - 6,286 through 6,300 (of 8,761 total)