dbTalk Databases Forums  

multiple Conditions in the EvalExpression in the Forloop

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss multiple Conditions in the EvalExpression in the Forloop in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
John230873
 
Posts: n/a

Default multiple Conditions in the EvalExpression in the Forloop - 01-22-2006 , 05:27 PM






Is there a way of repersenting this stagement in the EvalExpression

@LoopCounter > @MaxRecordCount OR @RecordCountLeft > 0

@LoopCounter increments 1 each record
@MaxRecordCount is the maximum records that should be in the record set
@RecordCountLeft is the number of records left after the data flow tasks
has run it the forloop

I trying to make sure that the for loop statment doen't stay in the loop is
a record can not be removed.

Also is there a simple task the will allow the user to reasign a value of a
Variable?

Cheers


Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: multiple Conditions in the EvalExpression in the Forloop - 01-22-2006 , 05:57 PM






Hello John230873,


Have you tried

@LoopCounter > @MaxRecordCount || @RecordCountLeft > 0


Allan


Quote:
Is there a way of repersenting this stagement in the EvalExpression

@LoopCounter > @MaxRecordCount OR @RecordCountLeft > 0

@LoopCounter increments 1 each record
@MaxRecordCount is the maximum records that should be in the record
set
@RecordCountLeft is the number of records left after the data flow
tasks
has run it the forloop
I trying to make sure that the for loop statment doen't stay in the
loop is a record can not be removed.

Also is there a simple task the will allow the user to reasign a value
of a Variable?

Cheers




Reply With Quote
  #3  
Old   
John230873
 
Posts: n/a

Default Re: multiple Conditions in the EvalExpression in the Forloop - 01-22-2006 , 06:03 PM



I have and it didn't give me an error but I thougt || was AND what is a OR ?

"Allan Mitchell" wrote:

Quote:
Hello John230873,


Have you tried

@LoopCounter > @MaxRecordCount || @RecordCountLeft > 0


Allan


Is there a way of repersenting this stagement in the EvalExpression

@LoopCounter > @MaxRecordCount OR @RecordCountLeft > 0

@LoopCounter increments 1 each record
@MaxRecordCount is the maximum records that should be in the record
set
@RecordCountLeft is the number of records left after the data flow
tasks
has run it the forloop
I trying to make sure that the for loop statment doen't stay in the
loop is a record can not be removed.

Also is there a simple task the will allow the user to reasign a value
of a Variable?

Cheers





Reply With Quote
  #4  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: multiple Conditions in the EvalExpression in the Forloop - 01-22-2006 , 06:05 PM



Hello John230873,

Quote:
| = OR
&& = AND


Allan



Quote:
I have and it didn't give me an error but I thougt || was AND what is
a OR ?

"Allan Mitchell" wrote:

Hello John230873,

Have you tried

@LoopCounter > @MaxRecordCount || @RecordCountLeft > 0

Allan

Is there a way of repersenting this stagement in the EvalExpression

@LoopCounter > @MaxRecordCount OR @RecordCountLeft > 0

@LoopCounter increments 1 each record
@MaxRecordCount is the maximum records that should be in the record
set
@RecordCountLeft is the number of records left after the data flow
tasks
has run it the forloop
I trying to make sure that the for loop statment doen't stay in the
loop is a record can not be removed.
Also is there a simple task the will allow the user to reasign a
value of a Variable?

Cheers




Reply With Quote
  #5  
Old   
John230873
 
Posts: n/a

Default Re: multiple Conditions in the EvalExpression in the Forloop - 01-22-2006 , 06:13 PM



Allan, I have almost finished the SSIS package to move not copy data, I
haven't seen any thing like it and thought maybe it can help other people,
any idea where to post it?


"Allan Mitchell" wrote:

Quote:
Hello John230873,

|| = OR

&& = AND


Allan



I have and it didn't give me an error but I thougt || was AND what is
a OR ?

"Allan Mitchell" wrote:

Hello John230873,

Have you tried

@LoopCounter > @MaxRecordCount || @RecordCountLeft > 0

Allan

Is there a way of repersenting this stagement in the EvalExpression

@LoopCounter > @MaxRecordCount OR @RecordCountLeft > 0

@LoopCounter increments 1 each record
@MaxRecordCount is the maximum records that should be in the record
set
@RecordCountLeft is the number of records left after the data flow
tasks
has run it the forloop
I trying to make sure that the for loop statment doen't stay in the
loop is a record can not be removed.
Also is there a simple task the will allow the user to reasign a
value of a Variable?

Cheers





Reply With Quote
  #6  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: multiple Conditions in the EvalExpression in the Forloop - 01-22-2006 , 06:35 PM



Hello John230873,

If you think this will help others then why not put it up on wiki.SQLIS.com

Allan




Quote:
Allan, I have almost finished the SSIS package to move not copy data,
I haven't seen any thing like it and thought maybe it can help other
people, any idea where to post it?

"Allan Mitchell" wrote:

Hello John230873,

|| = OR

&& = AND

Allan

I have and it didn't give me an error but I thougt || was AND what
is a OR ?

"Allan Mitchell" wrote:

Hello John230873,

Have you tried

@LoopCounter > @MaxRecordCount || @RecordCountLeft > 0

Allan

Is there a way of repersenting this stagement in the
EvalExpression

@LoopCounter > @MaxRecordCount OR @RecordCountLeft > 0

@LoopCounter increments 1 each record
@MaxRecordCount is the maximum records that should be in the
record
set
@RecordCountLeft is the number of records left after the data
flow
tasks
has run it the forloop
I trying to make sure that the for loop statment doen't stay in
the
loop is a record can not be removed.
Also is there a simple task the will allow the user to reasign a
value of a Variable?
Cheers




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.