Viewing 15 posts - 511 through 525 (of 7,191 total)
Well, if we don't know what your real data looks like, it's difficult for us to help. That's why I asked for representative sample data along with expected results.
John
May 10, 2019 at 8:16 am
What indexes do you have on the tables? Please post an actual execution plan for the query (the .sqlplan file, not just a picture, please).
John
May 10, 2019 at 8:14 am
So your actual code really really uses only one line of data? If that really is the case, why do you need MAX, DISTINCT and PARTITION BY?
John
May 10, 2019 at 7:58 am
Looks like your browser or something else has changed the less than sign into the HTML code "<".
John
May 9, 2019 at 3:00 pm
You're not selecting from any tables, so there's nothing to update. Just include that particular manipulation in your SELECT statement. Your actual data clearly has more than the one row...
May 9, 2019 at 9:07 am
There's probably further improvements you could make, but here's how to eliminate the temp table:
WITH y AS (
SELECT
testing1
, ...
May 9, 2019 at 7:57 am
I think you'll need to reconfigure your linked server object as well. The error message suggests that you are trying to force Windows credentials where it's expecting a SQL login. ...
May 8, 2019 at 3:50 pm
Without any sample data, or knowing what is garbage about your results, it's difficult to help you.
Presumably you're looking for the top 5% of durations for each proc? In which...
May 8, 2019 at 2:42 pm
Simon
Have you tried the NTILE function?
John
May 8, 2019 at 1:15 pm
I agree with Y.B. - expected results would make it much clearer what you're after. For example, what do you mean by "deleted or updated"?
Here's a guess. It doesn't fit...
May 3, 2019 at 3:09 pm
It's because you haven't set a value for @Processed. Also, this is going to break if you ever update more than one row with a single UPDATE statement. Do it...
May 1, 2019 at 10:49 am
Are you using SQL Server? There's no such thing as "Now()", as far as I know.
Something like this may work for you:
UPDATE B
SET expired = -1
FROM GCDF_DB..BillingThirdNotice...
April 29, 2019 at 3:35 pm
Yes, aklt's solution is right. But be careful in case any rows were legitimately deleted after the accidental deletions - you won't want to include those in your INSERT statement.
John
April 29, 2019 at 7:51 am
I'm not sure that a relational database is the place to store unstructured data like this. The reason I say that is that you don't know what data is going...
April 26, 2019 at 12:27 pm
I'd be tempted to import it into a single-column staging table and do the transformations from there.
John
April 26, 2019 at 10:41 am
Viewing 15 posts - 511 through 525 (of 7,191 total)