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 Chriss Miller 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: *

  • Users: bperry
  • Content: Threads
  • Order by date
  1. bperry

    Hi all, I need to calculate the di

    Hi all, I need to calculate the difference between two dates in a table, but I need the result accurate to a couple of decimal points (example 2.53). I'd like to do something like: Select DATEDIFF(yy, Date1, Date2) as MyDifference but of course DATEDIFF() returns an integer, thereby losing...
  2. bperry

    exactly what is MSXML 4.0??

    Please forgive this newbie question... I'm having trouble seeing just exactly what MSXML 4 (formerly the MS XML Parser) actually is. Is this a separate program that you might independently launch from the Programs menu, or is it actually just sort of plug-in for IE that allows it to interpret...
  3. bperry

    DTS Import: what input row fails?

    I am doing a DTS import, and it fails during the process because of bad data in a particular incoming field. But i would like it to show me which incoming row is wrong, so that I can troubleshoot/fix it/whatever. As it is, I'm left guessing as to what data values it thinks it does not like. I...
  4. bperry

    sorting records from EM - not!

    If I am in Enterprise Manager, and open a table (say, 'return all rows', for example), there are two Sort icons on the toolbar: A->Z and Z->A. Why are those icons always grayed out and unaccessible?
  5. bperry

    query: Automatic Subtotals

    Have you ever wanted to show subtotals directly in your query output, and have SQL automatically calculate them for you? It's pretty easy. I was looking at WITH ROLLUP tonight, and these were the results I got. First, let's see an ordinary query that summarizes on State and Store. Select...
  6. bperry

    problem with NOT IN

    Earlier in the week there was a discussion about NOT IN and NOT EXISTS. (I believe it was thread183-272715) That discussion reminded me of a problem with NOT IN that many people know about, but might be worth refreshing. What do you think this will do? If 'Coconut' NOT IN ('Apple', 'Banana')...
  7. bperry

    Call for Excel linked server FAQ

    Hi there, I feel there is a need for a definitive FAQ on how to read Excel spreadsheets from a Select statement. The two basic approaches are with OPENROWSET or with a linked server (which can be created either through script or EM). If you care to look through thread183-271507 and...
  8. bperry

    SHRINK DATABASE options

    Last week, a suggestion in one of the posts referred to the DBCC SHRINKDATABASE and SHRINKFILE commands. (I believe it was thread183-269676) That got me interested in finding out more about those commands. I learned that there are a couple of little-known options that can be used, and I have...
  9. bperry

    Help: linked server for Excel spreadsheet

    Does anyone know how, or can provide a clear step-by-step example, of how to set up a linked server so that an ordinary (non-sa) SQL user can read from that spreadsheet via a Select statement. We've already gotten the Select working with an OPENROWSET function, except it won't work with anyone...
  10. bperry

    Indexes on Foreign Key Columns

    Indexes on Foreign Key Columns (long but interesting) Most readers of this forum are well aware that SQL Server does not automatically create any indexes on Foreign Key columns that reference another table. (Although an index is automatically created on a Primary Key column.) In this small...
  11. bperry

    Why doesn't this CASE work?

    I am staring at an Update statement, with CASE conditions on two columns, and I cannot understand why it does not work properly. (This is actually an expansion of thread183-266358) We are updating TableA from TableB, as follows: TableB data looks like: id type dollars 1 type1 25 1...
  12. bperry

    testing.....please ignore

    ---------------------------------------- | xxx xxxx xxxx xxxx | ----------------------------------------
  13. bperry

    @@IDENTITY versus IDENT_CURRENT()

    I've been doing a bit of testing with @@identity values, found out some stuff I didn't know that you might find interesting. --------------- @@IDENTITY --------------- @@identity returns the most recently generated Identity value, from any table, from YOUR connection. Imagine that we have...
  14. bperry

    point-in-time recovery good? bad?

    <warning alert=&quot;This is a loooong question&quot;> I would be interested in comments from readers who are using, or have tried to use, point-in-time recovery. I have not used it in my environment, and am having trouble seeing how it could be made to work in a large, busy database. i.e...
  15. bperry

    Commenting out GO

    In thread183-255524 last week, <cfaulkner> correctly comments out GO in the stored procedure like this: --GO But you might be interested to discover that this does NOT work with GO: /* GO */ In this case, the GO will terminate the batch, and will also cause an error, because the parser will...
  16. bperry

    excel spreadsheet plugin: IIS/ASP

    Hi there, I feel sure I read about a 3rd-party product that I can use to do this: I design a html/asp form where user can indicate what fields or columns she wants selected. Browser submits form to IIS server. 3rd-party server plugin is invoked to create an Excel spreadsheet, based on the...
  17. bperry

    Can MDF/LDF live on another machine?

    Can the physical database files be on another machine (on the network) other than where SQL Server is installed?
  18. bperry

    Backup FAQs, links, books, etc

    I would like to do some reading on backup/restore (esp restore!) issues on SQL Server. All suggestions for interesting books, FAQs, web links, etc gratefully accepted. TIA brian perry
  19. bperry

    stored procedure - execution plan

    I am writing a stored procedure that will return a record set via ADO. I want to vary the ORDER BY clause based on a parameter that I will pass in. ie If @parm= 1 Select blahblahblah Order by Fld1 If @parm= 2 Select blahblahblah Order by Fld2 If @parm= 3 Select blahblahblah Order by Fld3 Other...

Part and Inventory Search

Back
Top