Skip to content

Commit

Permalink
Use DISTINCT for sp_helpuser
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Teng <[email protected]>
  • Loading branch information
Jason Teng committed Dec 19, 2023
1 parent bdf1df0 commit 43c065f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion contrib/babelfishpg_tsql/sql/babelfishpg_tsql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2329,7 +2329,7 @@ BEGIN
AND database_name = DB_NAME()
AND type != 'R')
BEGIN
SELECT CAST(Ext1.orig_username AS SYS.SYSNAME) AS 'UserName',
SELECT DISTINCT CAST(Ext1.orig_username AS SYS.SYSNAME) AS 'UserName',
CAST(CASE WHEN Ext1.orig_username = 'dbo' THEN 'db_owner'
WHEN Ext2.orig_username IS NULL THEN 'public'
ELSE Ext2.orig_username END
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ BEGIN
AND database_name = DB_NAME()
AND type != 'R')
BEGIN
SELECT CAST(Ext1.orig_username AS SYS.SYSNAME) AS 'UserName',
SELECT DISTINCT CAST(Ext1.orig_username AS SYS.SYSNAME) AS 'UserName',
CAST(CASE WHEN Ext1.orig_username = 'dbo' THEN 'db_owner'
WHEN Ext2.orig_username IS NULL THEN 'public'
ELSE Ext2.orig_username END
Expand Down

0 comments on commit 43c065f

Please sign in to comment.