EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB439285: Intermediate Temporary Tables are being created with the hash sign ‘##’ instead of ‘#’ after migration of SQL Server 2008 to 2012 in MicroStrategy 9.x – 10.x


Community Admin

• Strategy


This article provides explanation about the '##' hash sign for Intermediate Temporary Tables generated in SQL queries after migration to SQL Server 2012

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


Comment

0 comments

Details

Knowledge Article

Published:

December 21, 2017

Last Updated:

December 6, 2018