#include "stdafx.h" using namespace System; using namespace System::Data; using namespace System::Data::Sql; using namespace System::Data::SqlTypes; using namespace Microsoft::SqlServer::Server; // In order to debug your Aggregate, add the following to your debug.sql file: // // select dbo.MyUDF() // go public ref class AddNewUDF { public: [Microsoft::SqlServer::Server::SqlFunction] static SqlTypes::SqlString MyUDF() { // Put your code here SqlTypes::SqlString Value(L"Hello"); return Value; } };