Viewing 15 posts - 571 through 585 (of 1,491 total)
If you want an EXISTS equivalent to the IN try:
SELECT adminproduct_id,rowversionnumber,therapyadmin_id,packagedproduct_id,adminrecordmethod
,actioncode,doseamount,doseunits,dispensableproduct_id,dispensesize,routedproduct_id
,dosetext,lotnumber, expirationdate,manufacturercode
FROM hcs.adminproduct P
WHERE EXISTS
(
SELECT 1
FROM hcs.therapyadmin T
WHERE T.therapyadmin_id...
March 27, 2017 at 8:19 am
If you are on at least SQL2012, I suspect the easiest approach would be to create a sequence and then add that sequence as the default constraint on the column.
March 23, 2017 at 3:26 am
You probably need to ensure that all the filters on the outer table are in the JOIN and not the WHERE clause.
Logically the FROM clause, with JOINS, is processed...
March 22, 2017 at 6:57 am
Jon 0x7f800000 - Monday, March 6, 2017 9:47 AMWhat confuses me though
It confuses me as well! I find the SQL Server documentation...
March 6, 2017 at 2:24 pm
Sounds like a race condition on insert.
I would forget about the explicit transaction and run the following:
UPDATE t1
SET table1.column1 = l.staging_2,
table1.column2 = l.staging_3
March 6, 2017 at 9:11 am
Also, check the number of VLFs on the source db.
DBCC LOGINFO
If the number of rows is greater than about 200 look at reducing them:
February 16, 2017 at 7:46 am
Your problem is the cursor.
It is difficult to write a set based approach without DDL and comsumable test data.
Try something like the following:
--declare @TransactionEffDate DATETIME2(3) =...
February 16, 2017 at 7:22 am
Bulk-logged still has a couple of problems:
1. Point in time recovery will not work for any time the DB was in bulk-logged mode.
2. While bulk-logged recovery logs less...
February 14, 2017 at 6:26 am
You might be able to use fn_dump_dblog to read your log backups:
December 20, 2016 at 7:38 am
While there are performance reasons for not using linked servers, I suspect the main reason your architect team does not want them used is if the link goes down then...
December 20, 2016 at 2:58 am
Another thing to add to mix is in high transaction environments where foreign keys look up primary keys on another table.
If the primary key on the other table is clustered,...
December 17, 2016 at 8:26 am
SQL-DBA-01 (12/14/2016)
The SQL Server is Express Edition...so I need a simple solution as I cant schedule the jobs to run through Agent.
Ola Hallengren's solution is the simple and tested solution.
(Well...
December 14, 2016 at 11:07 am
SQL-DBA-01 (12/12/2016)
Both the servers as being in different domains, do not talk to each other.
In my case I can login to the remote server using a local user...
December 12, 2016 at 10:04 am
I have a similar problem in getting backups off a production server in a timely manner.
(I also have to encrpyt them with 7-Zip as it only runs standard edition.)
Running a...
December 12, 2016 at 9:13 am
Viewing 15 posts - 571 through 585 (of 1,491 total)