Viewing 15 posts - 2,626 through 2,640 (of 13,469 total)
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; ...
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...
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 '!'
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
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...
January 27, 2014 at 8:44 am
mw112009 (1/27/2014)
January 27, 2014 at 8:21 am
if this is a one time report/export, you can select the data in ssms and chose results to text instead of to grid.
otherwise,
bcp.exe or sqlcmd, either using the -o parameter,...
January 24, 2014 at 1:23 pm
my example trigger, while untested, would not error out if an automated process inserted multiple tickets in a single operation; but it would create a single email that said these...
January 24, 2014 at 11:32 am
well, now i see two things;
first is a critical permissions issue:
the end user who inserts into this table must ALSO be a user in the msdb database, and must also...
January 24, 2014 at 9:23 am
well, what you are seeing in the log is normal, i believe. if the service broker gets an email, it starts the database mail executable,and it's default lifetime is ten...
January 24, 2014 at 9:00 am
since dbmail is already set up adn running, it might be something related tot eh recipient or relaying;
if you run this query, is the specific email you sent in...
January 24, 2014 at 8:16 am
nothing beats actually seeing it for yourself.
here's exactly what i did.
for computed columns, the cost isn't a lot, but it's there.
the key is to look at the actual execution plan.
attached...
January 24, 2014 at 6:44 am
Matt Crowley (1/23/2014)
January 23, 2014 at 1:18 pm
so glad it worked out for you;
just got back from lunch, and i was just about to reply that i think you might have put a space between the slash...
January 23, 2014 at 12:58 pm
aberndt (1/23/2014)
January 23, 2014 at 12:07 pm
Viewing 15 posts - 2,626 through 2,640 (of 13,469 total)