Forum Replies Created

Viewing 15 posts - 5,296 through 5,310 (of 5,393 total)

  • RE: code sample

    I'm sorry, I didn't see you needed to start from 3.

    INSERT INTO Table2 (Number, Name, Address)

    SELECT ROW_NUMBER() OVER(ORDER BY Name, Address) + 2 AS counter,

    Name, Address

    FROM...

    -- Gianluca Sartori

  • RE: IF THEN

    No, it's easier than you think: take a look at this article: http://www.sqlservercentral.com/articles/Best+Practices/61537/ you'll find all the information you need.

    Don't give up!

    -- Gianluca Sartori

  • RE: code sample

    INSERT INTO Table2 (Number, Name, Address)

    SELECT ROW_NUMBER() OVER(ORDER BY Name, Address) AS counter,

    Name, Address

    FROM Table1

    -- Gianluca Sartori

  • RE: SQL Server 2005 not using available memory

    SQL2005 uses memory dynamically, so it looks like it doesn't need more memory than that.

    Personally I prefer never enabling the boost priority option, because it could starve the os.

    Performance is...

    -- Gianluca Sartori

  • RE: Syntax error converting datetime from character string

    Mmhh... a bit complicated!

    When you are facing complex problems, try to cut into pieces.

    First of all, does the SELECT statement run fine? Try to run it without the INSERT part.

    If...

    -- Gianluca Sartori

  • RE: clustered index and non clustered index

    The main thing to know about clustered indexes is the sort order: data is phisically sorted according to the clustered index order.

    A table can have only one clustered index.

    Every...

    -- Gianluca Sartori

  • RE: IF THEN

    I was posting the query when I saw Gail's reply.

    Use her code and you'll never go wrong 🙂

    -- Gianluca Sartori

  • RE: NULL and NOT NULL in Default Constraint

    Try this:

    create table #test (

    testField int NOT NULL DEFAULT 0,

    testField2 int NULL DEFAULT 0

    )

    INSERT INTO #test DEFAULT VALUES

    INSERT INTO #test VALUES (1,NULL)

    You'll get the values:

    testField testField2

    0 ...

    -- Gianluca Sartori

  • RE: isolation level

    What do you mean "prone to deadlock"?

    Did you mean SERIALIZABLE isolation level?

    -- Gianluca Sartori

  • RE: First SQL Database

    I would create a low permission user (low means as few as possibile), with windows authentication.

    If you use a DSN entry, I'm not sure you can use NT authentication, so...

    -- Gianluca Sartori

  • RE: IF THEN

    IF condition

    BEGIN

    code if true

    END

    ELSE

    BEGIN

    code if false

    END

    -- Gianluca Sartori

  • RE: JDBC for 2008

    I don't use BLOBs in my databases, so I can't say anything about it. I took a look at the FAQ page on JTDS site and it looks like there's...

    -- Gianluca Sartori

  • RE: JDBC for 2008

    I tried several times to get Microsoft's JDBC driver to work, with no chance. It's buggy and slow, I would never recommend it. Try jtds instead (http://jtds.sourceforge.net).

    Unfortunaltely there's no...

    -- Gianluca Sartori

  • RE: Force Query timeout

    ... OOOPS! ... I didn't notice you were talking about SSAS!

    Well, it doesn't matter anyway: it's always left to the client to set a timeout for the queries. If you...

    -- Gianluca Sartori

  • RE: Force Query timeout

    This is something you have to set on the client side. If you are working with ADO, try setting the CommandTimeout property.

    Regards

    Gianluca

    -- Gianluca Sartori

Viewing 15 posts - 5,296 through 5,310 (of 5,393 total)