Author |
Message |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
[SA 9.0.166 Pro] - Incorrect INSERT INTO |
|
Selecting table from the popup by using right/down keys to unfold schema and select table after INSERT INTO inserts the code just fine. But if the schema and table name is selected right after INSERT, the code inserted is incorrect. See the example below, and a short video here.
 |
 |
INSERT INTO chatra.INTO last_sync
(
last_sync_version,
current_version
)
VALUES
(
/*{ last_sync_version }*/,
/*{ current_version }*/
)
|
It seems that using right key it completes the INSERT statement immediately with INTO and the schema and throws another popup to select the table instead of unfolding the schema, selecting the table, and completing the statement in one go.
|
|
Wed Oct 19, 2016 7:32 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Thank you very much for reporting this issue. I have logged it in our bug tracking system under #SA0029900
|
|
Wed Oct 19, 2016 9:14 am |
|
 |
Mindflux
Joined: 25 May 2013 Posts: 846 Country: United States |
|
|
|
I can't say I can replicate that, but my popup box also doesn't start off with schema, it goes right to tables.
We primarily only use the DBO schema but I added a different schema and tables under it to try and replicate it but I'm not having luck with that.
|
|
Wed Oct 19, 2016 9:17 am |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
What is your setting for DB Options > List items > Schema? Is it Disabled? Or Enabled after first letter match? Also, it is listed after or before tables?
|
|
Wed Oct 19, 2016 10:35 am |
|
 |
Mindflux
Joined: 25 May 2013 Posts: 846 Country: United States |
|
|
|
 |
 |
What is your setting for DB Options > List items > Schema? Is it Disabled? Or Enabled after first letter match? Also, it is listed after or before tables? |
It was disabled, so I enabled it and moved it up right under variables, before tables and views. I still can't seem to replicate it on my end.
*Edit: got it, gotta use the right arrow the entire time. I was using down then right.
|
|
Wed Oct 19, 2016 10:37 am |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
Lucky you, then. I recall you do have a working(?) repository as well, right? I'm still struggling with that one too.
EDIT:I recall the first sentence :)
It happens here every time when triggering the popup from INSERT instead of INSERT INTO, regardless of the combinations of down and right.
|
|
Wed Oct 19, 2016 10:40 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
The contents depends on the current session schema. If there are tables in the current schema, they appear at the top of the list, followed by schemas, and then by databases. If there are no tables in the current schema, you see schema names at the top.
|
|
Wed Oct 19, 2016 10:46 am |
|
 |
Mindflux
Joined: 25 May 2013 Posts: 846 Country: United States |
|
|
|
 |
 |
The contents depends on the current session schema. If there are tables in the current schema, they appear at the top of the list, followed by schemas, and then by databases. If there are no tables in the current schema, you see schema names at the top. |
How do you change the session schema? It always seems to default to dbo, which is probably fine for most uses.
|
|
Wed Oct 19, 2016 11:03 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
It's user's default schema specified the account settings.
ALTER USER ... WITH DEFAULT_SCHEMA = ...
|
|
Wed Oct 19, 2016 11:43 am |
|
 |
Mindflux
Joined: 25 May 2013 Posts: 846 Country: United States |
|
|
|
 |
 |
It's user's default schema specified the account settings.
ALTER USER ... WITH DEFAULT_SCHEMA = ... |
Oh, I thought it was some session setting in SQL Assistant. Alright.
|
|
Wed Oct 19, 2016 11:44 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
One note, default schema is ignored for users who are members of sysadmin role. Their default schema is always dbo.
|
|
Wed Oct 19, 2016 11:46 am |
|
 |
|