mattkorguk
Registered User.
- Local time
- Today, 18:20
- Joined
- Jun 26, 2007
- Messages
- 301
Good morning All,
We are moving from our current Access FE/BE set to an SQL data BE.
We would also like to move some of the more 'power hungry' queries over to the SQL side to try and speed things up a bit.
Basically, we have a cont. form which displays your list of clients (1000+ possibly) and we've provided criteria option in the form of text boxes and drop down lists. These work ok in Access but can sometimes take a while to populate.
Below is one of the PT queries I've been working on, and it works well, although only when someone has selected a criteria for EACH search option, this is not very helpful. In the current format we can use "*" as a wildcard search, but I'm unsure of the option in SQL.
Also, when the criteria has been updated, is it possible to then refresh the query/ form somehow as me.requery / me.refresh don't seem to work.
Any pointers, as always greatly appreciated.
Thanks.
We are moving from our current Access FE/BE set to an SQL data BE.
We would also like to move some of the more 'power hungry' queries over to the SQL side to try and speed things up a bit.
Basically, we have a cont. form which displays your list of clients (1000+ possibly) and we've provided criteria option in the form of text boxes and drop down lists. These work ok in Access but can sometimes take a while to populate.
Below is one of the PT queries I've been working on, and it works well, although only when someone has selected a criteria for EACH search option, this is not very helpful. In the current format we can use "*" as a wildcard search, but I'm unsure of the option in SQL.
Also, when the criteria has been updated, is it possible to then refresh the query/ form somehow as me.requery / me.refresh don't seem to work.
Code:
SELECT dbo.[case].[Case Id], dbo.[case].Administrator, dbo.[case].[Corres Addr1], _
dbo.[case].[Corres Addr2],dbo.[case].[Corres PCode], dbo.[case].[Sales Rep], dbo.[client].[Title], _
dbo.[client].[Surname],dbo.[client].[Forename],dbo.[case].[Case Status], dbo.[Parties].[Co Name], _
[qryCase-Activity-Count].MtgCt, [qryCase-Activity-Count].FSCt,[qryCase-Activity-Count].GICt, _
dbo.[case].[Customer Type], dbo.[case].Folio _
FROM ((dbo.[case] _
LEFT JOIN dbo.[Parties] _
ON dbo.[case].[Sales Rep] = dbo.[Parties].[Party Id]) _
LEFT JOIN [qryCase-Activity-Count] _
ON dbo.[case].[Case Id] = [qryCase-Activity-Count].[Case]) _
LEFT JOIN dbo.[client] ON dbo.[case].[Case Id] = dbo.[client].[Case Id] _
WHERE (((dbo.[case].Administrator) =N'HH') AND ((dbo.[case].[Corres PCode]) =N'se1') _
AND ((dbo.[client].[Surname]) =N'bond*')AND ((dbo.[case].[Case Status]) =N'In Progress') _
AND ((Parties.[Co Name]) =N'D Bush'Or (dbo.[Parties].[Co Name]) Is Null) _
AND (([qryCase-Activity-Count].MtgCt) = 1) AND (([qryCase-Activity-Count].FSCt) = 1) _
AND (([qryCase-Activity-Count].GICt) = 2) AND ((dbo.[case].[Customer Type]) =N'New')) _
ORDER BY dbo.[client].[Surname], dbo.[client].[Forename];
Thanks.
Last edited: