where PropPropertySubtype.Description in ('Class A','Class B') and PropProperty.PropertyID in (SELECT PROPERTYID FROM DBO.FN_SEARCHPROPERTYID(@SearchID,1))
Grouping sets allow multiple grouping on columns in a single data set. Rollup and Cube also used for summary rows (allows multiple grouping same as Grouping sets) Example: DECLARE @t TABLE ( idx INT IDENTITY(1, 1) , Country VARCHAR(50) , City VARCHAR(50) , NoOfJobOpenings INT ); INSERT INTO @t ( Country , City , NoOfJobOpenings ) SELECT 'Pakistain' , 'Karachi' , 50 UNION SELECT 'Pakistain' , 'Lahore' , ...
If you want to change pages when a group value changes(adding page breaks on group values ). then select group from bottom and right click on it and go to group properties. select page break option from the left options. and then checked the box named"between each instance of a group"....this will add page break againt changing of group value....set its child properties according to your need.
-- ============================================= -- Author: Muhammad Jawad -- Create date: 2/3/2017 -- Description: To Get All the Names of tables and Databases their data have changed in last 24 Hours And Backup those databases -- ============================================= Alter PROC UP_FindAndBackupAllDatabaseHaveChanges AS BEGIN ----**************************START: To get all the tables and database names whose data have changed in last 24 hours **************************---- DECLARE @loopStart INT= 1; DECLARE @looend INT; IF OBJECT_ID('tempdb..#AllDatabaseTables') IS NOT NULL BEGIN DROP TABLE #AllDatabaseTables; END; CREATE TABLE #AllDatabaseTables ( ...