Public Shared Function ConvertToProperCase(ByVal s As String) As String
If Not IsNothing(s) then
Return UCase(Left(s,1)) & LCase(Right(s,Len(s)-1))
End If
End Function
-
RS2005: Convert to Proper Case
@ 2009-02-13 – 20:14:02
-
DatePicker control for SQL RS2005 SP2
@ 2008-07-30 – 16:34:14
Dates in the Datetimepicker control appear in the incorrect format when you view a report of SQL Server 2005 Reporting Services with SP2 on a server that is set to a UK locale
http://support.microsoft.com/kb/938823/en-us
In this scenario, the date appears in the mm/dd/yyyy format in the Datetimepicker control. However, you expect that the date appears in the dd/mm/yyyy format.
-
Data migration in Oracle
@ 2007-02-02 – 11:13:00
PROCEDURE procDeptMigration
IS
--
-- Cursor to retrieve all the old dept data
--
CURSOR cu_dept IS
SELECT * FROM dept;
crec_dept cu_dept%ROWTYPE;BEGIN
FOR crec_dept IN cu_dept
LOOP--insert in the new table
INSERT INTO DEPARTMENT
VALUES
(crec_dept.deptno, crec_dept.dname, crec_dept.loc);-- Display the entire able on screen
DBMS_OUTPUT.PUT_LINE('DEPTNO : '||crec_dept.deptno );
DBMS_OUTPUT.PUT_LINE('DNAME : '||crec_dept.dname );
DBMS_OUTPUT.PUT_LINE('LOC : '||crec_dept.loc );END LOOP;
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE(SQLCODE||' '||SQLERRM||' AddressCode '||crec_dept.deptno);END procDeptMigration;
-
Identify and delete duplicate rows in a table
@ 2007-02-02 – 10:59:07
create table test (id int identity(1,1), code char(5))
insert into test (code) values ('a')
insert into test (code) values ('a')
insert into test (code) values ('a')
insert into test (code) values ('b')
insert into test (code) values ('b')
insert into test (code) values ('b')
insert into test (code) values ('c')
insert into test (code) values ('d')
insert into test (code) values ('d')--Identify the rows
select code from test group by code having count(*) > 1--Remove the rows
delete test
where id > (
select min(m.id)
from test m
where m.code = test.code
) -
Group total summary
@ 2007-01-15 – 15:29:32
To get grand total summary for individual group totals, add the group header or footer cells with the correct value,you may rename this cell as grpTotal.Then add a textbox in the Report Footer and use the expression =Sum(ReportItems!grpTotal.Value).This will sum the group totals.
