Viewing 15 posts - 61 through 75 (of 686 total)
This is the snippet from script. The serverInstance and Query both use servers that have the Dash(-) in their names.
stopwatch = [System.Diagnostics.Stopwatch]::StartNew()
# Define your SQL Server instance...
May 30, 2024 at 2:24 pm
I don't have access into the app ... The deletes and inserts all have same formats I showed Inserts above and the deletes
DELETE FROM cstSums WHERE PartNbr='132883D01' AND PlantCd='CORP' AND...
April 28, 2024 at 2:55 pm
There is an app that was sending DML requests from a SQL2016 to SQL2008, and we saw lots of issues and it could have been driver related where record locks...
April 28, 2024 at 11:43 am
I can easily make it a csv file for Bulk Insert and YES there will be data on the Insert statements that have:
VALUES('967120411','864A90D40','CORP','Standard'
Can you show me the frame work of...
April 27, 2024 at 11:33 am
Jeff,
How would data being in csv be handled differently?
Thanks.
April 26, 2024 at 6:01 pm
thanks
The sqltoexec are passed in sql statements like:
INSERT INTO cstDetails (CompPartNbr,PartNbr,PlantCd,CostKey,usgQty,scrQty,totQty,UnitCost,usgCost,scrCost,totCost,StrJCost,StrMCost,SetUpQty,SetUpCost,CurrentOPRSetup) VALUES('967120411','864A90D40','CORP','Standard',0.2697,0.0043152,0.2740152,6.5,1.75305,0.0280488,1.7810988,0,0,0,0,0)
The CrtInsert table has a PK field called ID(int)
In the example how do I loop thru thousands of records
April 26, 2024 at 10:37 am
Thanks Brian for all of your replies. and suggestions can you look at this code and tell me if this would handle processing the table with a batchsize of 50,000...
April 23, 2024 at 11:52 pm
The table will be cleared out before this new process runs, but I do need to process by ID..
Could it multi process the table?
Thanks
April 22, 2024 at 7:04 pm
Thanks for replies and alarms of this type of approach -- defiantly something that has been discussed.
With the approach above how it will scale when removing the where ID =1...
April 22, 2024 at 3:00 pm
DECLARE @Counter INT = 1;
DECLARE @MaxCount INT = 1; -- Set this to the number of times you want to run the insert
DECLARE @SQLString NVARCHAR(MAX);
DECLARE @ParmDefinition NVARCHAR(MAX);
WHILE...
April 20, 2024 at 11:32 pm
I must have something wrong as it's error'ing
This is what a single sqlToExec where ID=1 looks like
delete from cstSums WHERE PartNbr='81K000000' AND PlantCd='CORP' AND CostKey='Standard'
Thanks for reply.
April 20, 2024 at 9:40 pm
I tried this but it didn't delete record
DECLARE @Counter INT = 1;
DECLARE @MaxCount INT = 1; -- Set this to the number of times you want to...
April 19, 2024 at 6:06 pm
The query that feeds this table is very specific (Only Insert) in what gets added to the sqltoexec can it be done without using a cursor?
Thanks for your reply.
April 17, 2024 at 10:44 pm
Viewing 15 posts - 61 through 75 (of 686 total)