Forum Replies Created

Viewing 15 posts - 946 through 960 (of 1,166 total)

  • RE: Excel Worksheet with XP_sendmail...!

    You can change your query to send the output to .xls...

    Post the query...

    MohammedU
    Microsoft SQL Server MVP

  • RE: query from hell

    When you use the table alias use single name instead of three name...

     

    LEFT JOIN dbo.RE7.CONSTIT_ADDRESS_PHONES AS CONSTIT_ADDRESS_PHONES1 ON dbo.RE7.CONSTIT_ADDRESS.ADDRESS_ID = CONSTIT_ADDRESS_PHONES1.CONSTITADDRESSID

    MohammedU
    Microsoft SQL Server MVP

  • RE: How can i detemine owner of SQL statement which is running ???

    If you know the spid you use to query sysprocess table...

    select loginame from sysprocesses where spid = ...

     

    MohammedU
    Microsoft SQL Server MVP

  • RE: running getdate

    You can add no of days as calculated column..

    See the following ex:

    drop table #test

    Create table #test (publicationdate datetime default getdate(), NoOfDays as datediff(dd, publicationdate, getdate() ))

    insert into...

    MohammedU
    Microsoft SQL Server MVP

  • RE: datetime running counter

    You can add no of days as calculated column..

    See the following ex:

    drop table #test

    Create table #test (publicationdate datetime default getdate(), NoOfDays as datediff(dd, publicationdate, getdate() ))

    insert into...

    MohammedU
    Microsoft SQL Server MVP

  • RE: How to count the number of bytes in in each row?

    SELECT table_name,  sum(COL_LENGTH(table_name, column_name)) AS ColumnLength

    FROM INFORMATION_SCHEMA.columns

    group by table_name

     

    MohammedU
    Microsoft SQL Server MVP

  • RE: Error: 3242

    If these files are backup files then you can use RESTOER HEADERONLY command to check them...

     

    MohammedU
    Microsoft SQL Server MVP

  • RE: Looking for any problems in SQL error log

    You can either one...

    sp_readerrorlog or xp_readerrorlog

    MohammedU
    Microsoft SQL Server MVP

  • RE: Rebuild Index over large table

    Log growth is very high while Indexdefrag process running compared to reindex...

    You can try changing the recovery model to bulk_logged before index defrag and can change back to Full once...

    MohammedU
    Microsoft SQL Server MVP

  • RE: SP_SPACEUSED

    Still you can use sp_helptext...

    select object_definition(object_id('sp_spaceused'))

    exec sp_helptext sp_spaceused

     

    MohammedU
    Microsoft SQL Server MVP

  • RE: SQL Server 2005 Locked Logins

    This is one of the new security feature offered in sql 2005...

    Until sql 2000, even sql passwords are not case sensitive...

    SQL Server 2005 Security Features at a Glance

    http://www.microsoft.com/sql/technologies/security/security-at-a-glance.mspx

    Administrators...

    MohammedU
    Microsoft SQL Server MVP

  • RE: Mirror question (with MS CRM 3)

    looking at external load balancing hardware. So if server A is busy the request would be sent to server B - but this would need some sort of two-way mirror...

    MohammedU
    Microsoft SQL Server MVP

  • RE: Ambiguous column in WHERE join on sysobjects

    If both tables used in the query/join has the same column name what you are selecting, sql gives that error...

    so it is always advisable to use table alias/name before...

    MohammedU
    Microsoft SQL Server MVP

  • RE: Should I use NOLOCKS?

    If I am not mistaken.. to use READ_COMMITTED_SNAPSHOT you have to enable it first which is server configuration not the db configuration and it has its own pros and cons...

    If...

    MohammedU
    Microsoft SQL Server MVP

  • RE: question on how to create 1 new sp to call 2 other sp''''s?

    I will go with single procedure...

    create proc abc

    as

    select * into #temp2005  from Sep2005table

    select * into #temp2006  from Sep2006table

    Calculate the difference from #temp2005  and #temp2006... these table will have subset of data...

    MohammedU
    Microsoft SQL Server MVP

Viewing 15 posts - 946 through 960 (of 1,166 total)