if you can't track down all the life connections and you need to force changes:
use master
alter database db_name set offline with rollback immediate
As a point of reference
how to convert a comma delimited file to an SQL insert
Assuming your data is the following
'key','value','0'
'key','value','1'
In notepad++ the syntax for search and replace would be as follows:
search: ('[^']+','[^']+','[^']+')
replace: (\1)
syntax varies depending on the flavour of regex
which can then have an insert statement added and...:
insert into table (key_value, value_blah, personal_id)
values
('key','value','0')
('key','value','1')
deleteing columns in Textpad
INSERT INTO "IB_RESOURCE_MESSAGE" (IB_MESSAGE_ID,IB_VALUE,IB_KEY,IB_BUNDLE_ID) VALUES (0,'Welcome #{identity.username}','loginSucceeded',0)
to delete the first value column (1, .... use the following
([0-9]+,
the plus will search for recurring instances of the pattern [0-9]
based on
ORDER_TRANSACTION
__________
1|ORDER__|
2|CREDIT__|
3|REFUND_|
4|PAYMENT|
Instead of the following:
SELECT
ot
FROM
OrderTransaction
AS
ot
WHERE
ot.transactionType.transactionTypeDesc = 'Credit'
OR
ot.transactionType.transactionTypeDesc = 'Refund'
OR
ot.transactionType.transactionTypeDesc = 'Payment'
you could use:
SELECT
ot
FROM
OrderTransaction
AS
ot
WHERE
ot.transactionType.transactionTypeDesc IN ('Credit','Refund','Payment')
or:
SELECT
ot
FROM
OrderTransaction
AS
ot
WHERE
ot.transactionType.transactionTypeDesc NOT IN ('Order')