Viewing 15 posts - 2,611 through 2,625 (of 13,460 total)
can you show details, and not any pseudo code?
if you can show us the exact code you are using to send the emails, we can help you track down the...
Lowell
January 29, 2014 at 5:41 am
... our ethics code requires us to prevent you from seeing what we are doing ...
Lowell
January 28, 2014 at 1:36 pm
the fix is to group the data by day to get daily totals when more than one shipement exists per day, then get the max per week or month, depending...
Lowell
January 28, 2014 at 1:28 pm
based on your data, and some substantial cleanup of what you pasted,(year 2104) i get a max of 60 shipped for week 2:
;WITH MyCTE([Invtid],[Case_ship],[Trandate],[FiscYr],[PerPost],[week_period],[day_period])
AS
(
SELECT 'A',CONVERT(int,'10'),convert(date,' 1/1/2014'),'2014',' 1',' 1',' 1'...
Lowell
January 28, 2014 at 1:06 pm
wrapping your current query and using a CTE or subquery works;
here's a simple case statemetn example:
SELECT
CASE WHEN avg_read_disk_latency_ms < 20 THEN 'fast'
WHEN avg_read_disk_latency_ms < 50...
Lowell
January 28, 2014 at 10:39 am
a scheduled job could check each database, and if it finds the right role or user, perform the same script we are recommending above.
Lowell
January 28, 2014 at 9:40 am
if a table was dropped, you might be able to find out who/ when it was dropped by looking at the default trace.

if you need the DDL to recreate the...
Lowell
January 28, 2014 at 8:52 am
is there a DDL trigger on the database that is designed to protect specific tables?
that sounds like a custom error message to me.
select * from sys.server_triggers
Lowell
January 28, 2014 at 7:55 am
crazy_new (1/28/2014)
The stored procedure works, because if I execute it outside the trigger, it works.Maybe my syntax is wrong for the trigger or something
apparently, the stored procedure finds the data...
Lowell
January 28, 2014 at 7:25 am
I'm not sure myself, which is why i was asking;
the examples i put out are what is wierd for me. If a query takes ten seconds, i'd kind of expect...
Lowell
January 27, 2014 at 2:48 pm
yes it can, if you follow the correct construct;
in SQl there's no THEN:
CREATE PROCEDURE [IFTHEN] AS
DECLARE @max-2 INT, @min-2 INT;
SELECT
@min-2=MIN(idt)
,@max=MAX(idt)
FROM test;
IF ((@max-@min)>50000)
BEGIN
PRINT 'Doing stuff.'
---Execute more SQL commands---
END; ...
Lowell
January 27, 2014 at 1:36 pm
it depends on what you mean;
you can of course return results that have operations agaisnt them.
if you mean can you pass a command and have it interpreted, then yes, with...
Lowell
January 27, 2014 at 1:11 pm
and another way:
you can declare an explicit escape char like this:
select
object_name(object_id),
definition
from sys.sql_modules
WHERE definition like '%referall!_orr%' ESCAPE '!'
Lowell
January 27, 2014 at 9:29 am
you are too quick! i edited almost right away, but you grabbed my first verison.
i updated my post, i think it's filtering based on your date requirement now
Lowell
January 27, 2014 at 8:53 am
in the future, make your post title something other than "query help"; you'll get better responses if ti was something more like "empid wherethe max date?" or something descriptive.
there's...
Lowell
January 27, 2014 at 8:44 am
Viewing 15 posts - 2,611 through 2,625 (of 13,460 total)