When using the SQL Server option in NAV, if you declare a record variable as temporary, it will, in fact, write to a temporary sql table, not store the information in memory. I was shocked when I first noticed this, too, Nuno. As you fill your temp table in NAV, watch the size of your tempdb in SQL Mgmt...