| | |
Question about SQL statement
Please support our MS SQL advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jun 2005
Posts: 92
Reputation:
Solved Threads: 0
I have a question about the possible string match in sql statement, for example I have variable "$val=abc", I can write:
this will list all recoreds that the field contains sub-string "abc".
Now the question is: if I have a string for example "$val=893abc82", is it possible to "partial match" the field in sql statement and populate the same records? in other words, if the DB field data has the same substring as those from the variable, then list those records? is it possible? thanks for any advice.
MS SQL Syntax (Toggle Plain Text)
SELECT * FROM TABLE WHERE FIELD LIKE '%$val%'
Now the question is: if I have a string for example "$val=893abc82", is it possible to "partial match" the field in sql statement and populate the same records? in other words, if the DB field data has the same substring as those from the variable, then list those records? is it possible? thanks for any advice.
![]() |
Similar Threads
- is there something wrong with my SQL statement? (PHP)
- Syntax error in "like" in sql statement (ASP.NET)
- SQL statement error (ASP.NET)
- sql statement (Visual Basic 4 / 5 / 6)
- run sql statement in asp (ASP)
Other Threads in the MS SQL Forum
- Previous Thread: Join 3 tables
- Next Thread: Views in SQL
| Thread Tools | Search this Thread |
autogrowth connectingtodatabaseinuse count cursor data database datepart dbsize deadlock delete_trigger highperformancecomputing hpc hpcserver2008 ibm iis loop maximum microsoft ms mssql multiple multithreading news number permission query reporting result server services sets source sql sqlserver sqlserver2005 supercomputing tables uniqueid update view





