SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
[9.5.452 Pro] - "Irregular" temp table names

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
[9.5.452 Pro] - "Irregular" temp table names
Author Message
gemisigo



Joined: 11 Mar 2010
Posts: 2102

Post [9.5.452 Pro] - "Irregular" temp table names Reply with quote
It seems that SA doesn't handle "slightly irregular" but valid temp table names very well. Check this code below:
Code:

SELECT * INTO [#mod_uzemanyag.dims_adatgyujtok] FROM mod_uzemanyag.dims_adatgyujtok;


This will create a temporary table named #mod_uzemanyag.dims_adatgyujtok which can only be accessed by adding delimiters to the table name. That works for non-temporary tables, that is, the code:
Code:

SELECT * INTO [mod_uzemanyag.dims_adatgyujtok] FROM mod_uzemanyag.dims_adatgyujtok;


also creates a table that requires delimiters to query (named mod_uzemanyag.dims_adatgyujtok). When selecting this table from a popup, the delimiters are added:
Code:

SELECT * FROM dbo.[mod_uzemanyag.dims_adatgyujtok] AS da


However, selecting the temporary table yields:
Code:

SELECT * FROM #mod_uzemanyag.dims_adatgyujtok AS da


which will not work.
Thu Feb 22, 2018 6:28 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7841

Post Reply with quote
I believe it looks for # and ## in the beginning of table names to identify temp tables; and it doesn't recognize "[#" as a bracketed temp table name. As a result, it tries to locate that table definition and columns in the current database.
Fri Feb 23, 2018 10:30 am View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2102

Post Reply with quote
Incorrect identification might happen during/after insertion into the editor. When expanding and selecting columns in the popup the table is correctly identified as a temporary one because it is expanded and the column list is properly populated.
Fri Feb 23, 2018 5:02 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.