February 28, 2024 at 8:24 pm
If anyone used artificial intel like Gee-Pee-Tee for writing T-SQL (MS SQL server) code what was your BEST and WORST experience with this Chat GPT? Is there something I need to know to leverage efficiency of my using the artificial intelligence for writing more complex SQL code for me?
February 29, 2024 at 2:28 pm
It just makes mistakes. Lots of them. Also, the hard part is getting your tables & such into the language model.
Now, Redgate, my employer, is adding a way to do this to it's tool SQL Prompt. You might want to check it out. We do all the hard work of adding tables & constraints into the language model query. GPT still makes mistakes though.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
March 3, 2024 at 9:36 pm
Yes that was my experience, too. It makes lots of mistakes.
my further question is if i/company I work for would like to acquire/buy a fully functional 'SQL Developer BOT', and AI worker, where and for how much I would be looking for such employee?
thank you!
March 4, 2024 at 11:14 am
I didn't use it, but once I did a code review to one of out developers. The code wasn't a good code, so I called him and explained what is needed to be modified and why. I also asked him why did he declare a variable as real and then at each place that he used it he casted it as an integer. At that point he told me that he used Chat GPT.
March 4, 2024 at 4:45 pm
I've found it to be extremely frustrating for generating new, functioning code. From one prompt to another, it will change its formatting style, will frequently not compile, sometimes produce code that is logically incorrect. The more than you try to corral it into giving something specific, the more it falls apart.
I have used it successfully to figure out how to do a tricky aggregate by providing it some basic pseudo code then implementing the real code on my own.
I have also had luck having it decipher and summarize horrible report writer queries, however if a query is sufficiently complex and messy it will sometimes give up and say it is too complicated.
I have had mixed results getting it to restyle code for things that can't be restyled with a styling tool - such as standardizing aliasing to AS aliasing, eliminating 1 part naming, etc.
March 4, 2024 at 5:24 pm
I have had mixed results getting it to restyle code for things that can't be restyled with a styling tool - such as standardizing aliasing to AS aliasing, eliminating 1 part naming, etc.
If you consider SQL Prompt a 'styling tool' then you are wrong, because it can do these things.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
March 4, 2024 at 7:29 pm
CreateIndexNonclustered wrote:I have had mixed results getting it to restyle code for things that can't be restyled with a styling tool - such as standardizing aliasing to AS aliasing, eliminating 1 part naming, etc.
If you consider SQL Prompt a 'styling tool' then you are wrong, because it can do these things.
I'm not paying 1500 bucks a year (plus however many hours a year it takes to get it approved and renewed) for infrequent code refactoring lol
March 4, 2024 at 9:44 pm
I'm not paying 1500 bucks a year (plus however many hours a year it takes to get it approved and renewed) for infrequent code refactoring lol
That's not the point though, is it?
You said that it cannot be done, but it can.
And purchasing SQL Prompt individually costs a fraction of that amount.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
March 5, 2024 at 12:41 pm
CreateIndexNonclustered wrote:I'm not paying 1500 bucks a year (plus however many hours a year it takes to get it approved and renewed) for infrequent code refactoring lol
That's not the point though, is it?
You said that it cannot be done, but it can.
And purchasing SQL Prompt individually costs a fraction of that amount.
Not to mention it does more than reformat your code. It has a language compliant code completion (meaning, in many instances, it knows the syntax well enough to help you type it faster, ie: you type 'backup' it knows what the next words may be and after you type 'database' it goes to listing your databases on the connected server). It can function as a linter, cleaning your code on the fly. It has a best practices analysis built in that can also be automated. Yeah, it does formatting, better than any other T-SQL tool out there, but it also does tons more, hence the price. You very much get what you pay for and then some.
Sorry, I know, Redgate is my employer, but I absolutely love SQL Prompt. Fantastic tool.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
March 5, 2024 at 2:14 pm
I haven't begun to use all of SQL Prompt's features. But it's code completion is much better than SSMS built-in intellisense. I have found Smart Rename & Find Invalid Objects incredibly useful.
March 5, 2024 at 2:35 pm
I haven't begun to use all of SQL Prompt's features. But it's code completion is much better than SSMS built-in intellisense. I have found Smart Rename & Find Invalid Objects incredibly useful.
All great features. It's funny how focused people get on the formatting (love it, don't get me wrong), when there's so much else going on. It's a very extensive tool.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
March 5, 2024 at 3:47 pm
CreateIndexNonclustered wrote:I'm not paying 1500 bucks a year (plus however many hours a year it takes to get it approved and renewed) for infrequent code refactoring lol
That's not the point though, is it?
You said that it cannot be done, but it can.
And purchasing SQL Prompt individually costs a fraction of that amount.
I in no way shape or form said that it couldn't be done with a different tool. did you even read the thread topic?
March 5, 2024 at 3:51 pm
Phil Parkin wrote:CreateIndexNonclustered wrote:I'm not paying 1500 bucks a year (plus however many hours a year it takes to get it approved and renewed) for infrequent code refactoring lol
That's not the point though, is it?
You said that it cannot be done, but it can.
And purchasing SQL Prompt individually costs a fraction of that amount.
I in no way shape or form said that it couldn't be done with a different tool. did you even read the thread topic?
Yeah, I'm actually quite good at reading. This, in a quite literal shape and form, says it cannot be done with a 'styling tool':
I have had mixed results getting it to restyle code for things that can't be restyled with a styling tool - such as standardizing aliasing to AS aliasing, eliminating 1 part naming, etc.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
March 5, 2024 at 4:40 pm
fair enough, I was being flippant and referring to other free plugins. I looked again and the redgate toolkit is 1300, not 1500. I wouldn't consider that significantly less expensive while still an equal level of effort to manage renewals.
March 5, 2024 at 5:56 pm
fair enough, I was being flippant and referring to other free plugins. I looked again and the redgate toolkit is 1300, not 1500. I wouldn't consider that significantly less expensive while still an equal level of effort to manage renewals.
Not sure what you are looking at - SQL Prompt license runs $210 per year for 1-4 users with discounts for more users.
Another tool - that I have used in the past and really liked because it works cross-platform is SQL Assistant: https://www.softtreetech.com/sqlassist/
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
Viewing 15 posts - 1 through 15 (of 21 total)
You must be logged in to reply to this topic. Login to reply