Comments
Sort by recent activity
Well, I guess I can eat crow. The join condition works fine without the schema.
However I did create and Invoices table in a second schema to illustrate my point. While requiring 3 part naming for a column may be deprecated, it's still best to qualify the columns. SELECT * FROM Job.Invoices
INNER JOIN Billing.Invoices ON Invoices.iJobId = Invoices.iJobId
Msg 1013, Level 16, State 1, Line 1
The objects "Billing.Invoices" and "Job.Invoices" in the FROM clause have the same exposed names. Use correlation names to distinguish them.
/ comments
Well, I guess I can eat crow. The join condition works fine without the schema.
However I did create and Invoices table in a second schema to illustrate my point. While requiring 3 part naming...
SELECT * FROM Invoices
Invalid object name 'Invoices'.
SELECT * Biling.Invoices
(Results)
SQL Prompt had this issue in an older version where the join conditions did not properly fill in the schema and it was corrected years ago.
Perhaps you should create a schema and a table in that schema and try it.
One more thought. Aliasing is a convenience, yes. But SQL prompt should not require me to ALIAS a table to work properly. / comments
SELECT * FROM Invoices
Invalid object name 'Invoices'.
SELECT * Biling.Invoices
(Results)
SQL Prompt had this issue in an older version where the join conditions did not properly fill in the s...
Schemas are ABSOLOUTELY required. I can have a schema called Billing and another Schema called Archive and have tables called Billing.Invoices and Archive.Invoices.
AND when I type in Select From and I pick the invoices table from the Suggestions, it automatically resolves the schema name for me and puts Billing.Invoices.
If I say SELECT from Invoices, then SQL Server assumes the schema to dbo which is not correct.
There is nothing in that link you gave referring to SQL schemas. Only XML schemas which do not apply to my scenario. / comments
Schemas are ABSOLOUTELY required. I can have a schema called Billing and another Schema called Archive and have tables called Billing.Invoices and Archive.Invoices.
AND when I type in Select Fro...
I actually noticed something today. I was working in the wrong database this morning so I changed the database in the Database dropdown list on the toolbar. Which of course everyone knows changes the database that your query will execute on when you execute it. For example, my database is named MPTest and I switched the dropdown to MPDev. When I did refresh suggestions, it refreshed MPTest instead of refreshing the current database that the query window now points to which is MPDev.
I had to execute
Use MPDev
GO
Then when I did refresh suggestions, it refreshed the suggestions for the proper database MPDev.
Normally, switching the database dropdown list to a different database would trigger the suggestions to be refreshed to the different database.
Thanks,
Robert / comments
I actually noticed something today. I was working in the wrong database this morning so I changed the database in the Database dropdown list on the toolbar. Which of course everyone knows changes...
I probably sound like the boy who cried wolf. [image]
I am sure that both query windows were pointed at the same database. The log file had nothing of note in it.
I will continue to monitor to make sure I didn't make a mistake like change a different view than the one I used in the query.
In my defense, I've used SQL Prompt for at least 7 years, and I'd say probably more like 9 years but I have no records to back that up. (I do remember using it with SQL 2000 at some point) So I am not a rookie user.
Nonetheless, I will continue monitoring and paying close attention.
Thanks,
Robert / comments
I probably sound like the boy who cried wolf.
I am sure that both query windows were pointed at the same database. The log file had nothing of note in it.
I will continue to monitor to make sure...
Thanks for investigating. I didn't do as much DB work yesterday. But what little work I did, worked fine. I will keep an eye out in the future but it may be a few days or so before I do more extensive SQL coding.
Thanks again / comments
Thanks for investigating. I didn't do as much DB work yesterday. But what little work I did, worked fine. I will keep an eye out in the future but it may be a few days or so before I do more ext...
Here I am again. I added new columns to a VIEW (somewhere in the middle of the column list) and the new columns did not show up in the suggestion list when I used the view in another query.
So this is what I did:
1. Added the new columns (in the middle of the column list, not at the end)
2. Refresh Suggestions -New columns did not show
3. Dropped the view
4. Refresh suggestions - Even though the view had been dropped it still shows in the suggestion list
5. Re-create the view
6. Refresh suggestions - View still shows in the suggestion list without the new columns
Based on what I see, it looks like under certain circumstances the cache of suggestions in not being refreshed properly. I have noticed that Refresh Suggestions is a lot faster than it used to be. Perhaps the process of Refresh Suggestions is skipping over some steps for the sake of speed and not updating all the necessary changes.
I really don't care that Refresh Suggestions takes a little longer for the sake of accuracy.
Thanks,
Robert / comments
Here I am again. I added new columns to a VIEW (somewhere in the middle of the column list) and the new columns did not show up in the suggestion list when I used the view in another query.
So thi...
I am using SQL Prompt 6.5.0.334.
With a brand new database, I am unable to reproduce the behavior I was experiencing. I added a new table - refresh suggestions - OK. I altered the table and added a column - refresh suggestions - OK. I added a new scalar valued function - refreshed suggestions - OK
The database I was using yesterday has a considerable amount of database objects. We'll see if the results vary based on the number of objects.
It's a new day and I have relaunched SSMS and SQL Prompt. I will report back as the day goes along. / comments
I am using SQL Prompt 6.5.0.334.
With a brand new database, I am unable to reproduce the behavior I was experiencing. I added a new table - refresh suggestions - OK. I altered the table and added...
Applying the patch specified in the SQL Compare forum worked for me.
Thanks! http://www.red-gate.com/MessageBoard/vi ... hp?t=15276 / comments
Applying the patch specified in the SQL Compare forum worked for me.
Thanks!http://www.red-gate.com/MessageBoard/vi ... hp?t=15276
I started getting the same unhandled exception as soon as I upgraded to the latest SQL Data Compare. "Could not load assembly RedGate.Shared.Utils version 9.5.0.543. The system cannot find the file specified" You should check the install of the new version of SQL Data Compare to see if it removes that DLL or if the new version of SQL Data compare is pointing to an older version of the DLL than it should be.
I uninstalled both SQL Compare and SQL Data Compare. Message went away.
Then I reinstalled the latest version of SQL Compare. No message.
As soon as I reinstalled the latest version of SQL Data Compare, I got the message again. / comments
I started getting the same unhandled exception as soon as I upgraded to the latest SQL Data Compare. "Could not load assembly RedGate.Shared.Utils version 9.5.0.543. The system cannot find the file...