Skip to content

Commit 6f66457

Browse files
committed
tidy up sql
1 parent 7325828 commit 6f66457

File tree

1 file changed

+4
-21
lines changed

1 file changed

+4
-21
lines changed

src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/DataReaderTest/DataReaderTest.cs

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -806,16 +806,7 @@ public static async Task CanReadLargeNTextColumn()
806806
using (var cmd = cn.CreateCommand())
807807
{
808808
cmd.CommandText = $"""
809-
if exists (select *
810-
from sysobjects
811-
where name = 'Expl_User_Global_Sets_'
812-
and xtype = 'U')
813-
814-
begin
815-
drop table dbo.Expl_User_Global_Sets_
816-
end
817-
818-
create table {tableName}
809+
create table [{tableName}]
819810
(
820811
User_ID varchar(22) not null,
821812
StringName varchar(255) not null,
@@ -829,7 +820,7 @@ StringName varchar(255) not null,
829820
IsProtoCorrected bit default 1
830821
)
831822
832-
insert into {tableName}(User_ID, StringName, IsGlobal, List, UseProtoSerializer, ModuleNameForUse,
823+
insert into [{tableName}](User_ID, StringName, IsGlobal, List, UseProtoSerializer, ModuleNameForUse,
833824
IsReadOnly, VersionNumber, UserGlobalSet_ID, IsProtoCorrected)
834825
values ('80004Q4WZ1350KO8NT59RM', '_', 1, '{stringValue}', 1, 2, 1, 1, newid(), 1);
835826
@@ -839,18 +830,10 @@ StringName varchar(255) not null,
839830

840831
cmd.CommandText = $""""
841832
SELECT
842-
--[gs].[UserGlobalSet_ID],
843-
--[gs].[User_ID],
844-
--[gs].[StringName],
845-
--[gs].[IsGlobal],
846833
[gs].[List],
847-
[gs].[UseProtoSerializer]--,
848-
--[gs].[ModuleNameForUse],
849-
--[gs].[IsReadOnly],
850-
--[gs].[VersionNumber],
851-
--[gs].[IsProtoCorrected]
834+
[gs].[UseProtoSerializer],
852835
FROM
853-
{tableName} [gs]
836+
[{tableName}] [gs]
854837
WHERE
855838
([gs].[IsGlobal] = 1 OR [gs].[User_ID] = '{"80004Q4WZ1350KO8NT59RM"}') AND
856839
([gs].[ModuleNameForUse] IS NULL OR [gs].[ModuleNameForUse] = {2})

0 commit comments

Comments
 (0)