feature suggestion
DanAvni
Posts: 72 Bronze 2
1. if i have a table with a string field and i am writing a SQL statement like this "Field=" i would like to see sql prompt add '' and put the caret in the middle of the tags. on unicode strings sql prompt should add N''
2. if i am typing "Field Like" the same rules as suggestion #1 should apply
3. if the field is a uniqeidentifier field then '' should also be added
4. if the field is a date field then a CONVERT(datetime,'',102) should be added so i can imidietly write the date i need (e.g. 2008-01-01 00:00:00)
2. if i am typing "Field Like" the same rules as suggestion #1 should apply
3. if the field is a uniqeidentifier field then '' should also be added
4. if the field is a date field then a CONVERT(datetime,'',102) should be added so i can imidietly write the date i need (e.g. 2008-01-01 00:00:00)
Dan Avni
Comments
I wrote one for "n", which inserts "N'$CURSOR$'", so in your case, I could just do "Field =" <SPACE> "n" <TAB>.
Same for LIKE, just write a snippet (maybe "li"?) to insert "LIKE N'%$CURSOR$%'".
To automate it, like you suggested, could be difficult. You could be writing a JOIN, and then you don't want the automatic ''.
exec sproc_name
@guid_var = ?
since it's obvious that to send the guid you would need tags around it sql prompt should be more intelligent on this and make it
exec sproc_name
@guid_var = ''
i hope you get the idea