Viewing 15 posts - 271 through 285 (of 425 total)
if {approval date} is null before {status} is set to 'approved', just use isnull():
and datediff( day,
isnull({approval date},getdate()),
{signature date}) <= {@number of days}
March 18, 2008 at 6:22 pm
alorenzini (3/18/2008)
Simple is best I used this route:,CASE
WHEN v.PurchaseAmount/15000 <=1 THEN 0
ELSE v.PurchaseAmount/15000
END as 'TotalPersonalSalesCalculatedPoints'
that simple version doesn't have a sum. i don't know your data (still...
March 18, 2008 at 6:07 pm
does the table have a declared primary key? if not, the interface will attempt to identify the row by qualifying all values. the resulting statement would be something...
March 18, 2008 at 3:38 pm
when numerics are divided, the result is a different sized numeric and it typically has a larger scale than the original value. so numeric(19,2)/int will result in a numeric(25,8)...
March 18, 2008 at 3:28 pm
I'm not sure what you're trying to accomplish. Are this your real table layouts or just a simplified structure for illustration?
If (6,'44444') is inserted to vDeNorm, its trigger inserts...
March 18, 2008 at 3:03 pm
what do you mean by "first". first record encountered or first record when sorted by what column(s)?
the code below should get you started. it will only return the record...
March 11, 2008 at 6:59 pm
i gladly admit when someone has a stronger position that me. i enjoy jousting on topics like this.
😉
March 11, 2008 at 5:09 pm
touche! I/O is an important concern that I had not considered.
Game to miller.
March 11, 2008 at 4:33 pm
again, i see your point, but @@identity (or scope_identity()) used properly can still be used to produce the same results. true, there is an @@identity gotcha but it can...
March 11, 2008 at 4:02 pm
i see you point, but the script that performs the action can collect the contents of inserted/deleted by "select ... from ... where {criteria used to perform the action}" before...
March 11, 2008 at 2:39 pm
ah... DEFAULT VALUES. i figured there had to be some way to do it, but never had the need before so i was unaware.
however, why use the...
March 11, 2008 at 1:45 pm
i don't know how to insert a row into a table whose only column is an identity column. you could add another column to it like so:
alter table table1...
March 11, 2008 at 11:41 am
the update in my prior post will do step #1. it's easily modified to do step #2.
--update name
-- set name.email = other.email
select name.email,
other.email as other_email,...
March 11, 2008 at 11:14 am
i'm a bit confused by your post since you say you want a count for union and job, but your select has no count() and appears to list jobs and...
March 11, 2008 at 11:03 am
Mike Feuti (3/11/2008)
select preferred_mail, name.email, name_address.email,purpose from name,name_address
where name.id=name_address.id
and name.id='405691'
I accidentaly said the 'other' purpose instead of the 'home' purpose in...
March 11, 2008 at 10:52 am
Viewing 15 posts - 271 through 285 (of 425 total)