Home Forums SQL Server 2008 T-SQL (SS2K8) Filter Countries, States and Cities which in same row in one table. RE: Filter Countries, States and Cities which in same row in one table.

  • Bhuvnesh (10/8/2013)


    select * from TABLE where countryid = @country

    select * from TABLE where countryid = @country OR stateID = @stateid

    select * from TABLE where countryid = @country OR stateID = @stateid OR Cityid = @Cityid

    Here @country ,stateID and @Cityid are parameters.

    +1

    _______________________________________________________________
    To get quick answer follow this link:
    http://www.sqlservercentral.com/articles/Best+Practices/61537/