Share via

return rows that start with ADP[Y]

T L 20 Reputation points
2023-10-23T06:58:07.83+00:00

Hello!

I have a column called ProductID.

Example:

('ADP[Y]2149')

('ADP[X]6433')

I have tried this query.

select * from Producttable where ProductID like 'ADP[Y]%'

But the query did not return any rows.

I need to return rows that start with ADP[Y].

SQL Server | Other
SQL Server | Other

Additional SQL Server features and topics not covered by specific categories

0 comments No comments

Answer accepted by question author

Anonymous
2023-10-23T07:00:09.16+00:00

Hi @T L

You can try this.

select * from Producttable where ProductID like 'ADP\[Y]%' ESCAPE '\';

Best regards,

Percy Tang

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.