Try to do like this: SELECT naimenovaniye FROM TableOborudovaniye WHERE specialnost like '%М%'Doing like this you ensure that any space or character misclicked will be out.
Why is my query not working?
vitaminchik
486
Reputation points
my request:
SELECT naimenovaniye FROM TableOborudovaniye WHERE specialnost= 'М'
I want to get a list of equipment names where specialnost=M
SQL Server | Other
Answer accepted by question author
1 additional answer
Sort by: Most helpful
-
Anonymous
2023-04-24T07:27:20.7266667+00:00 Hi @vitaminchik
Based on the image information you provided, I tried to create a table and insert test data.
create table dbo.TableOborudovaniye( ID int identity(1,1) not null, specialnost nchar(10) not null, naimenovaniye NVARCHAR(MAX) not null, chastota int not null, kratkoe_opisaniye NVARCHAR(MAX) null, PRIMARY KEY CLUSTERED(ID ASC) ); insert into TableOborudovaniye values ('M','Juki DDL-9000B-SS',1,'AS'), ('C','Typical GN-795',5,'ad');Run the same query statement and it can get the result.
Can you provide your complete table creation statement and some test data? This helps to solve the problem.
Best regards,
Percy Tang