Comments
4 comments
-
Interesting. Thanks for letting us know about this Bruce. We'll take a look into it. It kind of sounds like SQL Prompt might not be parsing the entire query. Tell me, without applying your workaround, if you just put the cursor to the left of the * and force the candidate list with CTRL+SPACE do you see all the tables, aliases and columns you'd expect in the list?
Thanks,
Bart -
Also, is there any chance you could post an example query where this problem occurs on here please?
Thanks,
Bart -
Without applying my workaround, if I put the cursor to the left of the * and try to force the candidate list with CTRL+SPACE it offers no suggestions.
An example of this would be the following query (run from the ReportServer db):SELECT * FROM [ReportSchedule] P10tbl JOIN [Catalog] R17fk ON P10tbl.ReportID = R17fk.ItemID JOIN [Subscriptions] R18fk ON P10tbl.SubscriptionID = R18fk.SubscriptionID JOIN [Schedule] R19fk ON P10tbl.ScheduleID = R19fk.ScheduleID
Copy from the first character of the query to the last and paste it into a new query window (I'm using SSMS) and put the cursor after the * and hit tab. What I get is the following (notice that it only gives columns for the first two tables - P10tbl and R17fk; R18fk and R19fk seem to be ignored):SELECT P10tbl.[ScheduleID], P10tbl.[ReportID], P10tbl.[SubscriptionID], P10tbl.[ReportAction], R17fk.[ItemID], R17fk.[Path], R17fk.[Name], R17fk.[ParentID], R17fk.[Type], R17fk.[Content], R17fk.[Intermediate], R17fk.[SnapshotDataID], R17fk.[LinkSourceID], R17fk.[Property], R17fk.[Description], R17fk.[Hidden], R17fk.[CreatedByID], R17fk.[CreationDate], R17fk.[ModifiedByID], R17fk.[ModifiedDate], R17fk.[MimeType], R17fk.[SnapshotLimit], R17fk.[Parameter], R17fk.[PolicyID], R17fk.[PolicyRoot], R17fk.[ExecutionFlag], R17fk.[ExecutionTime] FROM [ReportSchedule] P10tbl JOIN [Catalog] R17fk ON P10tbl.ReportID = R17fk.ItemID JOIN [Subscriptions] R18fk ON P10tbl.SubscriptionID = R18fk.SubscriptionID JOIN [Schedule] R19fk ON P10tbl.ScheduleID = R19fk.ScheduleID
-
Hi Bruce. Unforunately, I cannot replicate this bug. Are you using SQL prompt 3.5? This is the latest version.
The below query on Adventureworks I think is similar to yours:
SELECT * FROM [Person].[Contact] P10tbl
JOIN [Sales].[StoreContact] R17fk ON P10tbl.[ContactID] = R17fk.[ContactID]
JOIN [Sales].[Individual] R18fk ON P10tbl.[ContactID] =R18fk.[ContactID]
JOIN [Sales].[ContactCreditCard] R19fk ON P10tbl.[ContactID] = R19fk.[ContactID]
but I can expand the star with no problems at all.
Add comment
Please sign in to leave a comment.
It was maddening and time consuming to try and figure out how to get the expand functionality to work correctly in this scenario, but once I figured out a work around, it isn't too difficult to do. However, you might want to see if you can duplicate the problem and isolate the bug.