Viewing 15 posts - 1,306 through 1,320 (of 2,648 total)
SELECT Date,
SUM([101]) OVER (ORDER BY Date) Acct#1,
SUM([201]) OVER (ORDER BY Date)...
November 19, 2019 at 4:51 pm
I'm not sure if the OVER clause is available in SQL 2008, if it isn't you can use this method:
SELECT a.Date,
...
November 19, 2019 at 4:03 pm
SELECT Date,
SUM([101]) OVER (ORDER BY Date) Acct#1,
SUM([201]) OVER (ORDER BY Date) Acct#2,
...
November 19, 2019 at 3:56 pm
Don't know how come I missed that. The BWAvg will be NULL when the data is inserted and will be updated later.
insert into tblData3 Values ('4567','ABC',NULL)
insert... November 19, 2019 at 3:50 pm
It would be helpful if you could show what results are expected.
There is no data in tblData3 so I don't see how you can do an update?
November 19, 2019 at 1:52 pm
I also realize that this post is really old but below is a script I put together that could be helpful to others running across this post. This...
November 18, 2019 at 10:49 pm
Regarding question #3, let's say I didn't have columns called "Installed" and "Date Received." I just put those in there to give examples of other fields. So I I...
November 18, 2019 at 2:08 am
November 18, 2019 at 1:11 am
I usually don't accept a method claimed to be "most efficient" without data to support. More importantly, I don't like your tone. Could you please not use words like...
November 17, 2019 at 5:54 pm
I think you need a new CycleParts table with two columns CycleId and PartId. You need 2 foreign keys on this table. One pointing to the Cycle table the other...
November 17, 2019 at 4:41 pm
this is a very typical leading zero problem. I listed the following five ways doing this. Method 5 is the shortest one. Google may provide more hints.
Why on Earth...
November 17, 2019 at 4:01 pm
First I would try adding this index to table CommoditySupplier:
CREATE INDEX IX_CommoditySupplier_CommodityID_INC_SupplierID
ON CommoditySupplier(CommodityID) INCLUDE (SupplierID);
If that doesn't...
November 15, 2019 at 11:00 pm
SELECT STUFF('00000', 5, 1, '1');
00001
SELECT STUFF('00000', 4, 2, '12');
00012
SELECT STUFF('00000', 3, 3, '698');
00698
lol, I take it that is a joke?
November 15, 2019 at 5:04 pm
declare @i as int=16
select right('00000'+convert(varchar,@i),5)
November 15, 2019 at 4:34 pm
Why have you posted this in SQL 2017 when it's for SQL 2014? What do you mean by getting struck? Did you mean stuck? What are you trying to do?...
November 15, 2019 at 2:04 pm
Viewing 15 posts - 1,306 through 1,320 (of 2,648 total)