Viewing 15 posts - 3,031 through 3,045 (of 7,609 total)
Float values are not exact, they are approximate. Internally, float 0.55 might be 0.550000000001. CEILING goes up to the next int value no matter how small the amount above the previous...
December 12, 2018 at 3:02 pm
I'm genuinely confused.
Your q states"How can I combine the three queries to one". We write queries that combine the 3 queries into a single query.
But then...
December 11, 2018 at 2:47 pm
December 11, 2018 at 11:15 am
It could be more efficient to get only typeid from table1 in the first pass, like below. This depends on indexing and the cardinality (how many t1 rows have typeids...
December 11, 2018 at 10:43 am
December 11, 2018 at 10:27 am
I'd be concerned with staying within the maintenance window - steps 1 through...
December 10, 2018 at 12:45 pm
Since you're only keeping ~1/6 of the data, you may want to consider a different approach.
Backup up everything (of course!). You might even want to make another copy...
December 10, 2018 at 11:48 am
SELECT [Product Line]
FROM dbo.[Table]
GROUP BY [Product Line]
HAVING MAX(CASE WHEN [Business Unit] = '' THEN 1 ELSE 0 END) = 1 AND
MAX(CASE...
December 7, 2018 at 10:57 am
If there is any (non-filtered) index keyed first on id, then MAX(id) will do an index seek/lookup. Internally it could officially be a scan, but it will be a scan...
December 5, 2018 at 10:18 am
If the job owner has 'sa' level permissions, then the job is run under the Agent's service account, and thus using its permissions to other resources -- drives, network, etc..
November 30, 2018 at 2:48 pm
I assume you have space in prod to restore the db to a diff name?
If so, you could:
1) restore the db to a diff name
2)...
November 30, 2018 at 2:44 pm
To avoid having to lookup every duplicate tab1.col1 value in tab2, which is pointless, I'd try this query:
SELECT t1.col1
FROM (
SELECT DISTINCT col1...
November 29, 2018 at 3:36 pm
I don't see the non clustered index on OfferGenerateDate used, and do not understand why the clustered on OfferID is used.
SQL has a very strong built-in preference...
November 29, 2018 at 3:16 pm
Some quick thoughts:
1. Why not a 5-minute interval? I don't know of anything other than a payment system that would need a lower interval than that.
2....
November 28, 2018 at 2:13 pm
Viewing 15 posts - 3,031 through 3,045 (of 7,609 total)