Viewing 6 posts - 1 through 6 (of 6 total)
coalesce: This function checks all the columns specified in the function and returns the column value which is not null. Simply we can say Returns the first nonnull expression among...
December 31, 2009 at 2:23 am
You can use Datediff function also. Like the Datediff('d',@FromDate,tableData) > =0 and Datediff('d',@ToDate,tableData) <=0.
December 31, 2009 at 2:12 am
declare @CodeLen int,
@strSQL varchar(4000)
SELECT @CodeLen = MAX(DATALENGTH(Code)) from History_temp
--print @CodeLen
set @strSQL='SELECT POL_NO [Policy]
,Name
,AGY_NO [Agency]
,Initials
,cast(Code as varchar( ' +@CodeLen + ')) [Code]
,Method
,createdOn AS [Received Date]
FROM History_temp...
June 24, 2009 at 6:12 am
Please ignore my previous post some of the character are not displayed
Let us assume from date = 04/10/2009 and to date = 04/20/2009
then
SELECT * FROM Table t WHERE Userid...
February 20, 2009 at 12:14 am
Let us assume from date = 04/10/2009 and to date = 04/20/2009
then
SELECT * FROM Table t WHERE Userid = 100
AND (@FromDate between t.FromDate...
February 20, 2009 at 12:08 am
Create procedure name
@value varchar(50),
@value2 varchar(150)
as
begin
declare @myValue int
SET @myValue=0
Select @myValue = isnull(count(*),0) + 1 from myTable
Insert into myTable values( @myValue, @value, @value2 )
end
December 3, 2008 at 12:05 am
Viewing 6 posts - 1 through 6 (of 6 total)