Viewing 15 posts - 3,241 through 3,255 (of 10,144 total)
mattech06 (6/18/2014)
;WITH Main as
(
SELECT
DISTINCT t.transactionID, b.TransDate, b.TransType,...
June 18, 2014 at 9:19 am
gurbanov.1984 (6/18/2014)
but why us # RG_SalesOut_Report (test pattern) that it give us?
baseline data about 12 million lines and how you want to write such...
June 18, 2014 at 6:38 am
sqlnaive (6/18/2014)
create table #t11
(col1 varchar(10), col2 int, col3 varchar(10))
insert into #t11
select 'XYZ', 12, 'RXM'...
June 18, 2014 at 6:34 am
gurbanov.1984 (6/18/2014)
1) adds counter
2) adds a column Code
3) sorts the three columns
ORDER BY t2.ClientID DESC, t2.Product, t2.StatementID desc
example
ClientID Product StatementID M_Sales
9 SKU1 01/05/2014 1
9...
June 18, 2014 at 6:09 am
Post the query you're using for the first result set, and the usual sample data. I'd guess a combination of ROW_NUMBER() to identify the rows to keep, and FOR XML...
June 18, 2014 at 5:11 am
gurbanov.1984 (6/18/2014)
thanks for your precious time
but why you do not use order by
it is a basic condition for the calculation field (M_Sales), if we miss, the query gets...
June 18, 2014 at 4:50 am
gurbanov.1984 (6/18/2014)
988439All Channels01.05.2014Brand 1SKU 1274,7009880
988370All Channels01.05.2014Brand 1SKU 2259,8236220
988285All Channels01.05.2014Brand 1SKU 3148,9573520
988275All Channels01.05.2014Brand 1SKU 1137,3504950
988231All Channels01.05.2014Brand 1SKU 2129,9118110
988134All Channels01.05.2014Brand 1SKU 4136,9365050
988033All Channels01.05.2014Brand 1SKU 4136,9365050
988023All Channels01.05.2014Brand 1SKU 2389,7354330
987950All Channels01.05.2014Brand 1SKU 1137,3504950
987950All Channels01.05.2014Brand...
June 18, 2014 at 2:10 am
kbhanu15 (6/17/2014)
yes you are right Gail Shaw, the suggestion you proposed is working fine.thank you.
Can you post your solution please kbhanu15? It would be very handy for other folks who...
June 17, 2014 at 4:55 am
Peter.Frissen (6/17/2014)
My problem is a bit more complex, I thought about this concatenation-solution but actually this colB is not one column but several columns. I could still concatenate the values...
June 17, 2014 at 2:28 am
rodjkidd (6/16/2014)
ChrisM@Work (6/16/2014)
Ed Wagner (6/16/2014)
GilaMonster (6/14/2014)
Koen Verbeeck (6/14/2014)
Ah, the world cup...
Yup, that's pretty much how I feel.
I have little interest in sport. Most of the time that's fine. This week,...
June 17, 2014 at 1:50 am
itortu (6/16/2014)
i want to point out that if i run this script:
select * from [dbo].[salesquotestest] WHERE prioriquotedate IN (SELECT MAX(prioriquotedate) FROM [dbo].[salesquotestest] )
i...
June 17, 2014 at 1:47 am
-- Table @CurrentQuoteItemComponentTable cqic doesn't play any useful role in the query.
SELECT
[PriorQuoteNumber]= s.SalesQuoteNumber,
[PriorItemNumber]= s.ItemNumber,
[PriorQuoteDate]= s.RequestedDeliveryDate
FROM dw.cost.vStd_SalesQuoteCostLineBOM s
WHERE s.CustomerNumber = @CustomerNumber
AND s.SalesQuoteNumber <> @SalesQuoteNumber
AND s.RequestedDeliveryDate = (
SELECT [most recent delivery...
June 16, 2014 at 9:40 am
TomThomson (6/16/2014)
ChrisM@Work (6/16/2014)
Ed Wagner (6/16/2014)
June 16, 2014 at 9:15 am
Luis Cazares (6/16/2014)
I would make a small modification because it's losing values from the last day.
;WITH RecordedMsgs (CallDate, Extension, CallerID, CalledID) AS (
SELECT '2011-12-04 01:59:59.999', 'night', 1, 20...
June 16, 2014 at 8:51 am
DROP TABLE #RecordedMsgs
;WITH RecordedMsgs (CallDate, Extension, CallerID, CalledID) AS (
SELECT '2011-12-04 01:59:59.999', 'night', 1, 20 UNION ALL
SELECT '2011-12-04 02:00:00.000', 'morn', 1, 30 UNION ALL
SELECT '2011-12-04 07:59:59.999', 'morn', 2, 30 UNION...
June 16, 2014 at 8:09 am
Viewing 15 posts - 3,241 through 3,255 (of 10,144 total)