Forum Replies Created

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

  • RE: code sample

    Ok, so I guess you need something like this:

    INSERT INTO Table2 (Number, Name, Address)

    SELECT ROW_NUMBER() OVER(ORDER BY Name, Address) + (SELECT MAX(Number) FROM Table2) AS counter,

    Name,...

  • 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...

  • 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!

  • RE: code sample

    INSERT INTO Table2 (Number, Name, Address)

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

    Name, Address

    FROM Table1

  • 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...

  • 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...

  • 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...

  • RE: IF THEN

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

    Use her code and you'll never go wrong 🙂

  • 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 ...

  • RE: isolation level

    What do you mean "prone to deadlock"?

    Did you mean SERIALIZABLE isolation level?

  • 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...

  • RE: IF THEN

    IF condition

    BEGIN

    code if true

    END

    ELSE

    BEGIN

    code if false

    END

  • 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...

  • 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...

  • 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...

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