Viewing 15 posts - 406 through 420 (of 2,452 total)
spin (9/5/2016)
so the first thing i did was to create 2 data sets, one for current year - week and...
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
September 5, 2016 at 3:44 pm
spin (9/5/2016)
I have a bit of a conundrum
I have a table which i've aggregated to :
Year, Week, Customer, Product, Quantity CY, Value CY, Quantity PY, Value PY
CY = current year,...
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
September 5, 2016 at 1:39 pm
John Mitchell-245523 (9/5/2016)
I think unless you change the design of your database, this is always going to be a bit flaky.John
possiblly this is data that has already been "pivoted"...if...
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
September 5, 2016 at 10:03 am
Eirikur Eiriksson (9/4/2016)
😎
USE TEEST;
GO
SET NOCOUNT ON;
;WITH DEMO(ID,FromTime,ToTime) AS
(
SELECT
...
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
September 4, 2016 at 1:51 pm
I've tried to use min/max in the select query using group by. But it didn't work
please post code that didnt work......min/max with group by does work
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
September 4, 2016 at 1:43 pm
do you have time differences of greater than 24 hours?
eg
;WITH DEMO(ID,FromTime,ToTime) AS
(
SELECT
ID
...
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
September 4, 2016 at 7:19 am
TheSQLGuru (9/2/2016)
2) There...
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
September 2, 2016 at 9:42 am
Steven.Grzybowski (9/2/2016)
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
September 2, 2016 at 7:12 am
sm_iransoftware (9/1/2016)
Thanks alot "J Livingston SQL"
You wrote smart query . But I need this result. It means I need All orderitem records with their final status :
Like this...
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
September 1, 2016 at 3:57 pm
am I being a bit stupid here....but given the following I get the same results for each city ???
shouldnt it
London 0.75
Madrid 0.25
Declare @t table(City varchar(6),YearMonth varchar(7),Gender varchar(7), Records int)
insert...
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
September 1, 2016 at 10:11 am
can you please provide create table script and insert data script and your expected results based on your sample data.....as per earlier requests.
you will find you will get better and...
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
September 1, 2016 at 4:28 am
is this
#test_account
AcctNum|Payment|Adjustments|AdjSurcharges|Aj_Tax|TrxCharges|TrxSurcharges|TrxThirdPartyCharges|TrxTax|LateFee|PreviousBalance
43913440.000.000.000.00523.4013.520.000.000.000.00
43410130.000.000.000.00379.7311.340.0034.470.000.00
43643990.000.000.000.00648.7918.3018.750.000.00263.73
CurrentBalance|Balance1|Balance2|Balance3|Balance4|Balance5|TransCount|LastAdjDate|LastTrxDate
536.920.000.000.000010900:00.035:57.2
425.540.000.000.00008100:00.042:06.8
685.84123.48140.250.00004900:00.054:18.7
one table or two tables?
suggest you read this article https://spaghettidba.com/2015/04/24/how-to-post-a-t-sql-question-on-a-public-forum/ and repost with some usable scripts
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
September 1, 2016 at 2:58 am
maybe something to build on ??
SELECT Id
FROM Table_Order
EXCEPT
(
SELECT OrderId
FROM Table_ReturnORD
);
SELECT O.Id,
OI.ItemId,
...
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
August 31, 2016 at 7:52 am
the ItemId's in the Orders/returns tables are entirely different...is this a typo?
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
August 31, 2016 at 4:50 am
edit deleted...not a good solution sorry !
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
August 30, 2016 at 10:54 am
Viewing 15 posts - 406 through 420 (of 2,452 total)