Copy as WHERE clause
It would be useful to be able to copy a selection from the results grid which is pre-formatted as a WHERE clause in the same way "Copy as clause" IN works, e.g. copying a single value from ProductID column would produce WHERE ProductID = 5 and copying multiple values would produce WHERE ProductID in ( 5, 10, 15 ).
![](https://secure.gravatar.com/avatar/fe324ae893a2e047e2a14a2c874eea12?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)
-
m borland commented
I'm often building a where clause by copying and pasting from the results and filtering my data down. I usually select 'Copy with Headers', paste the results, and edit it. Having a smart 'Copy as In Clause' with the column name would be fantastic. I don't need the WHERE. I vote just to have "ProductID = 5" or "ProductID in ( 5, 10, 15 )" created by this shortcut. Thanks!
-
Steven Knox commented
Additionally, selecting multiple columns in a single row (e.g, City and State) could produce WHERE City = 'Anytown' AND State = 'NY'
I would suggest selecting both multiple rows and columns should disable Copy as Where as this creates some ambiguity and complex SQL.