Comments
Sort by recent activity
This happens with all projects. Unfortunately I don't have a second machine to test on.
Regards,
Matt / comments
This happens with all projects. Unfortunately I don't have a second machine to test on.
Regards,
Matt
Hi
I'm using SSMS (13.0.300.44). A reboot of the machine seems to have sorted it out!
Thanks,
Matt / comments
Hi
I'm using SSMS (13.0.300.44). A reboot of the machine seems to have sorted it out!
Thanks,
Matt
Hi,
Just installed the 6.6 beta. There are no shortcuts now (such as ctrl+K+Y for formatting). Should that be there still?
cheers
Matt / comments
Hi,
Just installed the 6.6 beta. There are no shortcuts now (such as ctrl+K+Y for formatting). Should that be there still?
cheers
Matt
Hi
In the previous version of SQL Prompt if the column name appeared in more than one table in your query the popup would have the table alias to the right. So for example if I have the following code: CREATE TABLE #test
(
Fname VARCHAR(50),
Lname VARCHAR(50)
)
SELECT *
FROM #test t
INNER JOIN #test AS t2
ON t2.Fname = t.Fname
AND lnam
the popup will show LName twice - but with no alias to the right.
Hopefully that makes sense. Let me know if not!
Cheers
Matt / comments
Hi
In the previous version of SQL Prompt if the column name appeared in more than one table in your query the popup would have the table alias to the right. So for example if I have the following c...
Hi
There's a slight issue with Format SQL when highlighting a section of code and there is a syntax error in non-highlighted code.
Using this code as an example:
SELECT Id, COUNT(DISTINCT t.FName) AS CountFirstName
INTO #Test2
FROM #Test AS t
GROUP BY t.Id
SELECT
FROM #Test AS t
SELECT *
FROM #Test2 AS t
ORDER BY 1,2
If I highlight the first SELECT and hit Ctrl + K + Y I get the following error:
SQL Prompt - Inserting semicolons...
SQL Prompt was unable to complete this operation.
Problem areas have been highlighted.
OK
and the comma on the last line between 1,2 (non-highlighted code) is underlined in red. The highlighted code is successfully formatted though. The cause seems to be the syntax error in the second SELECT (the lack of SELECT columns or *).
Regards,
Matt / comments
Hi
There's a slight issue with Format SQL when highlighting a section of code and there is a syntax error in non-highlighted code.
Using this code as an example:
SELECT Id, COUNT(DISTINCT t.FName) ...
Another one for you....
With GROUP BY "All non-aggregated columns" I have an issue when combining columns in the SELECT. Probably easiest to explain with an example.
If I have the following SELECT: SELECT t.val1 + t.Val2 AS Total, COUNT(DISTINCT code)
FROM #test t
and then add the GROUP BY and choose All non-aggregated columns I get the following code: SELECT t.val1 + t.Val2 AS Total, COUNT(DISTINCT code)
FROM #test t
GROUP BY t.val1 + t.Val2 ,
t.val1 ,
t.Val2
where in fact I want this: SELECT t.val1 + t.Val2 AS Total, COUNT(DISTINCT code)
FROM #test t
GROUP BY t.val1 + t.Val2
Cheers
Matt / comments
Another one for you....
With GROUP BY "All non-aggregated columns" I have an issue when combining columns in the SELECT. Probably easiest to explain with an example.
If I have the following SELECT:...
Hi
I've been using the new GROUP BY "All non-aggregated columns" feature. When there are constant values in the SELECT these get included in the GROUP BY.
For example this code is generated using this feature: SELECT 0 AS NewIdField,
t.FName ,
SUM(t.Volume)
FROM #test t
GROUP BY 0 ,
t.FName
If I run that I will get the following error: Msg 164, Level 15, State 1, Line 5
Each GROUP BY expression must contain at least one column that is not an outer reference. / comments
Hi
I've been using the new GROUP BY "All non-aggregated columns" feature. When there are constant values in the SELECT these get included in the GROUP BY.
For example this code is generated using t...
Hi
It's still not working as it should I'm afraid. 2 issues - 1 minor, 1 not so minor!
Using this code again: IF OBJECT_ID('tempdb..#TestTable') IS NOT NULL DROP TABLE #TestTable
SELECT *
INTO #TestTable
FROM dbo.tableName tn
SELECT *
FROM #TestTable AS tt
The minor issue: if you put your cursor in the first #TestTable (the one between the single quotes) and hit F2 it doesn't highlight the table name as it does if you do the same thing in any of the other instances of #TestTable. I guess it should?
The other issue is:
1) put the cursor in #TestTable and hit F2
2) change the table name making it longer
3) the second #TestTable on line one stays in the same place (Col59), but the text before it shifts right (because the length of the first #TestTable has increases)
4) because of this the characters to the left of the second #TestTable are deleted.
Hopefully that description makes sense...let me know if it doesn't!
Cheers
Matt / comments
Hi
It's still not working as it should I'm afraid. 2 issues - 1 minor, 1 not so minor!
Using this code again:IF OBJECT_ID('tempdb..#TestTable') IS NOT NULL DROP TABLE #TestTable
SELECT *
INTO #Te...
Hi
I am trying to use F2 to rename # tables. If I have the following code: IF OBJECT_ID('tempdb..#TestTable') IS NOT NULL DROP TABLE #TestTable
SELECT *
INTO #TestTable
FROM dbo.tableName tn
SELECT *
FROM #TestTable AS tt
and put the cursor in the table name on line 4 or 8, hit F2 and rename the table then the two #TestTable in line 1 do not get renamed.
If i have the following code: SELECT *
INTO #TestTable
FROM dbo.tableName tn
SELECT *
FROM #TestTable AS tt
IF OBJECT_ID('tempdb..#TestTable') IS NOT NULL DROP TABLE #TestTable
and repeat the rename then the first #TestTable in final line doesn't get renamed.
Regards,
Matt / comments
Hi
I am trying to use F2 to rename # tables. If I have the following code:IF OBJECT_ID('tempdb..#TestTable') IS NOT NULL DROP TABLE #TestTable
SELECT *
INTO #TestTable
FROM dbo.tableName tn
SELE...
I have found the cause of this issue. I had used the alias "Geography" and "Geometry" in the SPs that caused the issue. (I assume this errors as these are now key words in SQL2008 and it fails on parsing a SELECT that selects a column using one of these alias - eg "Geometry.Id" - as it's expecting a valid Geometry method to be called).
I have updated the table aliases to be "a" and "b" and this works fine. Not sure why this error only occurs when using non-default schema mappings though.
Regards,
Matt / comments
I have found the cause of this issue. I had used the alias "Geography" and "Geometry" in the SPs that caused the issue. (I assume this errors as these are now key words in SQL2008 and it fails on p...