USP_SEARCHLIST_DISCOUNTADDRESSSELECTION
Search discount address selections
Parameters
| Parameter | Parameter Type | Mode | Description | 
|---|---|---|---|
| @NAME | nvarchar(100) | IN | Name | 
| @MAXROWS | smallint | IN | Input parameter indicating the maximum number of rows to return. | 
Definition
 Copy 
                                    
CREATE procedure dbo.USP_SEARCHLIST_DISCOUNTADDRESSSELECTION
(
    @NAME nvarchar(100) = null,
    @MAXROWS smallint = 500
)
as
    set @NAME = COALESCE(@NAME,'') + '%' ;
    select top(@MAXROWS)
        ID,
        NAME
    from 
        dbo.SMARTQUERYINSTANCE
    where
         (NAME LIKE @NAME) and 
         SMARTQUERYCATALOGID = '9ED9E3B7-8B1E-4F3F-87C2-814D6B3E5A59'
    order by 
        NAME asc