Saturday, June 12, 2010

Oralce SQL:
Select the maximum date from each month in a date column .
column named (date_col) contains dates and you would like to select the maximum date from each month in this column.

select max(date_col)
from table_name
group by to_char(date_col,'mm'),to_char(date_col,'yyyy')
ORACEL SQL.
How to List dates between two dates interval

select to_date('Start_date','dd-mm-yyyy') + rownum -1
from all_objects
where rownum <= to_date('End_date','dd-mm-yyyy')-to_date('Start_date','dd-mm-yyyy')+1

Tuesday, April 7, 2009

ListBox Selected Values

Listbox selected values string separated with “,”

Dim li As ListItem
Dim x As Integer = 0
Dim Strv As String

For Each li In LB_users.Items
If li.Selected = True Then
strv = li.Value + "," + txt_users.Text
strv = strv.Remove(strv.Length - 1)

End If

Next