Forum Replies Created

Viewing 15 posts - 391 through 405 (of 433 total)

  • RE: Counting Characters and Records

    You're welcome buddy. The best thing about these forums is how much we can all learn from each other, there's also some healthy rivalry about too!

    You'll also soon find that...



    Ade

    A Freudian Slip is when you say one thing and mean your mother.
    For detail-enriched answers, ask detail-enriched questions...[/url]

  • RE: Counting Characters and Records

    You'll need to add the field s.subconame to the SELECT part of your statement and then if you also add the INNER JOIN in my previous post so that your...



    Ade

    A Freudian Slip is when you say one thing and mean your mother.
    For detail-enriched answers, ask detail-enriched questions...[/url]

  • RE: Counting Characters and Records

    Sorry! I missed the subcoid column totally in your [containers] table, that is correct:

    INNER JOIN subco s

        ON c.subcoid = s.subcoid

    I'll just take...



    Ade

    A Freudian Slip is when you say one thing and mean your mother.
    For detail-enriched answers, ask detail-enriched questions...[/url]

  • RE: select count(distinct col) with nulls

    I thought that SET ANSI_WARNINGS was a session thing and could be set at the beginning and end of the query?

    Ade



    Ade

    A Freudian Slip is when you say one thing and mean your mother.
    For detail-enriched answers, ask detail-enriched questions...[/url]

  • RE: problem with parameter

    For the AM/PM part of your query you'll have to use a CASE statement; something like:

    CASE WHEN datepart(hh,@datetest) > 12

        THEN CAST((datepart(hh,@datetest) - 12) AS VARCHAR) + ' pm'

        ELSE CAST(datepart(hh,@datetest)...



    Ade

    A Freudian Slip is when you say one thing and mean your mother.
    For detail-enriched answers, ask detail-enriched questions...[/url]

  • RE: is this possible to do using join?

    I can see what you are trying to do, but I can't understand why? Have a look in SQL Books Online at CASE statements, this will help get rid of...



    Ade

    A Freudian Slip is when you say one thing and mean your mother.
    For detail-enriched answers, ask detail-enriched questions...[/url]

  • RE: Counting Characters and Records

    You are using [containters] and [indexdata] in both queries; and you are grouping by [containercode] on both queries. If I have understood your queries correctly, combining the two SELECT statements in to...



    Ade

    A Freudian Slip is when you say one thing and mean your mother.
    For detail-enriched answers, ask detail-enriched questions...[/url]

  • RE: SQL to T-SQL conversion

    Check out DISTINCT keyword in Books Online. Also look at the SELECT keyword too! These will help you with the basics.



    Ade

    A Freudian Slip is when you say one thing and mean your mother.
    For detail-enriched answers, ask detail-enriched questions...[/url]

  • RE: Looping through database objects using SMO

    Hi, I found this article on this subject: http://sqljunkies.com/WebLog/euang/archive/2004/04/01/1889.aspx

    The important bit being:

    The addition of the If smoStoredProcedure.IsSystemObject = False test slows the execution of the code from 1 sec...



    Ade

    A Freudian Slip is when you say one thing and mean your mother.
    For detail-enriched answers, ask detail-enriched questions...[/url]

  • RE: Finding values with cents...

    I had a similar problem which I solved with:

    WHERE CAST((colName * 100) as INT) % 100 != 0

    No performance issues either.



    Ade

    A Freudian Slip is when you say one thing and mean your mother.
    For detail-enriched answers, ask detail-enriched questions...[/url]

  • RE: Hello, I''''m Gianni Cache

    Rhyming DBAs; that is all we need,

    year zero seven's here and we have a new breed.

    Getting all creative with your words and your rhymes,

    But have your SQL Server's got awesome...



    Ade

    A Freudian Slip is when you say one thing and mean your mother.
    For detail-enriched answers, ask detail-enriched questions...[/url]

  • RE: Missing Row and ID can it be inserted again?

    Firstly you'll need to make sure that no changes are currently being made to your table. You could then copy the do the following:

    --Copy data to temp

    SELECT (idCol, col1, col2, col3)...



    Ade

    A Freudian Slip is when you say one thing and mean your mother.
    For detail-enriched answers, ask detail-enriched questions...[/url]

  • RE: Active X Script fails in Job

    Hi,

    It might be a permissions thing... Check if the account associated with the Sql Server Agent has permissions on this folder.



    Ade

    A Freudian Slip is when you say one thing and mean your mother.
    For detail-enriched answers, ask detail-enriched questions...[/url]

  • RE: Update Trigger questions / multiple rows in "inserted" table

    Hi,

    Something like this should do the trick:

    IF EXISTS (SELECT name FROM sysobjects WHERE name = N'trgVendor' AND type = 'TR')

        DROP TRIGGER trgVendor

    GO

    CREATE TRIGGER trgVendor

    ON vendor

    FOR UPDATE

    AS

    BEGIN

     UPDATE vendor

     SET...



    Ade

    A Freudian Slip is when you say one thing and mean your mother.
    For detail-enriched answers, ask detail-enriched questions...[/url]

  • RE: Copy DTSs to a new name

    Check out this article:

    http://www.dbazine.com/sql/sql-articles/larsen8

    It worked for me!!!

    Ade



    Ade

    A Freudian Slip is when you say one thing and mean your mother.
    For detail-enriched answers, ask detail-enriched questions...[/url]

Viewing 15 posts - 391 through 405 (of 433 total)