Anyone having an answer on this:
Using hierarcical or shaped recordset using this syntax:
Client_No )
Does work, but has a puzzling side-effect in SQL Servers stored procedure:
queries, the T-SQL is something like this:
-- Do the detail query here
end
else begin
-- Do the no-detail query here
end
Guess what? The if statement is completely ignored when the sp is called
using the SHAPE syntax, that is the else part is always executed. When
command has to return a recordset.
Executing the same sp in the query window in SQL Server Enterprice Manager
gives all the expected results.