Forum Replies Created

Viewing 15 posts - 10,666 through 10,680 (of 13,469 total)

  • RE: Determine Row Size on a Table

    the extra two bytes are so they can store the physical address of the memory location of the row.

  • RE: date function

    you should probably explain what you are trying to do; there's some logical errors in your code;

    this section:

    DATEDIFF(ms, 0, '2009-07-16 12:30:00') --milliseconds from 01/01/1900 to today--overflow

    is trying to calculate all...

  • RE: Email upon any login failure

    Jack Corbett (8/7/2009)


    SQL Server Agent -> Alerts.

    gawd after you said it, of course i know better...duh....thanks Jack; i thought it was something new.

  • RE: Email upon any login failure

    Jack Corbett (8/7/2009)


    Do you have database mail setup? Have you set up the alert system to use database mail? Lastly, how did you setup the alert? I...

  • RE: Managing Useful Scripts and Articles

    most decent text editors have syntax highlighting in them; many have a snippet feature as well. t

    I use editplus because besides syntax highlighting, it has a nice cliptext feature, where...

  • RE: Query tuning issue..

    wouldn't changing the defaults on these to empty strings improve your proc a bit?

    @componentType varchar(10) = null,
    @lang varchar(10) = null,
    @issVersion varchar(10) = null,
    @entitlementSuite varchar(10) = null,
    @platform varchar(10) = null,
    

    comparing SomeColumn...

  • RE: Query tuning issue..

    yeah i was looking at that;

    really what you want to do is have your original be a "master" procedure, and depending on parameters, call other, more refined procedures for specific...

  • RE: Query tuning issue..

    parameter sniffing: search here on SSC for some examples and solutions;

    parameter sniffing happens when an execution plan is built that does not reflect the real way to get the data;...

  • RE: 'Add' to a character.

    elegant way? not really...you've got to convert to int, add the value, then convert the value back to varchar/nvarchar, then you have to add the preceeeding zeros:

    SELECT RIGHT('000000' + convert(varchar(30),...

  • RE: How do I return the third Friday of the current month?

    i had the first monday of this month as an already saved snippet;

    her's the step by step on how i got the third friday:

    now instead of adding two weeks as...

  • RE: Editing an SQL Stored Procedure

    thanks for the feedback;

    can you clarify, you wanted to edit the procedure so it only returned results for 'CONSUME','SLOFF' and not all 5 values? was that the objective?

  • RE: Editing an SQL Stored Procedure

    there was a syntax error in the OR portion of the where statement where a minus sign should be an OR;

    'SLOFF' - mx_2 = 'UNCONSUME'

    should be

    'SLOFF'...

  • RE: How to set defaults on a join

    sure...the ISNULL or COALESCE function can do what you want:

    create view myView

    as

    select

    tableA.col1 as cola1,

    tableA.col2 as cola2,

    ISNULL(tableB.col1,'no selection') as colb1, --assuming...

  • RE: Date Range of occurences of consecutive String Values?

    misread the requirement...how about this:

    SELECT

    IssueNumber,

    Status,

    min(ActivityDate) As ActivityDate,

    min(EndDate) As EndDate

    FROM(

    select MyAlias.* ,myAlias2.ActivityDate as EndDate from

    (select

    IssueNumber,

    ...

  • RE: Date Range of occurences of consecutive String Values?

    thank you for the DDL and sample data; that makes it SO easy to test and offer suggestions;

    will row_number give you the data you are looking for?

    try these two SQLs...

Viewing 15 posts - 10,666 through 10,680 (of 13,469 total)