Datalink and parameter (where statement)
Hi all,
For data links, is it possible to pass a where statement or an entire command line using parameter?
Ideally, I would like to put this in the command:
Select ID, Name, Address from Everything where ID in (1,2,3,4,5)
Or
Select ID, Name, Address from Everything where ID = 1 or ID = 2 or ID =3 or ID = 4 or ID = 5
Either one will work if I type in the fixed ID in command
The field contain IDs is called ‘combinedID’ (different ID combination for each feature) so I wrote the command with parameter (multiple) like these:
Select ID, Name, Address from Everything where ID in (@multiple) – in this case, ‘combinedID’ => 1,2,3,4,5
Or
Select ID, Name, Address from Everything where ID = @multiple – in this case, ‘combinedID’ => 1 or ID = 2 or ID =3 or ID = 4 or ID = 5
However, data link doesn’t work when using parameter like the above. Parameter will work if combinedID only has one value (ie. 1).
I’ve also tried passing the entire command via parameter but with no luck.
combinedID => Select ID, Name, Address from Everything where ID in (1,2,3,4,5)
Command would be => @multiple
I was wondering if syntax is correct and if there’s another way to link these data
Thanks
Chen-Ting
0
-
I ended up using dynamic query to retrieve the data needed. So it’s something like this in command: EXEC[spExample] @ Multiple
Where ‘Multiple’ is the workflow generated IDs and the select statement is in query ‘spExample’
Chen-Ting0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar