Comments
2 comments
-
Hi Chris,Consider choosing the columns that are to be used as JOIN criteria. If the first column chosen is, say, an Integer, then it makes sense to filter the second column to Integers -- which would be easy if we could sort by the datatype.
Although what you want wont be possible to that extent we will try and be clever for the JOIN conditions, e.g. we will suggest conditions based on foreign key relations, column type and column names. (Foreign keys should be working already.)Would it be cool if semantics were considered as well? So, when comparing columns, or passing function and stored proc parameters, etc., the expected datatype is considered. If my stored proc takes an Integer, then the suggestions for passing into it include columns having an Integer type, or functions returning an Integer.
That's a great idea. I will add it to our list of suggestions. So far it's only planned for JOINs (see above).
Regards,
Tilman -
Hi Chris,
Unfortunately the columns are not sortable, and unfortunately we won't be able to make them sortable due to the data structure we're using for fast filtering. Apologies for this.
Thanks,
Bart
Add comment
Please sign in to leave a comment.
Specifically, the column's data type is currently appended to the Column Name information. Assuming that these columns are sortable (see my other post at the bottom of http://www.red-gate.com/messageboard/viewtopic.php?t=3220), it would make sense to be able to sort by the column's datatype.
Consider choosing the columns that are to be used as JOIN criteria. If the first column chosen is, say, an Integer, then it makes sense to filter the second column to Integers -- which would be easy if we could sort by the datatype.
In any case, this makes me wonder what the algorithm is for making suggestions. As far as I can tell, RedGate is trying to assemble a list of things that are syntactically legal in a given position (that is, e.g., suggest a column where a column is valid).
Would it be cool if semantics were considered as well? So, when comparing columns, or passing function and stored proc parameters, etc., the expected datatype is considered. If my stored proc takes an Integer, then the suggestions for passing into it include columns having an Integer type, or functions returning an Integer.