Forum Replies Created

Viewing 15 posts - 7,681 through 7,695 (of 10,144 total)

  • RE: Character type number convert

    Paul White NZ (7/13/2010)


    skcadavre (7/13/2010)


    You killed both solutions 😛

    It's a knack 😉

    I'm thinking CHARINDEX, split on the period and sort that way?

    That would work (and Chris would provide a recursive...

  • RE: Character type number convert

    Paul White NZ (7/13/2010)


    Chris Morris-439714 (7/13/2010)


    Paul White NZ (7/13/2010)


    Where should 1.2.10 sort, I wonder...?

    Or 1.1.3, even...

    Quite.

    Sampathsoft, please can you confirm what position 1.1.3 would assume in your sequence?

    Many thanks.

  • RE: Character type number convert

    Paul White NZ (7/13/2010)


    Where should 1.2.10 sort, I wonder...?

    Or 1.1.3, even...

  • RE: Only customer accounts with + & - balances

    --Sample data creation

    DECLARE @TABLE AS TABLE(

    [ID] INT IDENTITY,

    [Name] VARCHAR(50),

    [A/C] char(8),

    Balance money)

    INSERT INTO @TABLE ([Name],[A/C], [Balance])

    SELECT 'Cust 1', '10000001', -£45...

  • RE: Character type number convert

    DROP TABLE #TABLE

    CREATE TABLE #TABLE (data CHAR(7))

    INSERT INTO #TABLE

    SELECT '1'

    UNION ALL SELECT '1.1'

    UNION ALL SELECT '1.1.3'

    UNION ALL SELECT '1.2'

    UNION ALL SELECT '1.2.1'

    UNION ALL SELECT '1.2.2'

    UNION ALL SELECT '1.2.3'

    UNION ALL SELECT...

  • RE: Are the posted questions getting worse?

    Dave Ballantyne (7/9/2010)


    Chris Morris-439714 (7/9/2010)


    Can't help but giggle reading that 🙂

    Now, how often have you had to tell folks that there's no guaranteed order of results from a query unless...

  • RE: Are the posted questions getting worse?

    Can't help but giggle reading that 🙂

    Now, how often have you had to tell folks that there's no guaranteed order of results from a query unless there's an order by...

  • RE: Today's Random Word!

    CirquedeSQLeil (7/8/2010)


    sing4you (7/8/2010)


    I retire in 5 years and I won't have a lick of trouble with it. 😉

    I've got lots of plans.

    Retirement??¿

    I plan on retiring in about 75 years

    I...

  • RE: Regarding month text - MSSQL 2005

    deepankarthiks 21157 (7/8/2010)


    Chris Morris-439714 (7/8/2010)


    deepankarthiks 21157 (7/8/2010)


    Hi,

    I have two variable one holds the month value(otherwise month id eg: january - 1 etc) another one holding the complete date.

    Now using...

  • RE: Regarding month text - MSSQL 2005

    deepankarthiks 21157 (7/8/2010)


    Hi,

    I have two variable one holds the month value(otherwise month id eg: january - 1 etc) another one holding the complete date.

    Now using these two i want...

  • RE: Today's Random Word!

    crookj (7/8/2010)


    Chris Morris-439714 (7/8/2010)


    Tom.Thomson (7/7/2010)


    retirement is even busier, I understand.

    Keep it that way! Blokes who retire in the common sense seldom last the year.

    I tried in in 1995 - last...

  • RE: Today's Random Word!

    Ray K (7/8/2010)


    Chris Morris-439714 (7/8/2010)


    Cenote

    C-note

    (Or is that C-flat?)

    It would be a Franklin.

  • RE: Adding a unique primary key when importing data

    Hi Brett

    You have to use a column list, as in this example:

    DROP TABLE #Target

    DROP TABLE #Source

    CREATE TABLE #Target ([ID] INT IDENTITY(1, 1), Something VARCHAR(10), SomethingElse VARCHAR(10))

    CREATE TABLE #Source (Something VARCHAR(10),...

  • RE: how to pass date dynamically

    Use a variable for your value of -30.

    Employ the function DATEADD()

    Take great care with DATETIME data types with regard to the time portion.

    Ignore pointless recommendations to use dynamic SQL.

  • RE: Adding a unique primary key when importing data

    Brett, if the table you are eventually trying to import into has an autoincrementing identity column, then why not use it?

Viewing 15 posts - 7,681 through 7,695 (of 10,144 total)