Forum Replies Created

Viewing 15 posts - 47,431 through 47,445 (of 49,571 total)

  • RE: help with the query speed

    Federico Zajur (2/8/2008)


    Hi all, I have an idea... Why don´t you use views. For example 3 views with 2 outer join each.. I think it will be more faster.. What...

  • RE: Get Month Name

    Not directly, though you could convert the month number inot a date.

    SELECT DATENAME(month,'1900/' + CAST(monthNumber AS VARCHAR(2)) + '/01')

  • RE: Get Month Name

    SQL has a DateName function, however it takes a datetime as a parameter, not a number

    SELECT DATENAME(month, GETDATE()) AS 'Month Name'

    returns

    Month Name ...

  • RE: DB Reindex Question

    in SQL 2000, I believe that rebuilding the clustred index rebuilds the nonclustered indxes. In SQL 2005, that's no longer the case.

    You can just use DBCC DBReindex to rebuild all...

  • RE: IDENTITY column on PRIAMRY KEY list

    I'll second Loner.

    Clustered PK on the identity (Custered indexes should be narrow and unique)

    Add a unique nonclustered index on app_idz, msn, dash_id, received_from_dashboard

  • RE: MERGE

    GSquared (2/7/2008)


    Actually, as far as total points go, you get as many for posting a complaint about the question as you would get for getting most questions right in the...

  • RE: Must declare the scalar variable "@Rank

    1) No, however if you're concatenating pieces of string together, you'll need a space somewhere.

    2) No. SQL doesn't care about whitespace. Lay things out that they are readable by you...

  • RE: Must declare the scalar variable "@Rank

    It's declared outside of the dynamic SQL string. If you want the variable accessible inside the dynamic SQL, you either have to declare it within the dynamic SQL string, or...

  • RE: Must declare the scalar variable "@Rank

    Variable declared outside dynamic SQL aren't accessible within it, and vis versa

    Your first line of dynamic SQL reads 'SELECT top 1 @Rank = K.RANK...'

    Within the dynamic SQL, the variable @Rank...

  • RE: MERGE

    Michael Kipp (2/7/2008)


    I think the question was asked in a wrong way (or I read it in a wrong way).

    I answered "WHEN NOT MATCHED", as most others.

    That is the part...

  • RE: ALTER TABLE IN CASCADE

    No there aren't. You will have to disable the foreign and primary key constraints to modify the column.

  • RE: ALTER TABLE IN CASCADE

    If the column you're altering is the one that the constraints are on, then you'll have to drop the constraints, make the changes, then recreate the constraints.

  • RE: SQL 2008 sneak peek exam info

    Thanks for the info. I forgot all about the meeting.

    Does anyone know how to get in on the beta exams?

  • RE: Determine who granted priveleges to who

    SELECT Permission_name, class_desc, OBJECT_NAME(major_id), grantee.name AS 'Permission granted to', grantor.name AS 'Permission granted by'

    FROM sys.database_permissions dp

    INNER JOIN sys.database_principals grantee ON dp.grantee_principal_id = grantee.principal_id

    INNER JOIN sys.database_principals grantor ON dp.grantor_principal_id...

  • RE: MCA: Database

    I'd love to try it, but the cost is prohibitive, and the travel and hotels, aong with the required 4 weeks off work make it just about impossible.

    Exchange rates don't...

Viewing 15 posts - 47,431 through 47,445 (of 49,571 total)