SYMPTOM
After migration of SQL Server 2008 to 2012, it can be observed in SQL queries generated that the intermediate temporary tables are being created with the ‘##’ hash sign instead of ‘#’:
SQL 2012:
select
sum((Case when (a11.id_fac_os in ('74') and a14.ID_BUSINESS_UNIT in ('F')) then a11.f_fac_value_x_zone else NULL end)) WJXBFS18,
max((Case when (a11.id_fac_os in ('74') and a14.ID_PRO_ BUSINESS_UNIT in ('F')) then 1 else 0 end)) GODWFLAG1f_1
into ##ZZSP00
from b_fac_facturacion_x_zona a11,
l_geo_zona a12,
l_pro_producto a13,
l_pro_linea_sig a14
SQL 2008:
select
sum((Case when (a11.id_fac_os in ('74') and a14.ID_PRO_ BUSINESS_UNIT in ('F')) then a11.f_fac_value_x_zone else NULL end)) WJXBFS18,
max((Case when (a11.id_fac_os in ('74') and a14.ID_PRO_ BUSINESS_UNIT in ('F')) then 1 else 0 end)) GODWFLAG1f_1
into #ZZSP00
from b_fac_billing_x_zone a11,
l_geo_zone a12,
l_pro_product a13,
l_pro_follow_line a14
CAUSE
Hash sign ‘#’ stands for Local Temp tables, while ‘##’ hash sign is used for Global Temp table.
Local Temp tables are only available to the current connection for the user.
Global Temp tables have been created by a connection, like a permanent table it is then available to any user by any connection.
ACTION
No action required, since the ‘##’ hash sign won’t affect the SQL generation/execution in any way.
KB439285