Hello
I have 4 tables in SQL Server. 3 of them are catalogs (Country, Network and Platform) the fourth table contains records of documents. There are multiple fields in that table, but those that serve to differentiate each record are the following:
- Document
- Access
- Country
- Net
- Platform
All countries can have the same Network and Platform.
Ex.
[TABLE=“border: 1, cellpadding: 1, width: 500”]
[TR]
[TD]Document[/TD]
[TD]Access[/TD]
[TD]Country[/TD]
[TD]Network[/TD]
[TD]Platform[/TD]
[/TR]
[TR]
[TD]12345[/TD]
[TD]123[/TD]
[TD]USA[/TD]
[TD]10[/TD]
[TD]15[/TD]
[/TR]
[TR]
[TD]12345[/TD]
[TD]124[/TD]
[TD]USA[/TD]
[TD]10[/TD]
[TD]16[/TD]
[/TR]
[TR]
[TD]12346[/TD]
[TD]125[/TD]
[TD]CAN[/TD]
[TD]10[/TD]
[TD]15[/TD]
[/TR]
[TR]
[TD]12346[/TD]
[TD]126[/TD]
[TD]CAN[/TD]
[TD]10[/TD]
[TD]16[/TD]
[/TR]
[TR]
[TD]12347[/TD]
[TD]127[/TD]
[TD]MEX[/TD]
[TD]11[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]12348[/TD]
[TD]128[/TD]
[TD]BRA[/TD]
[TD]10[/TD]
[TD]15[/TD]
[/TR]
[TR]
[TD]12348[/TD]
[TD]129[/TD]
[TD]BRA[/TD]
[TD]10[/TD]
[TD]16[/TD]
[/TR]
[/TABLE]
How could I achieve a dynamic search that allows me to show in a grid only the accesses of a specific country, network and platform?
Ex.
if I search …
Country USA and CAN
Network 10
Platform 16
the result must be …
[TABLE=“border: 1, cellpadding: 1, width: 500”]
[TR]
[TD]Document[/TD]
[TD]Access[/TD]
[TD]Country[/TD]
[TD]Network[/TD]
[TD]Platform[/TD]
[/TR]
[TR]
[TD]12345[/TD]
[TD]124[/TD]
[TD]USA[/TD]
[TD]10[/TD]
[TD]16[/TD]
[/TR]
[TR]
[TD]12346[/TD]
[TD]126[/TD]
[TD]CAN[/TD]
[TD]10[/TD]
[TD]16[/TD]
[/TR]
[/TABLE]
As I use codes to identify the country, the network and the platform, I need the search fields to be shown as a select field so that the user can easily choose the country, network and platform he needs. These select fields must be filled with the values of the tables that I use as catalogs…
Table Country fields
Country
Name
Table Network
CountryCode
Network
Name
Table Platform
CountryCode
NetworkCode
Platform
Name
I hope you can understand what I need to do and I would appreciate it if you could help me have an idea of how to do it.
Thank you,
Aldo