Page 2 of 2

Posted: Mon Jun 15, 2009 6:59 am
by sashah
Yes one of the four column selected is substituted in the parameters marker. The marker is for column Account_nsp_id. 4 columns are defined in the stage.

Posted: Mon Jun 15, 2009 7:08 am
by sashah
Ray,

That is correct. We are passing the account numbers to get data for them.

Thank you
Samir

Posted: Mon Jun 15, 2009 7:29 am
by chulett
Then account_nsp_id should be marked as a Key. And I assume your column order in the stage matches the select order in the query, yes?

Posted: Mon Jun 15, 2009 7:32 am
by sashah
I have the Account_nsp_id as the key. Yes the column order is the same. Does the column name in the stage have to match the column names in the query.

Posted: Mon Jun 15, 2009 8:15 am
by chulett
No, not in a Server job. You're probably going to need to refer this to your support provider to see what your options are there. It seems to be getting confused about your need for a key with no where clause in your query, not to mention the parameter marker is part of the 'from' clause here. And knowing squat about SQL Server, I've got no idea how to 'work around' this.

Perhaps someone else does.

Posted: Mon Jun 15, 2009 3:48 pm
by ray.wurlod
I'd be using generated SQL, or rewriting the SQL so that it avoids the "shorthand" syntax and uses an explicit WHERE clause.

Posted: Mon Jun 15, 2009 3:50 pm
by sashah
Craig,

Thank you for all your help. As per your suggestion,I moved the marker as a part of the where clause when calling the function and it worked.

Thanks again
Samir

Posted: Mon Jun 15, 2009 3:56 pm
by chulett
Well, that's good news. Can you please mark your topic as Resolved now using the big button at the top of the page? Thanks!