2016-01-22

MongoDB - Group and count by two fields

db.verses.aggregate(
    {
        $group: {  
            _id: {
                FIELD_1_ALIAS : '$FIELD_1_NAME'
                , FIELD_2_ALIAS : '$FIELD_2_NAME'
            }
            , CALCULATED_FIELD_ALIAS : { $sum: 1 }
        }
    }

    // Optional stuff    , { $project: { _id:0, CALCULATED_FIELD_ALIAS:1 } }
    , { $sort: { FIELD_1_NAME:1, FIELD_2_NAME:-1 } }
    , { $limit: 15 }

);

2016-01-12

TSQL - How to solve "Could not find installable ISAM" error


sp_configure 'show advanced options', 1;
RECONFIGURE;
go
--> Configuration option 'show advanced options' changed from 1 to 1. Run the RECONFIGURE statement to install.


sp_configure 'Ad Hoc Distributed Queries', 1;
RECONFIGURE;
GO
--> Configuration option 'Ad Hoc Distributed Queries' changed from 0 to 1. Run the RECONFIGURE statement to install.



If that is not enough, then also install "Microsoft Access Runtime 2010" (or the version that fits your system and the type of file you're trying to upload). This runtime works for integrating at least Excel 2010, Excel 2013 and Excel 2016 files.