Validate the correct use of capital and small initial letters in db names, columns and so on

Jan88Jan88 Posts: 5 New member
Is there an option in SQL Prompt available to validate the correct use of capital and small initial letters in names like database, columns and so on. In some database there exists a case sensitivity. I'd love to use this feature to replace the right syntax.
Tagged:

Answers

  • Hi Jan, 

    Unfortunately, there isn't anything for databases or columns, however, for the keywords, functions and types
    there's a formatting option for UpperCamelCase (starts with uppercase) and lowerCamelCase (starts with lowercase) which you can  get to from SQL Prompt menu > Edit formatting styles > select style to edit > Press edit and then find this menu:


    Kind regards

    Robyn Edwards | Redgate Software
    Have you visited our Help Center?
  • Jan88Jan88 Posts: 5 New member
    Hi Robyn, 
    Thank you very much for your feedback. That is a good hint to standardize the format, it will help me as well.

    But my main issue is that we have a lot of different databases in use, in different countries in Europe and US. Some are configured with case sensitivity, that mean when I want to address a column like CustomNo. and the original column name is written in small letters like customNo. or customno. it is not the same. For this cases it makes sense to validate if the used column name is valid for the selected database, and for linked servers as well. If not replace the expression with the right format.

    Do you understand my problem?

    Sincerely
    Jan
  • Hi Jan, 

    Yes, I better understand now, thank-you!

    Unfortunately, there isn't a feature that is particularly suited to what you need. However, I would urge you to add it to https://redgate.uservoice.com/forums/94413-sql-prompt as a feature request! 
    Kind regards

    Robyn Edwards | Redgate Software
    Have you visited our Help Center?
Sign In or Register to comment.