Forum Replies Created

Viewing 15 posts - 6,886 through 6,900 (of 7,185 total)

  • RE: finding absolut values from cumulative values in sql server

    Harsh

    Try the script below (not tested).  Somebody else may be able to come up with something that doesn't involve a temp table...

    John

    CREATE TABLE #Table (TableID INT IDENTITY(1,1) PRIMARY KEY CLUSTERED, Event VARCHAR(50), MyTimestamp datetime)

    INSERT INTO 

    August 9, 2006 at 2:16 am

    #653992

  • RE: Replication and restore

    Joseph

    More information needed, please.  What type of replication are you using, and in what topology?  What database are you trying to restore (publication, disribution, subscription)?  Are you restoring from a...

  • RE: /3GB Switch Question

    Glenn

    Not the version, the edition.  You can get this by right-clicking on the server name in Enterprise Manager and choosing Properties.  There are also functions in T-SQL you can use. ...

  • RE: Moving a table to a different Filegroup

    John

    For tables with a clustered index, drop the clustered index and recreate it on the new filegroup.  For tables without a clustered index, create one on the new filegroup.  Then...

  • RE: Need to write query with two conditions

    Have a look at SET DATEFIRST in Books Online.  Then you can use CASE and the DATEPART function to subtract the correct number of days from the date.

    John

  • RE: /3GB Switch Question

    Glenn

    Also, you don't say whether you're using SQL Server 2000 Standard or Enterprise Edition.  If it's Standard, you're stuck with 2GB whatever you do.

    John

  • RE: Hot to find max and min values

    To add a column to your table:

    ALTER TABLE MyTable ADD Cash_WTD_Min INT  

    To populate the column:

    UPDATE MyTable SET Cash_WTD_Min = (SELECT MIN(Cash_WTD) FROM MyTable)  

    You would need a trigger to keep all of this current.  However, I wouldn't recommend that...

  • RE: drop ALL objects for a user

    Fredrik

    Something like the script below will generate some SQL that you can inspect and then run against your database.

    John

    SET nocount ON

    SELECT 'DROP TABLE ' + TABLE_SCHEMA + '.[' + TABLE_NAME + ']'

    FROM information_schema.tables

    WHERE TABLE_SCHEMA = 

  • RE: DTS date issues

    Martin

    That's strange.  I think you're right - the next thing you need to look at is the regional settings of the computer on which you're running the import.  I think...

  • RE: DTS date issues

    Martin

    Did you try changing the default language of the login?  Having reread your original post more carefully, I think that this is the only thing it could be.  The data...

  • RE: incremental replication

    You don't give many details.  Have a read about merge replication and transactional replication with updating subscriptions and see if either of those meets your needs.

    John

  • RE: DTS date issues

    The dates you are importing are in the UK format.  So, in order for SQL Server to interpret them as UK-format dates, I would have thought that the user who...

  • RE: sql 2000 a/p cluster on SAN slow performance CPU 65-100.

    Rudy

    PAE/AWE won't have any effect if you have 4GB of RAM or less.  Only the /3GB switch is required here.

    I will also add that if Alex does decide to use...

  • RE: Access Remote sql server

    Manutosh

    I'm not really sure what you're asking.  Is there a firewall between the client and the server?  If so, you will need to ask for the port that SQL Server...

  • RE: TRUNCATE and FOREIGN KEYS

    Inspired by Lowell's suggestion to use sp_fkeys, I have finally come up with a script that I hope will work in all situations.  Here it is:

    SET nocount ON...

Viewing 15 posts - 6,886 through 6,900 (of 7,185 total)