Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. anorthcote

    Decimal places lost in division

    Thanks, that works now... I, obviously, was getting a mixture of integer maths and rounding issues together. Cheers
  2. anorthcote

    Decimal places lost in division

    I thought this one was done and dusted but it still isn't working quite correctly. Using the example given above I have set @calls to 32 and @numperpage to 30. This being the case if I have 32 calls with 30 per page I should have 2 pages. I don't, I get 1! declare @pages decimal (10,4)...
  3. anorthcote

    Outlook 2003 Rules on Exchange server

    We are in the process of migrating to Exchange. My mail box has been moved but most other people in the company havn't, as yet. I have rules running in outlook to move e-mails into sub-folders depending on who sends it or who it was sent to etc. All my rules work as planned but any e-mail sent...
  4. anorthcote

    force error in stored procedure

    I have two jobs running on my server that import data to my database. The first step of the first job writes a value to a table when it starts and removes that value when it ends correctly. I need the second job to test if a value exists in the table and error if there is a value there. So...
  5. anorthcote

    Full transaction log

    You've hit the nail on the head, so to speak... I wasn't backing up the transaction log as part of the maintenance plan. I've changed that and will see how it goes. Is it worth increasing the growth % as well? Thanks a lot.
  6. anorthcote

    Full transaction log

    Thanks for that... 1- my properties were already set to automatically grow the log file by 10% 2- Surely my maintenance plan would truncate the log? Is there anyway I can truncate the log without taking a backup? 3- I have tried shrinking the database file but it didn't get much smaller so I...
  7. anorthcote

    Full transaction log

    Hi, My database runs a weekly import job followed by several stored procedures to re-format and calculate on the imported data. This job has been running weekly for a couple of years now without any problems. The data I import each week has grown a lot over the last few weeks and I am now...
  8. anorthcote

    sort order query

    What documentation is there on database default collation. We are just about to install SQL 2005 and go through the process of upgrading and migrating a big chunk of our databases on to the new server. This issue does scare me slightly and I don't want anything to break. I read somewhere that...
  9. anorthcote

    sort order query

    Hi, That code works very well, thank you. My collation is set to Collation=SQL_Latin1_General_CP1_CI_AS on all databases but the one I'm working on which is Collation=Latin1_General_CI_AS Interestingly the SQLSortOrder is set to 52 on all but mine, which is 0 The difference in the...
  10. anorthcote

    sort order query

    George, I've had a look at the code and see your principal, my final code is declare @tbl1 table(ID int, CatID int, SubCatID int, Description varchar(35)) insert into @tbl1(id, catid,subcatid, description) select 7, 7 , 0, 'Sprinklers' union all select 8, 8 ...
  11. anorthcote

    sort order query

    Looks good but I have one issue with it - the sub categories are still not in alphabetical order. Using the above example where SubCatID 1 is Fans and SubCatID 2 is Pumps all looks good but if they were the other way around (which they may well be) then they are out of order ie ID CatID...
  12. anorthcote

    sort order query

    I'm using SQL 2000 row_number() isn't recognised, do you have an alternative?
  13. anorthcote

    sort order query

    Thank you but that didn't do what I needed, I have worked out a solution involving creating a new column 'FullDescription' which is either 'category description' if SubCatID = 0 or 'Category description:Sub Category description' if SubCatID >0. create table #temp ([ID] int, CatID int...
  14. anorthcote

    sort order query

    Hi, I have the following data in a table ID CatID SubCatID Description 7 7 0 Sprinklers 8 8 0 Intruder Alarm 9 9 0 Air Conditioning 22 9 1 Fans 23 9 2 Pumps I'm writing a stored procedure to...
  15. anorthcote

    Depoly changes to structure

    Hi, I am dealing with the SQL side of a Visual Studio project that is being developed further. I have copied the existing live database to a development server to build the new structure. What I need is to be able to script the changes to the structure to deploy them to the live server when...
  16. anorthcote

    SQL Server Management Studio

    Hi, I haven't, as yet, used SQL 2005 and want to know if SQL Server Management Studio is the same as Query analyser? We are having an system written for us and the company are suggesting that end users use SQL Server Management Studio to maintain the data in the tables rather than having a...
  17. anorthcote

    Slow Stored Procedure using ROWCOUNT

    I see you logic but the rowcount clause was actually incresing the processing time, that is why I was confused. I have now learnt the importance of indexing :)
  18. anorthcote

    Slow Stored Procedure using ROWCOUNT

    Worked it out!!! I added a new index to ContractorOrder and it's processing time went down from 6 minutes 16 seconds to under 1 second!!
  19. anorthcote

    Slow Stored Procedure using ROWCOUNT

    I have the following stored procedure CREATE PROCEDURE Test @LocationID int, @StatusID int, @Area int, @Contractor int, @EnteredBy Varchar(20) AS BEGIN SET ROWCOUNT 30 SELECT dbo.Calls.LogID FROM dbo.Contractor INNER JOIN dbo.ContractorOrder ON...
  20. anorthcote

    Decimal places lost in division

    That works... Thank you very much

Part and Inventory Search

Back
Top