Is it possible to do something like this?
select (BillPrefix + ' ' + BillNumber) as Bill
from Bills
where Bill like 'HF 3%'
I get an error when I execute this, but I want to be able to do a partial match over both columns. Is this something that could be done with a dynamic view (i.e., in the...
Dieter,
Thanks for the response. This query also works great. It took my full query down from 1:22 to 18 seconds; much better than before. I will probably go with PH's query as the performance gain is better.
Thanks again.
Rob
PH,
Thanks! That approach works great. It took my full query down from 1:22 to only 9 seconds. This should work great in my view. I have not worked much with derived tables in the FROM clause. I see it definitly bears further investigation.
Thanks again.
Rob
Dieter,
This is close. Let me clarify a few things to better define the problem. Here are some updated sql statements:
create table ActivityHistory(
BillRequestID int not null,
ActivityCode int not null,
Pos int not null,
SentToID varchar(15) not null,
primary key (BillRequestID...
PH,
Thanks for the reply. I have tried the simple inner join, but because of the complexity of the where clause, the inner join is not sufficient.
Thanks,
RC
I'm needing some help optimizing a query. The following simplified query returns the results that I need, but the performance is terrible. Here is a simplified view of my data:
Table: BillRequests
BillRequestID
-------------
1
2
3
4
Table: ActivityHistory...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.