Viewing 15 posts - 991 through 1,005 (of 7,187 total)
January 3, 2018 at 2:21 am
You don't want to do the calculation twice if you don't have to. Try this:
SELECT CONCAT(F.FloorWeight,'lbs ',(W.WeightinPounds - F.FloorWeight)*16,'oz') as PtWeight
FROM #T t
CROSS APPLY...
December 29, 2017 at 9:13 am
No, just subtract the integer part, which you get by using FLOOR.
John
December 29, 2017 at 8:33 am
December 29, 2017 at 8:23 am
Multiply by 2.2 to convert to pounds and multiply the resulting decimal part by 16 to get the ounces.
John
December 29, 2017 at 8:10 am
Those aren't the full definitions - you haven't included primary keys or any other constraints. Since the error is a primary key violation, it's important to know something about the...
December 29, 2017 at 7:41 am
How often does this happen? The best place to start, I think, would be to download sp_whoisactive (if you don't already have it) and run it next time tempdb is...
December 29, 2017 at 2:15 am
December 28, 2017 at 8:45 am
Without table DDL and sample data, we're just guessing. However, this may be close to what you're looking for:
WITH NumberedbyMachine AS (
SELECT
RV.Name0,
UCS.Status,
UCS.LastStatusChangeTime,
December 28, 2017 at 8:43 am
nirav.gandhi7 - Wednesday, December 27, 2017 6:31 AMmy plan more then 2 MB. any option to upload
What are you trying to upload...
December 27, 2017 at 7:00 am
I'm guessing the two correlated subqueries are slowing you down. Each one is executed once for each row in your result set. Please post your execution plan for help with...
December 27, 2017 at 6:17 am
You'll need to use a splitter function to break your strings down into their individual elements, something like this (not tested because I don't actually have the splitter...
December 27, 2017 at 5:44 am
What is the result of the second query? My guess is that the first one takes so long because it has to return all the data to the client. The...
December 27, 2017 at 5:31 am
December 27, 2017 at 4:21 am
I don't remember "number" being a data type in SQL Server 2000. Is that really what you're using? If it is, please post correct table DDL.
December 22, 2017 at 3:33 am
Viewing 15 posts - 991 through 1,005 (of 7,187 total)