December 18, 2008 at 9:49 am
I am trying to write a query for a SSRS report that has a location parameter. The problem I am facing is that I have created a separate location look up table by taking all of the possible locations from my detail table and replacing embedded spaces with nothing. This was an old system that allowed free text entry of locations so Bay 500 and Bay500 are the same location. However, I am not sure how to format my query so that when a user selects Bay500 then my where clause will look in the detail table for Bay 500 or Bay500.
December 18, 2008 at 9:57 am
Can't you use the REPLACE function when specifying that field to replace spaces with nothing?
For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]
December 18, 2008 at 9:58 am
Sherri Barkley (12/18/2008)
I am trying to write a query for a SSRS report that has a location parameter. The problem I am facing is that I have created a separate location look up table by taking all of the possible locations from my detail table and replacing embedded spaces with nothing. This was an old system that allowed free text entry of locations so Bay 500 and Bay500 are the same location. However, I am not sure how to format my query so that when a user selects Bay500 then my where clause will look in the detail table for Bay 500 or Bay500.
...
WHERE
LookupTable.Location = replace(DetailTable.Location,' ','')
Give that a try.
December 18, 2008 at 10:01 am
Thank you for your responses. I was able to get the Replace command to work. Thanks again.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply