Click here to Skip to main content
15,903,175 members
Home / Discussions / Database
   

Database

 
GeneralRe: How to concatenate column values of type text during SELECT...FROM...GROUP BY? Pin
liquid_22-Dec-10 23:58
liquid_22-Dec-10 23:58 
QuestionSQL Wildcard (%) query Pin
Joe Stansfield21-Dec-10 17:08
Joe Stansfield21-Dec-10 17:08 
AnswerRe: SQL Wildcard (%) query Pin
Luc Pattyn21-Dec-10 17:41
sitebuilderLuc Pattyn21-Dec-10 17:41 
GeneralRe: SQL Wildcard (%) query Pin
Joe Stansfield21-Dec-10 18:12
Joe Stansfield21-Dec-10 18:12 
GeneralRe: SQL Wildcard (%) query Pin
Luc Pattyn21-Dec-10 18:16
sitebuilderLuc Pattyn21-Dec-10 18:16 
GeneralRe: SQL Wildcard (%) query Pin
Joe Stansfield21-Dec-10 18:23
Joe Stansfield21-Dec-10 18:23 
AnswerRe: SQL Wildcard (%) query [modified] Pin
Luc Pattyn21-Dec-10 18:29
sitebuilderLuc Pattyn21-Dec-10 18:29 
GeneralRe: SQL Wildcard (%) query Pin
Joe Stansfield21-Dec-10 18:38
Joe Stansfield21-Dec-10 18:38 
It's sitting inside a datasource as a query (so similar to a stored procedure?) and then executed via a button and a table adapter in the programming language.

This is the full query as it sits at the moment:

SELECT File_Name, PID, Address_1, Address_2, Locality, Municipality, Postcode, Sale_date, Sale_price, Total, Capital_value, Land_area, Land_use_code, Room_count, Building_area, Construction_year, Wall_construction_code, Roof_construction_code, Land, Rate_1, Val_Ref, Source FROM vSaleSearch 
WHERE (Municipality = @Municiaplity1 OR Municipality = @Municipality2)
AND (Locality LIKE @Locality + '%' OR Locality = @Locality1 OR Locality = @Locality2) 
AND (Land_use_code LIKE '%' + @Landusecode1 + '%')
AND (Sale_price >= @Sale_Price1 )
AND ( Sale_price <= @Sale_Price2) 
AND (Sale_date >= @Sale_Date1) 
ORDER BY Sale_price


I'm trying to achieve the same thing on the locality. What I'd ideally like is for a person to be able to enter a string in the locality field and it take it as an "equals" query. Or include a wild card at the start or end to take it as a like and apply the wild card characters.

At the moment it achieves half of that, but not as user friendly as one might hope... I see what I want to happen all the time, but of course I'm not sure how exactly it is done...
GeneralRe: SQL Wildcard (%) query Pin
Luc Pattyn22-Dec-10 1:30
sitebuilderLuc Pattyn22-Dec-10 1:30 
AnswerRe: SQL Wildcard (%) query Pin
PIEBALDconsult22-Dec-10 3:38
mvePIEBALDconsult22-Dec-10 3:38 
AnswerRe: SQL Wildcard (%) query Pin
jschell23-Dec-10 8:04
jschell23-Dec-10 8:04 
GeneralRe: SQL Wildcard (%) query Pin
Joe Stansfield5-Jan-11 11:53
Joe Stansfield5-Jan-11 11:53 
QuestionExtracting a blob data file from sqlite Pin
crain198121-Dec-10 13:35
crain198121-Dec-10 13:35 
AnswerRe: Extracting a blob data file from sqlite Pin
Luc Pattyn21-Dec-10 13:55
sitebuilderLuc Pattyn21-Dec-10 13:55 
GeneralRe: Extracting a blob data file from sqlite Pin
crain198121-Dec-10 14:34
crain198121-Dec-10 14:34 
AnswerRe: Extracting a blob data file from sqlite Pin
Luc Pattyn21-Dec-10 14:41
sitebuilderLuc Pattyn21-Dec-10 14:41 
GeneralRe: Extracting a blob data file from sqlite Pin
crain198121-Dec-10 15:04
crain198121-Dec-10 15:04 
GeneralRe: Extracting a blob data file from sqlite Pin
Luc 64801121-Dec-10 16:19
Luc 64801121-Dec-10 16:19 
GeneralRe: Extracting a blob data file from sqlite Pin
crain19818-Jan-11 5:27
crain19818-Jan-11 5:27 
QuestionIndex Fragmentation in Microsoft SQL Server [modified] Pin
Member 285321221-Dec-10 8:12
Member 285321221-Dec-10 8:12 
AnswerRe: Index Fragmentation in Microsoft SQL Server Pin
ScottM122-Dec-10 23:09
ScottM122-Dec-10 23:09 
Questionwrapper program Pin
kabir_2128920-Dec-10 19:11
kabir_2128920-Dec-10 19:11 
AnswerRe: wrapper program Pin
WoutL20-Dec-10 21:28
WoutL20-Dec-10 21:28 
AnswerRe: wrapper program Pin
Jörgen Andersson21-Dec-10 0:13
professionalJörgen Andersson21-Dec-10 0:13 
AnswerRe: wrapper program Pin
ScottM122-Dec-10 23:13
ScottM122-Dec-10 23:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.