1
Automation Interface, Add-Ins and Tools / Re: SQL to count diagram objects on all diagrams in all sub-packages...
« on: February 14, 2018, 02:26:12 am »
Thanks but I don't understand - a bit too terse for me.
a) You said Package_ID is Int, implying drop the tick marks, but I as I said I tried both with and without tick marks and it made no difference, so how/why does the string/int issue affect the repository.SQLQuery but not the scratchpad?
b) You said I need a GROUP BY...
i) I only want a single number, the count, not the Count and Object_ID that you added, in which case GROUP BY seems redundant
How should adding Object_ID to the select help?
ii) The query was perfectly OK exactly as quoted in the scatchpad so again, GROUP BY is redundant - at least in the scratchpad. If it is needed for repository.SQLQuery can you say why?
Hence the question: why is ok in the scratchPad but not via repository.SQLQuery?
What am I missing here?
J
a) You said Package_ID is Int, implying drop the tick marks, but I as I said I tried both with and without tick marks and it made no difference, so how/why does the string/int issue affect the repository.SQLQuery but not the scratchpad?
b) You said I need a GROUP BY...
i) I only want a single number, the count, not the Count and Object_ID that you added, in which case GROUP BY seems redundant

ii) The query was perfectly OK exactly as quoted in the scatchpad so again, GROUP BY is redundant - at least in the scratchpad. If it is needed for repository.SQLQuery can you say why?
Hence the question: why is ok in the scratchPad but not via repository.SQLQuery?
What am I missing here?
J