Export the users and group mapping list.
Seems there’s no feature / plugins for this requirement. If you can access the database, then everything is easy:
SELECT member.[ID]
,[membership_type]
,[group_type]
,[parent_name]
,[lower_parent_name]
,[child_name]
,[lower_child_name]
,member.[directory_id], jira_user.display_name
FROM [jiradb].[jiraschema].[cwd_membership] member
left join [jiradb].[jiraschema].[cwd_user] jira_user
ON member.child_name = jira_user.user_name
order by parent_name
Select some data using ‘IN’ clause, the result should keep the same order as the in conditions.
SELECT SECCODE, SECSNAME FROM SECURITY
WHERE SECCODE IN
('1U68',
'1F77')
ORDER BY
CharIndex(LTRIM(RTRIM([SECCODE])), '1U68, 1F77')
In MySQL, you can use “Order By Field()
http://www.electrictoolbox.com/mysql-order-specific-field-values/
Use sql to delete all the spam comments quickly:
SELECT DISTINCT comment_approved FROM `x_comments`
Results:
0 – Pending
1 – approved
spam – spam
trash – trash
–delete spam & trash:
DELETE FROM `dbName`.`x_comments` WHERE comment_approved = 'spam' or comment_approved = 'trash'
--delete pending: DELETE FROM `dbName`.`x_comments` WHERE comment_approved = '0'
Kindly remind you:
Do trim the join fields for your ‘MergeJoin’:
Otherwise it may take hours to debug!!
SELECT LTRIM(RTRIM(seccode)) AS seccode….
I got an Error in a SSIS package:
cannot convert between unicode and non-unicode string data types.
We can use one component called ‘DataConversion’, but I think directly convert the type in SQL will be better.
DECLARE @str_unicode NVARCHAR(32);
SET @str_unicode = NCHAR(9734);
SELECT @str_unicode
— Using CAST
SELECT CAST(@str_unicode AS VARCHAR(32))
— Using Convert
SELECT CONVERT(VARCHAR(32), @str_unicode)
Result:
// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.