Showing posts with label ssis. Show all posts
Showing posts with label ssis. Show all posts

Friday, March 30, 2012

HELP!!! Trying to schedule SSIS package

Hello everybody,

I try to schedule a SSIS package.

When I run manualy, it works without error but when I schedule it, the step fail with error: "Executed as user:... The package execution failed. The step failed."

This package contain just a SQL Task that execute a truncate table (it's for the test...)

I try all solution I found in this forum and others but all not works.

Have you an idea ?

Thanks a lot

Arnaud

Are you doing any logging? The error message will be in there.

You should also take note of this: http://wiki.sqlis.com/default.aspx/SQLISWiki/ScheduledPackages.html

-Jamie

|||

Ok it's working now.

It's just because the connection failed and the path for the flath file must be \\<server>\<directory>\<file>

Thanks very much for your swiftness

Arnaud

sql

Wednesday, March 28, 2012

Help! The transaction log is full error in SSIS Execute SQL Task when I execute a DELETE SQL que

Dear all:

I had got the below error when I execute a DELETE SQL query in SSIS Execute SQL Task :

Error: 0xC002F210 at DelAFKO, Execute SQL Task: Executing the query "DELETE FROM [CQMS_SAP].[dbo].[AFKO]" failed with the following error: "The transaction log for database 'CQMS_SAP' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

But my disk has large as more than 6 GB space, and I query the log_reuse_wait_desc column in sys.databases which return value as "NOTHING".

So this confused me, any one has any experience on this?

Many thanks,

Tomorrow

Up

Please help me ~~~

|||This issue seems tobe more related to the database engine; you maybe in better luck there...|||

Lets be clear, the transaction log and management is a SQL engine issue, and nothing to do with SSIS. You could run the same SQL in any query submission tool, and would fail in the same manner.

Troubleshooting a Full Transaction Log (Error 9002)
(http://msdn2.microsoft.com/en-us/library/ms175495.aspx)

Just because you have 6GB of free disk space does not mean that disk space is available to the log file. What are the growth options? I strongly believe is very bad practice to rely on auto-growth of data or log files. It can seriously impact performance of a system, so should be actively managed rather than forgotten.

|||

Thanks all.

Tomorrow

Help! The transaction log is full error in SSIS Execute SQL Task when I execute a DELETE SQL que

Dear all:

I had got the below error when I execute a DELETE SQL query in SSIS Execute SQL Task :

Error: 0xC002F210 at DelAFKO, Execute SQL Task: Executing the query "DELETE FROM [CQMS_SAP].[dbo].[AFKO]" failed with the following error: "The transaction log for database 'CQMS_SAP' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

But my disk has large as more than 6 GB space, and I query the log_reuse_wait_desc column in sys.databases which return value as "NOTHING".

So this confused me, any one has any experience on this?

Many thanks,

Tomorrow

Up

Please help me ~~~

|||This issue seems tobe more related to the database engine; you maybe in better luck there...|||

Lets be clear, the transaction log and management is a SQL engine issue, and nothing to do with SSIS. You could run the same SQL in any query submission tool, and would fail in the same manner.

Troubleshooting a Full Transaction Log (Error 9002)
(http://msdn2.microsoft.com/en-us/library/ms175495.aspx)

Just because you have 6GB of free disk space does not mean that disk space is available to the log file. What are the growth options? I strongly believe is very bad practice to rely on auto-growth of data or log files. It can seriously impact performance of a system, so should be actively managed rather than forgotten.

|||

Thanks all.

Tomorrow

Help! The transaction log is full error in SSIS Execute SQL Task when I execute a DELETE SQL

Dear all:

I had got the below error when I execute a DELETE SQL query in SSIS Execute SQL Task :

Error: 0xC002F210 at DelAFKO, Execute SQL Task: Executing the query "DELETE FROM [CQMS_SAP].[dbo].[AFKO]" failed with the following error: "The transaction log for database 'CQMS_SAP' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

But my disk has large as more than 6 GB space, and I query the log_reuse_wait_desc column in sys.databases which return value as "NOTHING".

So this confused me, any one has any experience on this?

Many thanks,

Tomorrow

Up

Please help me ~~~

|||This issue seems tobe more related to the database engine; you maybe in better luck there...|||

Lets be clear, the transaction log and management is a SQL engine issue, and nothing to do with SSIS. You could run the same SQL in any query submission tool, and would fail in the same manner.

Troubleshooting a Full Transaction Log (Error 9002)
(http://msdn2.microsoft.com/en-us/library/ms175495.aspx)

Just because you have 6GB of free disk space does not mean that disk space is available to the log file. What are the growth options? I strongly believe is very bad practice to rely on auto-growth of data or log files. It can seriously impact performance of a system, so should be actively managed rather than forgotten.

|||

Thanks all.

Tomorrow

Monday, March 19, 2012

Help! hresult DTS_E_VARIABLEALREADYONREADLIST

We have a SSIS package that intermittently fails on the deployed server (works fine on our dev server) with the following error:

"The variable "%1!s!" is already on the read list. A variable may only be added once to either the read lock list or the write lock list."

This seems to happen right at the start when the variables are processed before any tasks happen. It also only fails half the time.

I just don't even know where to begin. Any clues?

I also want to add that not only does it fail only some of the time it also fails on different variables, always on an expression and always at the begining.

I think maybe the expression evaluator has a locking problem...

Here are some examples:

The following is the *first* 4 messages of one failed run:

Beginning of package execution

The variable "User::RefreshFrom" is already on the read list. A variable may only be added once to either the read lock list or the write lock list.

The expression for variable "DeleteRevenueFactQuery" failed evaluation. There was an error in the expression.

An error occurred with the following error message: "The expression for variable "DeleteRevenueFactQuery" failed evaluation. There was an error in the expression.".

The following is the *first* 3 messages of another failed run:

Beginning of package execution

The variable "User::SqlServer" is already on the read list. A variable may only be added once to either the read lock list or the write lock list.

The expression "@.[User::SqlServer]" on property "ServerName" cannot be evaluated. Modify the expression to be valid.

|||

Kris,

Its hard to work out what's wrong from what you've said here. Can you share your package?

If you like, send your package to me and I'l take a look.

-Jamie

jamie.thomson[at]conchango.com

|||

Kris, just a guess, but are you running the RTM version of SSIS?

Thanks,

K

|||Yes, I'm running on the final version of SSIS|||

One thing to add, this package always works on a single processor machine but we can recreate the intermittent problem on 2 different multi-processor machines.

Does anyone know if expressions are evaluated to set variables in concurrent threads?

The variables that are giving the intermittent problems are used in more than one expression to initialize other variables or properties.

I'm worried it is executing the expressions on more than one thread and ending up on different processors, and the locking scheme doesn't use a memory boundary when checking if the variable is already on the readonly list before adding it.

Anyways, I think at this point I'm going to scrap using expressions and setup the variables and properties in a script task. I have to get this working soon.

Everything else is done on our project.

|||

I too am experiencing this error. If I re-build/deploy the package, the error seems to go away until I build/deploy again, and then I usually get the error.

BobP

|||

I had the same failure where I had a sequence container with 2 execute package tasks in it running in parallel. This worked fine on my workstation but failed on the dual processor server. I added a dependency so they run sequentially and the problem has gone away.

My failure condition on the dual proc server was when the SSIS packages were launched from a SQL Agent job. Running interactively with DTEXEC from a command proc worked.

|||

I too have had the same problem on a dual-proc machine. There seems to be a familiar story developing here.

[Kris, sorry I didn't get back to you after you mailed - just haven't had time to explore it enough I'm afraid]

-Jamie

|||

I had the same problem on quad-processor machine. I'll try to get rid of this problem by setting MaxConcurrentExecutables to 1. It seems critical bug!

|||

I am facing the same issue on the 4 proc machine, If I execute the package using dtexecui i works without any problems. Does anyone have resolution on this ?

Regards

Meghana

|||

Well, I don't know what the current status on this matter is but, if anybody is interested, I'm having the same problems on a 4 Intel Xeon processors server.

Similar to what is mentioned in other related posts, everything runs smoothly on my 1 processor development box but, when deployed on a multiprocessors server, I'm having multiple DTS_E_VARIABLEALREADYONREADLIST error intermittently, i.e. with multiple tasks but not necessarily the same throughout various executions.

For the time being, I’ve fixed the problem by either adding precedence constraints between tasks (which could easily work in parallel) or by setting the MaxConcurrentExecutables package property to 1 or both but, for me, it is more a workaround than any real solution: if I cannot use both common configurations and multiprocessors, SSIS seems suddenly limited.

A quick note: contrary to what is mentioned in a related post, I can reproduce the same errors with both the dtexec command prompt utility and the graphical interface.

I should add that I’m also having issues with package transactions and Microsoft DTC but, at this point, I’m not sure whether these issues are due to multiprocessors, Windows 2000 (kinda old for SQL Server 2005, isn’t it?) or simply a wrong use of them.

Anyway, any new insights on this matter would be greatly appreciated.

Help! hresult DTS_E_VARIABLEALREADYONREADLIST

We have a SSIS package that intermittently fails on the deployed server (works fine on our dev server) with the following error:

"The variable "%1!s!" is already on the read list. A variable may only be added once to either the read lock list or the write lock list."

This seems to happen right at the start when the variables are processed before any tasks happen. It also only fails half the time.

I just don't even know where to begin. Any clues?

I also want to add that not only does it fail only some of the time it also fails on different variables, always on an expression and always at the begining.

I think maybe the expression evaluator has a locking problem...

Here are some examples:

The following is the *first* 4 messages of one failed run:

Beginning of package execution

The variable "User::RefreshFrom" is already on the read list. A variable may only be added once to either the read lock list or the write lock list.

The expression for variable "DeleteRevenueFactQuery" failed evaluation. There was an error in the expression.

An error occurred with the following error message: "The expression for variable "DeleteRevenueFactQuery" failed evaluation. There was an error in the expression.".

The following is the *first* 3 messages of another failed run:

Beginning of package execution

The variable "User::SqlServer" is already on the read list. A variable may only be added once to either the read lock list or the write lock list.

The expression "@.[User::SqlServer]" on property "ServerName" cannot be evaluated. Modify the expression to be valid.

|||

Kris,

Its hard to work out what's wrong from what you've said here. Can you share your package?

If you like, send your package to me and I'l take a look.

-Jamie

jamie.thomson[at]conchango.com

|||

Kris, just a guess, but are you running the RTM version of SSIS?

Thanks,

K

|||Yes, I'm running on the final version of SSIS|||

One thing to add, this package always works on a single processor machine but we can recreate the intermittent problem on 2 different multi-processor machines.

Does anyone know if expressions are evaluated to set variables in concurrent threads?

The variables that are giving the intermittent problems are used in more than one expression to initialize other variables or properties.

I'm worried it is executing the expressions on more than one thread and ending up on different processors, and the locking scheme doesn't use a memory boundary when checking if the variable is already on the readonly list before adding it.

Anyways, I think at this point I'm going to scrap using expressions and setup the variables and properties in a script task. I have to get this working soon.

Everything else is done on our project.

|||

I too am experiencing this error. If I re-build/deploy the package, the error seems to go away until I build/deploy again, and then I usually get the error.

BobP

|||

I had the same failure where I had a sequence container with 2 execute package tasks in it running in parallel. This worked fine on my workstation but failed on the dual processor server. I added a dependency so they run sequentially and the problem has gone away.

My failure condition on the dual proc server was when the SSIS packages were launched from a SQL Agent job. Running interactively with DTEXEC from a command proc worked.

|||

I too have had the same problem on a dual-proc machine. There seems to be a familiar story developing here.

[Kris, sorry I didn't get back to you after you mailed - just haven't had time to explore it enough I'm afraid]

-Jamie

|||

I had the same problem on quad-processor machine. I'll try to get rid of this problem by setting MaxConcurrentExecutables to 1. It seems critical bug!

|||

I am facing the same issue on the 4 proc machine, If I execute the package using dtexecui i works without any problems. Does anyone have resolution on this ?

Regards

Meghana

|||

Well, I don't know what the current status on this matter is but, if anybody is interested, I'm having the same problems on a 4 Intel Xeon processors server.

Similar to what is mentioned in other related posts, everything runs smoothly on my 1 processor development box but, when deployed on a multiprocessors server, I'm having multiple DTS_E_VARIABLEALREADYONREADLIST error intermittently, i.e. with multiple tasks but not necessarily the same throughout various executions.

For the time being, I’ve fixed the problem by either adding precedence constraints between tasks (which could easily work in parallel) or by setting the MaxConcurrentExecutables package property to 1 or both but, for me, it is more a workaround than any real solution: if I cannot use both common configurations and multiprocessors, SSIS seems suddenly limited.

A quick note: contrary to what is mentioned in a related post, I can reproduce the same errors with both the dtexec command prompt utility and the graphical interface.

I should add that I’m also having issues with package transactions and Microsoft DTC but, at this point, I’m not sure whether these issues are due to multiprocessors, Windows 2000 (kinda old for SQL Server 2005, isn’t it?) or simply a wrong use of them.

Anyway, any new insights on this matter would be greatly appreciated.

Help! hresult DTS_E_VARIABLEALREADYONREADLIST

We have a SSIS package that intermittently fails on the deployed server (works fine on our dev server) with the following error:

"The variable "%1!s!" is already on the read list. A variable may only be added once to either the read lock list or the write lock list."

This seems to happen right at the start when the variables are processed before any tasks happen. It also only fails half the time.

I just don't even know where to begin. Any clues?

I also want to add that not only does it fail only some of the time it also fails on different variables, always on an expression and always at the begining.

I think maybe the expression evaluator has a locking problem...

Here are some examples:

The following is the *first* 4 messages of one failed run:

Beginning of package execution

The variable "User::RefreshFrom" is already on the read list. A variable may only be added once to either the read lock list or the write lock list.

The expression for variable "DeleteRevenueFactQuery" failed evaluation. There was an error in the expression.

An error occurred with the following error message: "The expression for variable "DeleteRevenueFactQuery" failed evaluation. There was an error in the expression.".

The following is the *first* 3 messages of another failed run:

Beginning of package execution

The variable "User::SqlServer" is already on the read list. A variable may only be added once to either the read lock list or the write lock list.

The expression "@.[User::SqlServer]" on property "ServerName" cannot be evaluated. Modify the expression to be valid.

|||

Kris,

Its hard to work out what's wrong from what you've said here. Can you share your package?

If you like, send your package to me and I'l take a look.

-Jamie

jamie.thomson[at]conchango.com

|||

Kris, just a guess, but are you running the RTM version of SSIS?

Thanks,

K

|||Yes, I'm running on the final version of SSIS|||

One thing to add, this package always works on a single processor machine but we can recreate the intermittent problem on 2 different multi-processor machines.

Does anyone know if expressions are evaluated to set variables in concurrent threads?

The variables that are giving the intermittent problems are used in more than one expression to initialize other variables or properties.

I'm worried it is executing the expressions on more than one thread and ending up on different processors, and the locking scheme doesn't use a memory boundary when checking if the variable is already on the readonly list before adding it.

Anyways, I think at this point I'm going to scrap using expressions and setup the variables and properties in a script task. I have to get this working soon.

Everything else is done on our project.

|||

I too am experiencing this error. If I re-build/deploy the package, the error seems to go away until I build/deploy again, and then I usually get the error.

BobP

|||

I had the same failure where I had a sequence container with 2 execute package tasks in it running in parallel. This worked fine on my workstation but failed on the dual processor server. I added a dependency so they run sequentially and the problem has gone away.

My failure condition on the dual proc server was when the SSIS packages were launched from a SQL Agent job. Running interactively with DTEXEC from a command proc worked.

|||

I too have had the same problem on a dual-proc machine. There seems to be a familiar story developing here.

[Kris, sorry I didn't get back to you after you mailed - just haven't had time to explore it enough I'm afraid]

-Jamie

|||

I had the same problem on quad-processor machine. I'll try to get rid of this problem by setting MaxConcurrentExecutables to 1. It seems critical bug!

|||

I am facing the same issue on the 4 proc machine, If I execute the package using dtexecui i works without any problems. Does anyone have resolution on this ?

Regards

Meghana

|||

Well, I don't know what the current status on this matter is but, if anybody is interested, I'm having the same problems on a 4 Intel Xeon processors server.

Similar to what is mentioned in other related posts, everything runs smoothly on my 1 processor development box but, when deployed on a multiprocessors server, I'm having multiple DTS_E_VARIABLEALREADYONREADLIST error intermittently, i.e. with multiple tasks but not necessarily the same throughout various executions.

For the time being, I’ve fixed the problem by either adding precedence constraints between tasks (which could easily work in parallel) or by setting the MaxConcurrentExecutables package property to 1 or both but, for me, it is more a workaround than any real solution: if I cannot use both common configurations and multiprocessors, SSIS seems suddenly limited.

A quick note: contrary to what is mentioned in a related post, I can reproduce the same errors with both the dtexec command prompt utility and the graphical interface.

I should add that I’m also having issues with package transactions and Microsoft DTC but, at this point, I’m not sure whether these issues are due to multiprocessors, Windows 2000 (kinda old for SQL Server 2005, isn’t it?) or simply a wrong use of them.

Anyway, any new insights on this matter would be greatly appreciated.

Help! hresult DTS_E_VARIABLEALREADYONREADLIST

We have a SSIS package that intermittently fails on the deployed server (works fine on our dev server) with the following error:

"The variable "%1!s!" is already on the read list. A variable may only be added once to either the read lock list or the write lock list."

This seems to happen right at the start when the variables are processed before any tasks happen. It also only fails half the time.

I just don't even know where to begin. Any clues?

I also want to add that not only does it fail only some of the time it also fails on different variables, always on an expression and always at the begining.

I think maybe the expression evaluator has a locking problem...

Here are some examples:

The following is the *first* 4 messages of one failed run:

Beginning of package execution

The variable "User::RefreshFrom" is already on the read list. A variable may only be added once to either the read lock list or the write lock list.

The expression for variable "DeleteRevenueFactQuery" failed evaluation. There was an error in the expression.

An error occurred with the following error message: "The expression for variable "DeleteRevenueFactQuery" failed evaluation. There was an error in the expression.".

The following is the *first* 3 messages of another failed run:

Beginning of package execution

The variable "User::SqlServer" is already on the read list. A variable may only be added once to either the read lock list or the write lock list.

The expression "@.[User::SqlServer]" on property "ServerName" cannot be evaluated. Modify the expression to be valid.

|||

Kris,

Its hard to work out what's wrong from what you've said here. Can you share your package?

If you like, send your package to me and I'l take a look.

-Jamie

jamie.thomson[at]conchango.com

|||

Kris, just a guess, but are you running the RTM version of SSIS?

Thanks,

K

|||Yes, I'm running on the final version of SSIS|||

One thing to add, this package always works on a single processor machine but we can recreate the intermittent problem on 2 different multi-processor machines.

Does anyone know if expressions are evaluated to set variables in concurrent threads?

The variables that are giving the intermittent problems are used in more than one expression to initialize other variables or properties.

I'm worried it is executing the expressions on more than one thread and ending up on different processors, and the locking scheme doesn't use a memory boundary when checking if the variable is already on the readonly list before adding it.

Anyways, I think at this point I'm going to scrap using expressions and setup the variables and properties in a script task. I have to get this working soon.

Everything else is done on our project.

|||

I too am experiencing this error. If I re-build/deploy the package, the error seems to go away until I build/deploy again, and then I usually get the error.

BobP

|||

I had the same failure where I had a sequence container with 2 execute package tasks in it running in parallel. This worked fine on my workstation but failed on the dual processor server. I added a dependency so they run sequentially and the problem has gone away.

My failure condition on the dual proc server was when the SSIS packages were launched from a SQL Agent job. Running interactively with DTEXEC from a command proc worked.

|||

I too have had the same problem on a dual-proc machine. There seems to be a familiar story developing here.

[Kris, sorry I didn't get back to you after you mailed - just haven't had time to explore it enough I'm afraid]

-Jamie

|||

I had the same problem on quad-processor machine. I'll try to get rid of this problem by setting MaxConcurrentExecutables to 1. It seems critical bug!

|||

I am facing the same issue on the 4 proc machine, If I execute the package using dtexecui i works without any problems. Does anyone have resolution on this ?

Regards

Meghana

|||

Well, I don't know what the current status on this matter is but, if anybody is interested, I'm having the same problems on a 4 Intel Xeon processors server.

Similar to what is mentioned in other related posts, everything runs smoothly on my 1 processor development box but, when deployed on a multiprocessors server, I'm having multiple DTS_E_VARIABLEALREADYONREADLIST error intermittently, i.e. with multiple tasks but not necessarily the same throughout various executions.

For the time being, I’ve fixed the problem by either adding precedence constraints between tasks (which could easily work in parallel) or by setting the MaxConcurrentExecutables package property to 1 or both but, for me, it is more a workaround than any real solution: if I cannot use both common configurations and multiprocessors, SSIS seems suddenly limited.

A quick note: contrary to what is mentioned in a related post, I can reproduce the same errors with both the dtexec command prompt utility and the graphical interface.

I should add that I’m also having issues with package transactions and Microsoft DTC but, at this point, I’m not sure whether these issues are due to multiprocessors, Windows 2000 (kinda old for SQL Server 2005, isn’t it?) or simply a wrong use of them.

Anyway, any new insights on this matter would be greatly appreciated.

Sunday, February 19, 2012

Help with using the right approach

Greetings my friends

I am attempting to solve the following problem using SSIS, actually I am attempting to convert a SQL Server 2000 DTS package in to a SSIS package.

The package does the following :

1) Retrieve the maximum Price_ID (PK) from a PRICE dimension table.

2) Populate a staging table with data coming from a source system where the PRICE_ID > (Price_ID from above)

3) Update the actual DIM table with the new data help in the staging table.

For this task I want to learn the use of the Lookup component which I think is appropriate.

My questions are as follows :

If I create a global variable to hold the maximum PRICE_ID (see point 1). How do I get to use the variable in the my Data Flow Data source?!

I am totally confused... I don't even know where to start with this.

Your help would be appreciated.

Thanks SQL friends.

dreameR.78 wrote:

If I create a global variable to hold the maximum PRICE_ID (see point 1). How do I get to use the variable in the my Data Flow Data source?!

This should explain it: http://blogs.conchango.com/jamiethomson/archive/2005/12/09/2480.aspx

-Jamie

|||

Hi Jamie,

Firstly, thanks for the link. Although I haven't implemented a solution yet, I think I know how to go on about solving my problem. But I have one more question regarding the last paragraph from your article.

You say :

"So the only thing you have to do after that is find a way of changing @.[VariableContainingFilterValue]. That's not within the scope of this post because there are many ways that you could do this. I'll leave it to your imagination!"

I am thinking of adding a SQL Task component to set the value of my initial variable. In other words, create a SQL Task containing :

"select max(PRICE_ID) from Price_DIM"

and hold that value in a variable which I can then use to replace @.[VariableContainingFilterValue].

I am not sure if this the most elegant way to do this. Can you suggest alternatives?

Thanks for your help in advance.

|||

dreamer,

In your situation, that is absolutely the correct thing to do! You'll have to give max(PRICE_ID) an alias. Like this:

"select max(PRICE_ID) as MAX_PRICE_ID from Price_DIM"

because you need to reference that alias when you pass the value into your SSIS variable.

-Jamie

|||

Hi Jamie,

Thank you once again.

I have created two variables, one to hold my maximum PRICE_ID and one to hold the SQL String which I plan to use in my data source component. The problem is, when I define the expression (as suggested in your blog) I get an error saying that the expression for variable SourceSQL failed evaluation. There was an error in the expression.

I don't understand as I believe I put the right expression which is :

"Select * from Offer_Price_Dividend where OFFER_PRICE_ID >" + @.[User::MAX_OFFER_PRICE_ID]

One thing I haven't done is cast my MAX_OFFER_PRICE_ID as a string. I will try that and let you know.

Thanks.

|||

dreameR.78 wrote:

Hi Jamie,

Thank you once again.

I have created two variables, one to hold my maximum PRICE_ID and one to hold the SQL String which I plan to use in my data source component. The problem is, when I define the expression (as suggested in your blog) I get an error saying that the expression for variable SourceSQL failed evaluation. There was an error in the expression.

I don't understand as I believe I put the right expression which is :

"Select * from Offer_Price_Dividend where OFFER_PRICE_ID >" + @.[User::MAX_OFFER_PRICE_ID]

One thing I haven't done is cast my MAX_OFFER_PRICE_ID as a string. I will try that and let you know.

Thanks.

You've worked it out on your own :)

Yes, it needs to be casted as a string.

-Jamie