Viewing 15 posts - 16 through 30 (of 107 total)
Ok. I was able to get the records in the involved page crating deadlock... What's the best way to handle page lock ?
All I can think of is to forcing...
February 28, 2021 at 6:30 pm
But as of now what do you think Phil ? I really want to go with new database (with new schema in new DB is good idea) but want to...
February 16, 2021 at 3:35 pm
Phil, glad I asked. The other system is somewhat very poorly written so we are re engineering it while moving to our system. So lots of table structures will be...
February 16, 2021 at 2:06 pm
By system here means application. We have application "A" with database "D". Now another application say "B" with its own database "DB1" on another server is getting merged with our...
February 16, 2021 at 1:35 pm
Can anyone please help on this please ?
April 8, 2020 at 3:17 am
Here is the script to have data at initial stage. Here table Target acts as SCD type 2 table
IF OBJECT_ID('tempdb.dbo.#Source', 'U') IS NOT NULL
DROP TABLE...
April 6, 2020 at 9:35 pm
Off course. Here it goes.
Source table contains data like this:
EmpId attr1 attr2 attr3 attr4 effStartDate effEndDate
E1001 abc xyz knop sts '2015-06-01 00:00:00.000' '9999-12-31 00:00:00.000'
E1002 vah sje jshu kjd '2015-01-01 00:00:00.000'...
April 6, 2020 at 10:55 am
Mr or Mrs 500, i was able to get that information using substring. Its the other part where i have to make up the value and join that value with...
October 18, 2019 at 7:16 am
I need query to get value of col_abc3 for year 2019 and month 2 based on value of col_processed which is abc2.
October 18, 2019 at 5:04 am
But why an Insert based error when all i am trying to do an update
October 1, 2019 at 5:44 pm
Yeah i know Heb. Let me post my complete query. Its like this (pls check if there's something wrong):
Insert into scdmain(
Id, col1, col2, col3, scdstartdate, scdenddate
)
Select Id, col1, col2, col3,...
October 1, 2019 at 2:26 pm
In addition, if i mention "when not matched by source then delete", it works like a charm and deletes the record which is present in target but not in source.
October 1, 2019 at 1:57 pm
No trigger. Even i was surprised by this error. When i remove this "when not matched by source", it runs smoothly. Just that the record which is present in target...
October 1, 2019 at 1:55 pm
Exactly that's what i am looking for but "when not matched by source" is not working for the UPDATE. It throws error like "cannot insert the value NULL into column...
October 1, 2019 at 12:10 pm
Yes i checked and basically you are updating the status before the merge statement. Is it possible to do all in one single merge statement ?
September 30, 2019 at 10:35 pm
Viewing 15 posts - 16 through 30 (of 107 total)