Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
In your st table you may just add an expression as count(1) and the expression total should give you the total count.
In your load script you could set a flag and then count this..
1 as Flag
and then count(flag)
In your script either use
1 As Flag
or
RowNo() As RowNo
and then Count(Flag) or Count(RowNo)
In your st table you may just add an expression as count(1) and the expression total should give you the total count.
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