Activity overview
Latest activity by lgivens
Hi Stuart, Thank you for your inquiry. Your question is not uncommon. The schema require can be turned off by unselecting the rule PE002 (and possible PE001 as well) within SQL Prompt. From the SQL Prompt menu option, select Manage Code Analysis Rules, scroll down until you find the Performance heading. The first two options should be the one(s) you are interested in. Check or Uncheck as you desire and click SAVE. The green squiggly line should be a thing of the past, for including schema at least. [image] Let us know if that helps. Lee Givens Product Support Engineer / comments
Hi Stuart, Thank you for your inquiry. Your question is not uncommon. The schema require can be turned off by unselecting the rule PE002 (and possible PE001 as well) within SQL Prompt. From the SQL...
Hi Matthew, Thank you for your inquiry. Unfortunately I don't think there is a way to do what you are wanting. In reviewing the documentation on SQL Search, it specifically mentions square brackets: Square Brackets Square brackets around identifiers are filtered out of the index we create to provide fast searches, so you can't match on them even if you are using wildcard matching and escape them. Basically that means that [dbo] and dbo look the same to SQL Search. If this is a feature you feel needs to be added, please visit our UserVoice portal at https://redgate.uservoice.com/forums/101149-sql-search, and make the suggestion. Let me know if this helps. Thank you, Lee Givens Product Support Engineer / comments
Hi Matthew, Thank you for your inquiry. Unfortunately I don't think there is a way to do what you are wanting. In reviewing the documentation on SQL Search, it specifically mentions square brackets...
Hi Philip, Let me see if I can answer your questions about SQL Prompt. I don't know all of your table structure, but based on what is visible in your query, I tried to duplicate what you are seeing in my test environment. As you saw Prompt recommended you add the schema to the table name. This is a best practice rule. This rule can be turned on/off via SQL Prompt > Code Analysis Rules, scroll down to Performance Rules and uncheck PE002 Schema name for table or view is not specified. The two column names on the last line are a little more problematic, because I don't have all the information. But I think the best practice rule is to always include table name or alias with column names when using a join clause. SQL Prompt couldn't 'fix' the column names because it didn't know what table to look in (this is assuming that Table-A doesn't have ParentKeyID or PersonID columns). So the best practice way to write the query, according to SQL Prompt, would be: SELECT * FROM dbo.Maintable mt WHERE mt.PersonID NOT IN (SELECT CCCC.PersonID FROM dbo.TABLEA AAAA INNER JOIN dbo.TABLEB BBBB ON AAAA.AAAA-ID = BBBB.AAAA-ID AND BBBB.BBBB-ID = (SELECT MAX(BBBB-ID) FROM dbo.TABLEB WHERE AAAA-ID = AAAA.AAAA-ID AND Category IN ('Active','Draft')) INNER JOIN dbo.TABLEC CCCC ON BBBB.BBBB-ID = CCCC.BBBB-ID WHERE AAAA.AAAA-ID = mt.ParentKeyID AND CCCC.PersonID = mt.PersonID); With that syntax, SQL Prompt wasn't highlighting anything other than to recommend using EXISTS other than IN for the main WHERE clause. Does this help?
Thank you,
Lee Givens Product Support Engineer
/ comments
Hi Philip, Let me see if I can answer your questions about SQL Prompt. I don't know all of your table structure, but based on what is visible in your query, I tried to duplicate what you are seeing...
Hi Greg, Sorry for the delayed response, but I wanted to get a second set of eyes on what you were seeing. I don't know if it's good news or bad news, but I was able to duplicate the scenario you described. I have escalated to the development team so they can determine the correct course of action to provide a resolution. In the interim, there are options available to you.
You could do nothing, simply click on the button to have the code execute anyway. (this is probably the least attractive option)
You could disable the rule that is triggering (SQL Prompt > Manage Code Analysis Rules > Uncheck BP018 Update Statement...)
You could click on the checkbox on the popup window to not show the warning anymore.
The last option leaves the rule active and inplace, it just doesn't warn you if you try to execute code that 'breaks' a rule. See the screenshot below, your CREATE TRIGGER isn't showing any errors, while my UPDATE statement does show the green squiggly line that indicates a rule violation. [image] I hope this helps. Please let me know if you have any further questions. Thank you, Lee Givens Product Support Engineer / comments
Hi Greg, Sorry for the delayed response, but I wanted to get a second set of eyes on what you were seeing. I don't know if it's good news or bad news, but I was able to duplicate the scenario you d...
Hi Terry, I see you've already received a very good response. In addition, I would like to provide you some documentation that outlines details of recommended hardware and implementation considerations. https://documentation.red-gate.com/sm/installing-and-setting-up/planning-the-sql-monitor-infrastructure-and-installation/hardware-and-performance-guidelines Please let us know if you have any additional questions. / comments
Hi Terry, I see you've already received a very good response. In addition, I would like to provide you some documentation that outlines details of recommended hardware and implementation considerat...