Viewing 15 posts - 2,311 through 2,325 (of 13,870 total)
Given the ID 3347 value, can you confirm that the grouping should be on Name only?
And how do you determine the order in which the new IDAII values are assigned?
November 16, 2020 at 3:43 pm
The only reason I can think of would be if there is other code which pertains only to the first condition – like this
IF @Var1 = @VarA
...
November 13, 2020 at 9:31 pm
Try this instead
SELECT TOTAL_ACCT_NUM = COUNT(ACCT_ID) OVER (PARTITION BY ACCT_ID)
,ACCT_ID
,BUSINESS_NAME
...
November 13, 2020 at 2:02 pm
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
Viewing 15 posts - 2,311 through 2,325 (of 13,870 total)