strSql = “INSERT INTO tbl (clmn1,clmn2) Values(1,null)”
Posted by urshiva on November 25, 2009
strSql = “INSERT INTO tbl (clmn1,clmn2) Values(1,null)”
Posted in General | Leave a Comment »
Posted by urshiva on July 7, 2009
1. CorDBG – command-line debugger. To use CorDbg, you must compile the original C# file using the /debug switch. it resides in “C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\“
2. DbgCLR – graphic debugger. Visual Studio .NET uses the DbgCLR. it resides in “C:\Program Files\Microsoft.NET\SDK\v2.0\GuiDebug”
more information : http://blogs.msdn.com/noahc/archive/2006/01/04/509450.aspx
Posted in General | Leave a Comment »
Posted by urshiva on June 30, 2009
here is the syntax for renaming table in sql server
EXEC sp_rename ‘old_name_of_table’, ‘new_name_of_table ‘
Posted in SQL Server 2005 | Leave a Comment »
Posted by urshiva on June 29, 2009
Posted in SQL Server 2005 | Leave a Comment »
Posted by urshiva on June 11, 2009
we can get distinct rows from a datatable by following way…
myDataTable.DefaultView.ToTable(True, “myDistinctColumnName”)
First parameter takes boolean value for mentioning we need Distinct or Not.
passing True is for Distinct records.
Posted in General | Tagged: Distinct rows from Datatable | Leave a Comment »
Posted by urshiva on April 30, 2009
Select to_char(date_inserted, ‘YYYYMM’) as year_month,
to_char(date_inserted, ‘YYYY’) as year_string,
to_char(date_inserted, ‘month’) as month_string
from myTable
group by year_month
order by year_month;
In the above example,
Posted in Postgre SQL, Uncategorized | 1 Comment »
Posted by urshiva on April 30, 2009
i had the problem
like
i want to keep the where condition depending on the value of parameter is pass.
i tried different things, and final got through with following solution.
select * from deptartment
where
(CASE WHEN $P{param_dept_codice} = -1
THEN true
ELSE dept_codice = $P{param_dept_codice}
END)
above query displays all the records from deptartment table, if you pass the param_dept_codice as -1 .
if you pass some exact deptartment id other than -1, then it will return only those records that satisfies the condition.
Note: i gave -1 for checking because i m sure that i will not have any record with that dept_codice.
Posted in Postgre SQL, iReport | 5 Comments »
Posted by urshiva on April 20, 2009
in ireports we can write condional expression depending on the parameter passed.
here is the example.
$P{param_codice}.equals( new java.lang.Long(-1) ) ? “” : $F{field_descrizione}
Posted in iReport | Leave a Comment »
Posted by urshiva on April 17, 2009
To display current date and time,
you can add a Text field component to design interface.
set the following properties:

Posted in Uncategorized | Leave a Comment »