Forum Replies Created

Viewing 15 posts - 2,551 through 2,565 (of 2,894 total)

  • RE: Help with SQL Coding

    Paul White NZ (7/13/2010)


    ...

    the set-based solutions are non-trivial too, and may not perform any better.

    ...

    You are absoultely right. Actually, strictly speaking, it is impossible to guarantee absolute uniqueness in a...

  • RE: Between Statment only for current day

    ...

    click the link in my signature

    ...

  • RE: Character type number convert

    I knew it wouldn't work, however it does look nice (as result of creative thinking :hehe:)... :w00t::-D:w00t:

  • RE: Help with SQL Coding

    You didn't get. It is just a joke!

    You should: Ha! Ha! Ha!

    Am I right?

    If not, I have some even better solution. It will use multiple temp tables, few...

  • RE: not in operator with multiple columns

    thava (7/13/2010)


    thanks for your immediate response

    is this query is correct

    DELETE BatchStock

    FROM #tmp t

    ...

  • RE: Between Statment only for current day

    jon pill (7/13/2010)


    SELECT min(upvolume),min(downvolume),MAX(upvolume),max(downvolume)

    FROM DBVaskVbid WITH (NOLOCK)

    WHERE TotalTrades

    BETWEEN (SELECT MAX(TotalTrades)FROM DBVaskVbid WITH (NOLOCK))

    AND

    (SELECT MAX(TotalTrades)-1000 FROM DBVaskVbid WITH (NOLOCK))

    I have a datestamp field registering 7/13/2010 3:38:00 PM...

  • RE: Character type number convert

    Looks like it's work:

    DROP TABLE #TABLE

    CREATE TABLE #TABLE (data CHAR(50))

    INSERT INTO #TABLE

    SELECT '1'

    UNION ALL SELECT '1.1'

    UNION ALL SELECT '1.1.3'

    UNION ALL SELECT '1.2'

    UNION...

  • RE: not in operator with multiple columns

    thava (7/13/2010)


    DELETE

    FROM BatchStock

    WHERE PurId = @PurID AND DocRef = @DocRef...

  • RE: Query Help for Newb

    This will run much faster:

    select hostname,

    sum(case when severity_guid='0168A833-1732-411E-8205-C2F6CD91737D'

    then 1 else 0 end) as [Count_Of_0168A833-1732-411E-8205-C2F6CD91737D]

    ,sum(case when severity_guid='CB2F2B90-2DA4-4075-BCAA-DD5D2CEFBFD5'

    then 1 else 0 end) as [Count_Of_CB2F2B90-2DA4-4075-BCAA-DD5D2CEFBFD5]

    ,sum(case when severity_guid='C4CF8A23-A106-4617-BAB0-94DA3CA74EF1'

    then 1...

  • RE: Generic insert scuppered by a timestamp column

    you can use "default" as per:

    create table #tt (val int, ts timestamp)

    insert #tt (val, ts) values (1, default)

  • RE: Generic insert scuppered by a timestamp column

    Can you post sample of your "generic" code?

  • RE: Help with SQL Coding

    Dave Ballantyne (7/12/2010)


    ...

    As previously stated , an identity column sounds like the job.

    Steve Jones - Editor (7/12/2010)


    An identity property and a unique index on this column will work. Trying to...

  • RE: Loop, Cursor or both?

    The following query is based on your test setup, your first attempt and my attempt to understand relationship between your tables:

    /* --Setup

    /* --Setup

    --===== If the test table already exists, drop...

  • RE: Loop, Cursor or both?

    george.greiner (7/7/2010)


    :crazy:

    I was on holiday, so couldn't reply. Do you still have issues with your extract?

  • RE: CTE - Avoiding the cursor

    Hi, I was on holiday, so couldn't reply earlier.

    Brandie Tarvin (7/7/2010)


    Eugene Elutin (7/6/2010)


    Post #945638 explains how you can generate random number using NEWID() function without using FranchiseID column...

Viewing 15 posts - 2,551 through 2,565 (of 2,894 total)