Viewing 15 posts - 2,326 through 2,340 (of 13,874 total)
Stepping back a little, have you tried importing your database into a Visual Studio database project and then attempting a build? That should throw out various errors and warnings to...
November 11, 2020 at 6:15 pm
What do you mean by XML query? An XPATH query?
November 11, 2020 at 4:08 pm
Can you please provide sample DDL and INSERT scripts to create your sample data?
Can you also describe exactly how the dataset should be ordered?
November 10, 2020 at 7:41 pm
Once you have some ordering in place, one solution is as follows:
DROP TABLE IF EXISTS #SomeTab;
CREATE TABLE #SomeTab
(
rn INT NOT NULL
...
November 10, 2020 at 2:37 pm
This is not possible as it stands, because the NULL rows do not have any ordering.
What I mean is, there is nothing to associate the first two NULL rows with...
November 10, 2020 at 2:17 pm
The fact that the load to text file is quick suggests (to me, at least) that one or both of
is...
November 4, 2020 at 9:26 pm
Try something like this (I wasn't sure of the names of your source and target tables, so I'll leave that to you):
DECLARE @MaxInsertDate DATETIME
...
November 4, 2020 at 7:01 pm
Could you
SELECT MAX(Last_Updated)
from your target table and use that instead?
November 4, 2020 at 5:28 pm
dface_21 wrote:Currently, I don't have the value stored anywhere.
How do you know when the job last ran?
+1, if you don't know when it last ran, this is close to...
November 4, 2020 at 5:26 pm
I do not. What would be the best way to go about that as a variable?
When the job runs, does it write to a log table? (Containing, for example,...
November 4, 2020 at 4:42 pm
You need to set the value of the @LastJobRun parameter before executing that query.
Do you have this stored somewhere?
November 4, 2020 at 4:23 pm
You could automate the backup/restore process with a bit of scripting.
If you have enough space on your 'data query' server to host two versions of the database, you could do...
November 3, 2020 at 9:09 pm
You could create a calculated, persisted column in your table definition and SELECT that instead.
November 3, 2020 at 8:57 pm
that worked.thanks
And mine didn't? For the sample data you provided, I think it did; it's fast too.
If, as Scott no doubt correctly surmised, your actual data contains variations on...
November 3, 2020 at 7:48 pm
November 3, 2020 at 4:16 pm
Viewing 15 posts - 2,326 through 2,340 (of 13,874 total)