Forum Replies Created

Viewing 15 posts - 3,346 through 3,360 (of 6,486 total)

  • RE: String comparison with trailing spaces

    Jack Corbett (5/13/2008)


    I just checked all my servers (2005 and 2000) and in the model database ANSI PADDINGS is false meaning OFF and I have never messed with the default...

  • RE: SQL Query Tuning

    GSquared (5/12/2008)


    declare @FirstDate datetime, @LastDate datetime

    select @FirstDate = CONVERT(VARCHAR(10),DATEADD(m,-7,GETDATE()),101),

    @LastDate = CONVERT(VARCHAR(10), GETDATE(), 101)

    SELECT

    t1.Date_Taken, t1.Time,

    t1.Main_ID, t1.WATER_ULEVEL

    FROM dbo.tblSEL t1 INNER JOIN dbo.tblLocation t2

    ON t1.Main_ID=t2.Main_ID

    WHERE t2.Location='PRK'

    AND t1.Date_Taken>=@FirstDate AND

    t1.Date_Taken<=@LastDate

    ORDER BY t1.Date_Taken, t1.Time

    Interestingly enough...

  • RE: String comparison with trailing spaces

    Jack Corbett (5/13/2008)


    GSquared (5/13/2008)


    (Your test data doesn't work as written, since you tried to insert the value 1 into your ID field twice, after defining it as the primary key.)

    Yes,...

  • RE: String comparison with trailing spaces

    serge.laot (5/13/2008)


    I agree with a column type of char(10) as you say. When it is nvarchar(250) on SQL Serveur 2005 if you run the following query :

    SELECT LEN(fieldname) FROM table;

    you...

  • RE: The CLR

    developmentalmadness (5/13/2008)


    - the Table-valued functions need to materialize their entire recordset before being able to return anything, so they can quickly "swamp" the memory area.

    This is true for...

  • RE: The CLR

    Solomon Rutzky (5/13/2008)


    JohnG (5/13/2008)


    inexplicably not able to handle outputting Varchar(MAX), being stuck instead @ varchar(8000), so you can't play with the full specturm should you need to.

    That's a real bad...

  • RE: The CLR

    developmentalmadness (5/13/2008)


    Splitting a string may be trivial in T-SQL but that doesn't mean it's the best tool for the job. The CLR is vastly faster for splitting strings the longer...

  • RE: The CLR

    I've tested with it rather extensively, and I think it's got a way to go before it becomes really useful. Although the resource management has been getting better, it still...

  • RE: Putting all your data in one column of one table

    Jeff Moden (5/12/2008)


    Instead of bailing from the company, you have a huge opportunity... set up a multi-million row test and show them why it's a bad idea. Challenge those...

  • RE: Topic Subscription Option

    Keep in mid the "default" seems to be cookie-based (so moving from one machine to another will "reset" your options).

  • RE: Get First row value

    karthikeyan (5/12/2008)


    Jeff,

    Thanks for highlighting some good points.

    Table doesn't have a single clustered index. But it have non clustered index on mid.

    Will it help to resolve this running total issue ?

    Janine,

    Thanks...

  • RE: A Simple Mistake

    Wyatt Eurich (5/12/2008)


    Having coded before Bill Gates and in 40+ languages like a previous poster, I prefer case-sensitivity.

    I find that problems such as typo’s that occur in case-insensitive languages, harder...

  • RE: Query to match some fields out of many - HELP !

    MR - why don't you post what you came up with, and let's see if we can't make it behave somehow....

  • RE: Query to match some fields out of many - HELP !

    ahh..criteria math. Try this

    WHERE

    case when criterion1 then 1 else 0 end +

    case when criterion2 then 1 else 0 end +

    ...

  • RE: Return a cursor

    I don't believe you can return a cursor, and quite honestly - it's a good thing. What is it you're trying to do?

    Perhaps a table variable, perhaps a temp...

Viewing 15 posts - 3,346 through 3,360 (of 6,486 total)