Good luck and I'll read any other responses closely, but when I tried this a while back, I only got the first approach to work myself.
I suspect that it has to do with how the optional parameter widgit works. You can use it to insert a value, but not an expression apparently.
As you found out yourself and as Phil stated, only the first of your 2 approaches will work. There is another approach that works too:
val = SomeValue ;
sql1 = "SELECT FieldID FROM SomeTable WHERE SomeField = ?" ;
sql2 = "SELECT OtherField FROM SomeOtherTable WHERE OtherFieldID IN (" & sql1 & ")"
ExecuteSQL ( sql2 ; "" ; "" ; val )
Here another query is nested into the IN-clause. The list you use is probably a result from a find or something like that, so you can query for that too. My experience with this approach though is that this get slow pretty fast, but for a couple of hundreds or maybe a few thousand records it works fine.