Forum Replies Created

Viewing 15 posts - 616 through 630 (of 1,082 total)

  • RE: Help on Dups

    Are there any other cols in the table that might help with identifying the groupings?

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Help on Dups

    Ok at last I see what is need, now just to work it out 🙂

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Help on Dups

    HI ,

    Why then is 6 & 8 a result in the second example.

    Also Chris your code doesn't return 10 & 11 as the OP expected.

    thanks

    Chris

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Help on Dups

    HI there

    Are you sure your outputs are correct?

    I'm a bit confused.

    thanks

    Chris

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Find a change in address in a result set

    HI there,

    Please could you read the link below to get the best help from here.

    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    thanks

    Chris

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Should I use nVarchar or Varchar..?

    Hi There,

    Firstly I would recommend using BOL as the explanations are pretty good.

    However seeing as though I'm here I'll try.

    OK Firstly they both have different lengths.

    NVARCHAR tends to take twice...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: help wit "IF" sub query

    HI All,

    as per my orignal post here is the solution with some sample data.

    [font="Courier New"]

    DECLARE @table TABLE

    (

       [id1] INT ,

       [id2] INT ,

       [id3] INT ,

       [id4] INT ,

       [id5]...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: help wit "IF" sub query

    Try this

    SELECT id1, id2, id3

    FROM table

    where

    (id5 = 7 AND x = 1)

    OR

    x = 0

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: How to distinguish between date and time in datetime?

    HI,

    My set date was an example but if you date has a time then the SET @dte = '2008-01-01 01:01:00.010'

    or whatever your data is.

    looking at the other solutions mine might...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: How to distinguish between date and time in datetime?

    HI there,

    I think this might help.

    [font="Courier New"]

    DECLARE @dte DATETIME

    SET @dte = '2008-01-02 00:00.000'

    SELECT

       @dte AS [StartDAte],

       DATEADD(dd, DATEDIFF(dd,0, @dte),-1)  AS [Day before with no time],

       DATEDIFF(ms,DATEADD(dd, DATEDIFF(dd,0, @dte),-1),@dte) [Diff in...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Data cleansing - slect where field value is not unique

    Hi there,

    Did this help?

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Data cleansing - slect where field value is not unique

    Hi there,

    This will list all the [Field Names] that are repeated more than once and how many times they are repeated.

    [font="Courier New"]

    SELECT

       [Field Name],

       COUNT(*)

    FROM [Table Name]

    GROUP BY [Field...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Know your UNION(s), NULL(s), COUNT(s) ?

    if your with is not the first line of code, then you need a ; before it

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Update Query Help

    HI Grant,

    No problem I opened the plan in NOTEPAD ++ and found the text you referring to 🙂

    very helpful 🙂

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Microsoft SQL Server 2005 version difference

    Thanks Paul,

    This will be a good read for the boss.

    I'm hoping to get exams that I could let the team know about in case things start falling over on live...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life

Viewing 15 posts - 616 through 630 (of 1,082 total)