Viewing 15 posts - 31 through 45 (of 82 total)
I believe your question is if there are no records in the table, the query should return 1 instead of NULL.
Change the statement as
ISNULL(MAX(R.Number_od_Records),0) + 1
August 2, 2006 at 9:31 am
the decimal value contains 10 digits (including precision & scale) where as data type is defined as decimal(9,4). Change the data type from decimal(9,4) to decimal(10,4)
August 2, 2006 at 9:26 am
try like this...
use adventureworks
SELECT h.* FROM sales.SalesOrderHeader h join
(Select
convert(varchar,DateAdd(mm, DateDiff(mm, 0, dateadd(mm, -2, Getdate())),0),112) begindate,
convert(varchar,DateAdd(mm, DateDiff(mm, 0, dateadd(mm, -1, Getdate())),0),112) enddate
) as Dt
on
h.Orderdate between dt.begindate and...
July 31, 2006 at 3:23 pm
remove the following line from source code and compile the trigger
alter table [dbo].[JobSeekerServices] disable trigger [Insert_JobSeekerDevelopmentPlans]
July 27, 2006 at 2:32 pm
check the information_schema views OR
sys.indexes,sys.index_columns, sys.check_constraints, sys.key_constraints,sys.columns and sys.tables, etc
July 27, 2006 at 2:26 pm
if u are using SQL 2005 then
DISABLE TRIGGER <> ON <>
ENABLE TRIGGER <> ON <>
July 27, 2006 at 1:42 pm
select dateadd(ss, -1*ms_ticks/1000, getdate()) "server is reunning since" from sys.dm_os_sys_info
July 27, 2006 at 1:34 pm
then use <>.sys.all_parameters view
July 27, 2006 at 10:45 am
use information_schema.parameters view...
July 27, 2006 at 9:56 am
create table #temp
(
id int,
serial_num varchar(15),
status varchar(10),
last_updated_by varchar(10),
last_updated_date datetime
)
insert into #temp values (1,'1-45540381','ACCEPT','tom','7/26/2006 3:14:31 PM')
insert into #temp values (2,'1-45540505','ACCEPT','tom','7/26/2006 3:15:08 PM')
insert into #temp values (3,'1-45540381','UNACCEPT','tom','7/26/2006 5:16:11 PM')
insert into #temp values (4,'1-45540589','ACCEPT','tom','7/26/2006...
July 27, 2006 at 9:47 am
ALTER DATABASE COLLATE SQL_Latin1_General_CP1_CI_AS
SELECT DATABASEPROPERTYEX('CDR_SQL','Collation')
July 26, 2006 at 9:46 am
Try this query...
DECLARE @dbname sysname
SET @dbname = DB_NAME()
SELECT CONVERT(char, backup_start_date, 111) AS [Date], --yyyy/mm/dd format
--CONVERT(char, backup_start_date, 108) AS [Time],
@dbname AS [Database Name],
-- [filegroup_name] AS [Filegroup Name],
--logical_name AS [Logical Filename],
--physical_name AS...
July 26, 2006 at 9:39 am
Viewing 15 posts - 31 through 45 (of 82 total)