Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Create flag and count days

Hi all.

I have a table who I would like to add a column with "1" as a flag for each day so I could count the days.

What is the easiest way to do that?

RowCount.bmp

1 Solution

Accepted Solutions
sudeepkm
Specialist III
Specialist III

In your st table you may just add an expression as count(1) and the expression total should give you the total count.

View solution in original post

4 Replies
Not applicable
Author

In your load script you could set a flag and then count this..

1 as Flag

and then count(flag)

senpradip007
Specialist III
Specialist III

In your script either use

1 As Flag

or

RowNo() As RowNo

and then Count(Flag) or Count(RowNo)

sudeepkm
Specialist III
Specialist III

In your st table you may just add an expression as count(1) and the expression total should give you the total count.

Not applicable
Author

Agree.

You can disregard the flag (not really needed to do a simple count) and use an expression like:

count(distinct Start_Date)

This will always be work better if you have more than one line for each date in your source data