currently I'm using vb's string functions (such as .replace, .split, .mid) to parse and process the columns and conditions of a sql SELECT statement into two listboxes
It works fine, BUT, I'm trying to find a more efficient way to perform this using the regex alternative. I'm not very good with regex, thats why Im asking
the regex shouldnt be too hard because the SQL statements ONLY have basic SELECT and WHERE clauses for only ONE table/view, and no JOINs, no OR
For example,
the sql statement above is as hard as it would get
So, with my vb code, the statement would translate into two listboxes
listbox1 items
ID
PurchaserFirstName
PurchaserDate
Email
PhoneNumber
listbox2 items
PurchaserFirstName <> "John"
PurchaseDate >= "05/02/2004"
Email LIKE "%yahoo%"
It works fine, BUT, I'm trying to find a more efficient way to perform this using the regex alternative. I'm not very good with regex, thats why Im asking
the regex shouldnt be too hard because the SQL statements ONLY have basic SELECT and WHERE clauses for only ONE table/view, and no JOINs, no OR
For example,
VB.NET:
SELECT ID, PurchaserFirstName, PurchaseDate, Email, PhoneNumber FROM Accounts WHERE PurchaserFirstName <> "John" AND PurchaseDate >= "05/02/2004" AND Email LIKE "%yahoo%"
the sql statement above is as hard as it would get
So, with my vb code, the statement would translate into two listboxes
listbox1 items
ID
PurchaserFirstName
PurchaserDate
PhoneNumber
listbox2 items
PurchaserFirstName <> "John"
PurchaseDate >= "05/02/2004"
Email LIKE "%yahoo%"
Last edited: