Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
gjja
Starting Member
17 Posts |
Posted - 2005-12-14 : 05:25:15
|
| Some of my records starts with a double quote, when I do a search for all records starting with A I can get all except the ones that start "A fine day ... |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-12-14 : 05:31:42
|
| Try theseSelect columns from yourTable where col like 'A%' or col like '"A%'orSelect columns from yourTable where replace(col,'"','') like 'A%'MadhivananFailing to plan is Planning to fail |
 |
|
|
shallu1_gupta
Constraint Violating Yak Guru
394 Posts |
Posted - 2005-12-14 : 05:34:24
|
| Hi,you can put an or conditionwhere record like 'A%' or record like '"A%' |
 |
|
|
gjja
Starting Member
17 Posts |
Posted - 2005-12-14 : 05:41:42
|
| Any idea how to do that in asp.net vb code |
 |
|
|
Srinika
Master Smack Fu Yak Hacker
1378 Posts |
Posted - 2005-12-14 : 09:02:40
|
| In ASP.Net, u can use a ADO.NetU can use a recordset or connection object (if u want more details on those I can elaborate, or u can find it from MSDN)U have to create the string to be passed to SQL server.The created string should look like madhivanan / gjja suggests once created.ie. U may need to concatenate the Text and the data from controls (as text box to which the user keys in the starting search letter(s))It would be like :........sSQL = "Select * from UrTbl where srchCol like '" & txtSearch.Text & "%' rs.open sSQL, URConn........ |
 |
|
|
|
|
|