Forum Replies Created

Viewing 15 posts - 256 through 270 (of 992 total)

  • RE: To find freespace of Database using a query

    I did have some code for this but cannot put my finger on it at the moment.

    As others have suggested, you should steal code from the system stored procs -...

  • RE: Query tuning

    Did I read correctly when you said isql was taking 1GB of RAM?? That's the client tool you use to run the query, not SQL Server itself.... How...

  • RE: How to recover data when a table is dropped in a database

    And whilst it won't help you this time, if you run in full recovery mode you could at least recover up to the minute in such situations. Production DBs...

  • RE: SQL 2005 limitations ?

    Frankly, if you are going to have a couple of users on a workgroup-based network then you'll survive with SQL Express.

    There are only editions of SQL Server than...

  • RE: Incorrect syntax near '('. when using Select top (@param)

    Firstly, avoid dynamic SQL unless absolutely necessary. Someone gave you an answer that didn't need dyn sql - I suggest you use it.

    But...

    Your problem is that you have a...

  • RE: Restore a 2005 db to a 2000 server

    It's not possible - even changing the compatibility level on the 2005 box's database will make no difference. The file formats are different.

    However, you could transfer the database table...

  • RE: Update Query to Insert Incremental Numbers

    How about something like

    update customers

    set passNumber = blankCustomers.rowNum + 100000 --big first starting number

    from customers

    inner join (

    ...

  • RE: how to restore .bak file

    The easy way is to use your GUI tools - SQL Server Management Studio (Express).

    Right click on the "Databases" tree node, drill down the popup menu to "Restore..." (the...

  • RE: Variable Not Setting

    DECLARE @Tmp nvarchar(50)

    DECLARE @tmp2 nvarchar(50)

    SET @Tmp = 'testdata'

    SELECT @tmp2 = Code FROM LookupTable WHERE Code = @Tmp

    SELECT @tmp2

    works as designed, value if there, null...

  • RE: Updating MS Access database through S2K trigger

    I would recommend that you queue your updates in the trigger and then have some timed event read the queued updates and apply them to the Access DB. You...

  • RE: Renaming table with current year

    What have you tried so far?

    You need only execute the sp_rename stored proc as in (direct from SQL 2k BOL)

    [font="Courier New"]EXEC sp_rename 'customers', 'custs'[/font]

    which will rename the customers table...

  • RE: Compare the data from two tables!

    So you want to get amounts from each table given a name and a day to match them?

    You just need to adjust your join criteria slightly..

    [font="Courier New"]SELECT tableA.Name, tableA.Amount as...

  • RE: Date and Time in SQL Server 2008

    I agree, datetime2 is very oracle-ish and BigDateTime is disgustingly obvious 🙂

    They cannot play with datetime as it (historically) has been stored as a float, much the same...

  • RE: how to remove numbers from strings?

    I have been away from the forums for a while, but took the time to read this entire thread! 🙂 I think I'm still sane at the end...

  • RE: Grouping not Grouping

    Floats are not an exact field... Eg, 1.1 cannot be represented in IEEE floating point arithmetic on computers. You should change your invoice field (if it really needs...

Viewing 15 posts - 256 through 270 (of 992 total)