Hi, the Microsoft SQL Server version is 2000


Basically I want use a basic regular expression but can't seem to get the syntax right.

i want to compare ID_short = ID_Long

ID_short is a truncated version of ID_Long, and I want to search on the beginning only (hence I can't use the 'LIKE' comparative on it's own).

What is the syntax to use Reg Expressions (or if anyone knows a non RegExp way of searching the beginning please let me know).

Thanks

Recommended Answers

All 2 Replies

... and I want to search on the beginning only ...

Can you give an examle?

Do you know wildcards % and _ ?

krs,
tesu

ID_short is a truncated version of ID_Long

say if ID_short has limited number of characters,then u can use
ID_short=substring(id_Long,X,Y)
or
ID_short=left/right(id_Long,X)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.