Viewing 15 posts - 316 through 330 (of 569 total)
Hi,
try this
declare @i varchar(1000)
select @i = YEAR(getdate())
select CAST(@i AS bigint),@i
July 24, 2009 at 4:32 am
Hi,
create the table T2 with the totalpay column as int,
then create trigger
July 24, 2009 at 3:22 am
t.hitendra (7/24/2009)
Hi,
use the compute column in the table like
create table T2(
T2ID int primary key,
hours int,
T1ID int FOREIGN KEY references T1(T1ID),
totalpay as (T1ID * hours)
)
]
Guy needs total=rate*hours.
Above answer would simply...
July 24, 2009 at 2:23 am
govnaah (7/24/2009)
i want [totalpay] from TD2 to automatically calculate [TD1].[rate] * [hours] when values get inserted. How will i go about doing this?
Hi,
use the compute column in the table like
create...
July 24, 2009 at 1:05 am
Hi,
update #temp
set TOTALAVR = ((isnull(AVR1,0)+isnull(AVR2,0)+isnull(AVR3,0))
/(case when (AVR1 is null)or
(AVR2 is null)or
(AVR3 is null) then 2
when (AVR1 is null and AVR2 is null)or
(AVR1 is null and AVR3 is null)or
(AVR2 is null...
July 22, 2009 at 2:02 am
Hi,
update #temp
set TOTALAVR = ((isnull(AVR1,0)+isnull(AVR2,0)+isnull(AVR3,0))/3)
July 22, 2009 at 1:12 am
Hi,
try with this
create table #temp
(
slno int,
name1 varchar(10),
AVR1 int,
AVR2 int,
AVR3 int
)
insert into #temp
select 1,'ABCD',5,15,25
union all
select 2,'BCDE',10,20,30
union all
select 2,'CDEF',20,30,40
alter table #temp add TOTALAVR int
update #temp
set TOTALAVR = ((AVR1+AVR2+AVR3)/3)
July 21, 2009 at 10:57 pm
Mia G (7/21/2009)
from acctMainTbl
where acctNum not in (select acctNum from deceasedAcctTbl)
and acctNum not in (select acctNum from oneYrActList)
update activeField
set activeField = (case when acctNum is...
July 21, 2009 at 10:40 pm
July 18, 2009 at 3:03 am
Hi,
try this
01)
select col1,col2,sum(col1+col2) as col3, (sum(col1+col2)/2)as Col4
from MYTABLE
group by col1,col2
02)
select *,(col3/2)as col4 from
(
select col1,col2,sum(col1+col2) as col3
from MYTABLE
group by col1,col2
) AS X
July 18, 2009 at 2:09 am
satishp.mst (7/17/2009)
For e.g. 17/07/2009 00:00:00
quote]
Hi,
only option you must convert the datetime and insert it ...
July 18, 2009 at 1:31 am
The where condition not validate two different numbers even the string like @a = 'N,R'
so try this
declare @a varchar(20)
set @a='ABCD'
select @a
select substring('ABCD',number,1) from
/*Your Number table (or)*/
(select 1 number union...
July 18, 2009 at 1:23 am
erictyrrell (7/17/2009)
When I try to specify delete specifications on each relationship I get the following error on the second relationship
Hi,
In that scenario, my small suggestion is use the status of...
July 17, 2009 at 9:33 pm
July 17, 2009 at 4:05 am
Mansfield (7/16/2009)
insert into Customer (customerName, product, qty)
select customer, 'Chair', ChairQty from Target
union select customer, 'Table', TableQty...
July 16, 2009 at 11:10 pm
Viewing 15 posts - 316 through 330 (of 569 total)