Forum Replies Created

Viewing 15 posts - 136 through 150 (of 163 total)

  • RE: identity

    quote:


    Also, there is a problem in SQL Server with identity column when recovering from crashes. This has existed in SQL Server...

  • RE: need help with query...

    You can try this if you want a cross tab like result

    Select

    Sum(Case Region When 1 Then (xvalues) Else 0 End) As Region1,

    Sum(Case Region When 2 Then (xvalues) Else 0...

  • RE: need help with query...

    Is this what you want?

    Select region, sum(salesAmt) from MySalesTables

    Group By region

    Compute SUM(SUM(SalesAmt))

    One word of warning.

    If you are using the result for client side usage. you may get an error....

  • RE: Need to find extra rows from two identical tables

    I think this topic is answered already in another thread.

    However please use this script and run

    http://www.sqlservercentral.com/scripts/contributions/458.asp

    After storing the script from query analyser run

    sp_Compare2Tables Table1, Table2

    If you are using...

  • RE: A Normalization Primer

    Good article.

    Some more things could be elaborated more.

    Surrogate key is another issue.

    Why we need another key, etc. may be another very usefull

    Preethi

    G.R. Preethiviraj Kulasingham

  • RE: Feedback Appreciated Re my Standards Doc

    quote:


    TABLE OWNER, ‘DBO’

    3. Table owner will be ‘dbo’ by default. Applications and queries must specify ‘dbo’ as the owner of...

  • RE: Identifying duplicate rows.. query taking too long

    quote:


    Select credcardno, ccname, Count(*) from findets Group by credcardno, ccname

    Please check whether you have proper indexes. I suggest you to on credcardno

  • RE: How to drop IDENTITY

    quote:


    Update syscolumns Set Colstat=0 Where id = object_id(<your table Name>) and name =<Identity Column Name>


  • RE: Identifying duplicate rows.. query taking too long

    Why don't you try to get the distinct entries first

    Select credcardno, ccname, Count(*) from findets Group by credcardno, ccname

    Please check whether you have proper indexes. I suggest you to on...

  • RE: How to drop IDENTITY

    Try this:

    Update syscolumns Set Colstat=0 Where id = object_id(<your table Name>) and name =(,Identity Column Name>)

    Warning: Microsoft does not recommend directly modifying the system tables

  • RE: Database Compare

    there are a few scripts available at SQLServerCentral.com

    try one (It is mine so that I may help you)

    http://www.sqlservercentral.com/scripts/contributions/221.asp

    There are a few other scripts as well. Please try some...

  • RE: Identity Column

    1. identity columns can't have null values

    2. To change an identity column into another one add another column with same data type, update the new columns value and remove the...

  • RE: How to make a SP stop automaticaly after s.time?

    In most of the cases I handle this type of situation from the client.

    If you use ADO connection to connect to the database It has a Commandtimeout property

    You can set...

  • RE: SELECT INTO and IDENTITY columns

    --Try this Procedure

    Create Procedure CreateTable (@Table sysname, @Target sysname, @Condition varchar(1000))

    As

    Declare @SQL varchar(8000)

    Select @SQL =''

    Select @SQL = @SQL +', '+

    Case

    when AutoVal is NOT NULL then 'cONVERT(int, ' +...

  • RE: Create multiple temp tables

    I use a different method.

    I use one temporary table with an additional field (Session_ID)

    This Session ID isgenerated by the application.

Viewing 15 posts - 136 through 150 (of 163 total)