Topic: Different variants of parameters
Let there is such still a crude SQL query. It is necessary to preempt the data depending on what are set parameters. For example, It is necessary to preempt on what that to cities, on what that to clients, to persons, on a TT. Considering that we set, for example, the certain client, and remaining fields-parameters are not set. Still the combination, for example, Cities + Clients, Jur + a TT, etc. Arises a question how to write request so that was general-purpose for the job of different parameters.
[spoiler a SQL query]
Declare @ varchar (8) Declare @ varchar (8) Declare @ varchar (8) Declare @ varchar (8) SELECT [City]; [Jur the person]; [Client]; [The TT code]; [Shipments ]; [Resets ]; [Implementation ] FROM [Database] WHERE [City] = @ AND [Jur the person] = @ AND [Client] = @ AND [The TT code] = @