Thanks for the quick reply Jeremy.

What I'm going to try is to write out a custom row count statement like 
`SELECT COUNT(*) AS total_rows FROM (#{@sql}) x"` then drop the Execute as 
User statement into EITHER statement, not both.

Manually insert the Execute as User statement for each functionality - row 
count and iteration.

@sql = "SELECT * FROM [secure].[Employee Snapshot Fact] [Employee Snapshot 
Fact]"
def row_count
  "EXECUTE AS USER='ADND\\user'; SELECT COUNT(*) AS total_rows FROM 
(#{@sql}) x"
end

def query





-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to