Ask a Question related to ASP Database, Design and Development.
-
Aaron Bertrand - MVP #1
Re: Substring Matching
> I'm relatively new to SQL Server, and I was just wondering if anyone had a
SELECT * FROM table WHERE SUBSTRING(column, 1, 4) = 'anti'> few site links which would show how to select with wildcards. (i.e.
> Selecting anti would return antibiotic, antipod, antioch, etc.)
SELECT * FROM table WHERE LEFT(column, 4) = 'anti'
SELECT * FROM table WHERE column LIKE 'anti%'
Assuming the number of columns, and their data types, are identical:> Also, how do I take the results from two separate SELECT statements and
> merge them into a single recordset for processing?
SELECT column1, column2 FROM table1
UNION ALL
SELECT column1, column2 FROM table2
--
[url]www.aspfaq.com[/url]
Aaron Bertrand - MVP Guest
-
Using a substring in SQL WHERE
Hi all. Need a little help getting my WHERE right. I have a short date field in my Access database called eventdate. I need to form my WHERE... -
AREs in substring(from)
As the documentation leads me to expect, my Postgresql 7.4 installation produces: select substring('Bar, Foo' FROM '.') -> 'B' but even... -
Substring question
I am trying to select a part of a text field based on a regular expression, the data looks like this Rv0001c_f Rv0002_r Rv1003c_r Etc I... -
substring: to the end of the string
Hi! Is there any easiest way to get the substring starting from the 3rd character? my solution: str which seems quite odd :-/ What if,... -
Testing for substring
I have a news headline grabbed from another page in the same site. The data is captured like so: $post=mysql_fetch_row($res2); $post=$post; I...



Reply With Quote

