Forum Replies Created

Viewing 15 posts - 2,611 through 2,625 (of 13,462 total)

  • RE: Mail doesn't get queued and sent

    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...

  • RE: Powershell code encapsulation into exe with dynamic parameters

    ... our ethics code requires us to prevent you from seeing what we are doing ...

  • RE: finding the maximum of a sum in SSRS 2012

    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...

  • RE: finding the maximum of a sum in SSRS 2012

    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'...

  • RE: Need T-SQL to add status

    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...

  • RE: different user database permissions across servers

    a scheduled job could check each database, and if it finds the right role or user, perform the same script we are recommending above.

  • RE: Mising table

    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...

  • RE: Table permission denied

    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

  • RE: Trigger

    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...

  • RE: In a Trace, is CPU = elapsed Time?

    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...

  • RE: Can a Stored Procedure do addition, subtraction, greater than and less than?

    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; ...

  • RE: Can a Stored Procedure do addition, subtraction, greater than and less than?

    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...

  • RE: Finidng which stored proc causes the error ?

    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 '!'

  • RE: Query Help

    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

  • RE: Query Help

    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...

Viewing 15 posts - 2,611 through 2,625 (of 13,462 total)