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 TouchToneTommy 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: pwills
  • Content: Threads
  • Order by date
  1. pwills

    Can SQL link to MS Exchange or Outlook?

    EITHER Can Outlook folders actually be SQL Svr tables? OR Can SQL Svr link to (like Access can) Outlook folders? [I've searched the tek-tips archives to no avail]
  2. pwills

    SQL Mail doesn't see profile

    I've tried setting the startup account to bothe System and the account I am logged on to the computer as. In bothe cases the drop-down box for the Mail profile is empty. I have tested Outlook on the computer and it works OK. Does anyone know what I am doing wrong?
  3. pwills

    New User vs. New Login

    We have a web-based client database system. Our office admin wants to do a mail-merge via the ODBC connection straight into the database. I want to create an account for the ODBC connection on her machine which I can lock down. I am somewhat confused between logins and users. Question: 1...
  4. pwills

    Cannot export VIEW because table owner changed

    I have several views on source database A which refer to pwills.TABLE1. On my destination database B I intend to change the table to dbo.TABLE1. When I run DTS Export on the VIEW, it throws an error because "pwills" doesn't exist in database B. In practice, I have a large number...
  5. pwills

    Father / Mother query

    My head will explode if I don't crack this soon. I have table like: Child Father Mother Bill Bob Jane Joe Mike Mary I need the view: Child Name Relation Bill Bob Father Bill Jane Mother Joe Mike Father Joe Mary Mother Can anyone help?
  6. pwills

    How do you bucket data?

    E.g. CustID Orders 1 10 2 5 3 5 View to show Bucket Count 0-9 2 10-19 1 20-29 0
  7. pwills

    Crystal Reports - are there alternatives?

    I need to produce many many HTML reports on my data and they have to be nicely formatted and offer drill-down and sort-ordering etc. Do you know if there are any software programs out there that can do this other than Crystal? I can't seem to get a good search on the web for this.
  8. pwills

    Child/Parent table - "family" view

    [NB. This is a derivative of a question posed on MS Sql Svr forum.] I have a classic self-referring table USER(USER_ID,PARENT) I want to list all users in Bob's "family" i.e. Bob, children, parent, siblings. Is the following query OK? Is it possible to avoid repeating the...
  9. pwills

    Using COUNT to check if data exists horribly expensive

    I have a table of employees, some of which are supervisors. (ID,NAME,SUP_ID) When I list them out, I want to mark which ID's are supervisors. E.g. ID,NAME,SUP_ID,Y/N It will display Y if any row has a SUP_ID set to ID. It seems horribly expensive (n^n) to do a count each time. Surely there...
  10. pwills

    Using ISNULL in self-join

    I have a classic self-joinable table: (id, profile, parent_id) where parent_id points to id. To produce a table of inherited values I have: select t1.id, case when t2.profile is null t1.profile else t2.profile end from mytable t1 LEFT JOIN mytable t2 on t2.parent_id = t1.id Problem is that my...
  11. pwills

    Family query in self-join

    My table is (id, name, parent_id) where parent_id is another row. I need a &quot;family&quot; query that will list all records that are either siblings or a parent or children of an id For example, table: 1, Bill, <null> 2, Bob, 1 3, Ben, <null> So the view family_of_Bill would list Bill and...
  12. pwills

    Web application user - standard permissions?

    I'd like to create a user &quot;application&quot; with which I connect to SQL Svr from all my web applications (rather than using dbo). Given that I have a standard database-driven website where users can insert,update, delete records is there a pre-defined role in Sql Svr 2k that I can assign...
  13. pwills

    Setting default db something other than master

    Crumbs, I've been all through BOL and cannot find how to do this probably-very-obvious thing. I keep messing up because Qry Anlysr keeps setting the db to master every time I open a blank Query window. Also DTS Export offers &quot;<default>&quot; as an option but I don;t know how to make that...
  14. pwills

    Can one step through a script

    I am creating a script of my entire database so I can create a dev version. I'm a little nervous just whacking the whole script onto my dev server. Can I step through it somehow?
  15. pwills

    Self-join

    Scenario: 1. I have a table of customers (id, company, parent) 2. One of the columns is &quot;parent&quot; which can be another id. 3. I would like a VIEW of customers that shows the parent company if the parent field contains data, otherwise it shows the child company (i.e. parent overrides...
  16. pwills

    Owner name has stopped views from working

    Scenario: 1. I am transferring a db to a new server (using DTS Export). 2. On source_db, the tables are all in the form paddy.Customer. After I do the export they exist on destn_db as dbo.Customer. 3. When I try to export the views I get an error because the views refer to paddy.Customer which...
  17. pwills

    How export view without data in DTS Export Wizard

    It strikes me as odd that when you do a standard export SQL Server wants to copy the DATA within the views. All I want are the data in the TABLES and the view definitions. Anyone know why you would ever want to actually export the data created by the views?
  18. pwills

    Value of empty string '' in INT column

    INVOICE is type INT. I was alarmed to discover that: SELECT TICKET_ID FROM TICKET WHERE INVOICE = '' returns all the rows where INVOICE is 0 and NOT where it is blank. How ON EARTH do I retrieve all rows with blank INVOICE?
  19. pwills

    DATEDIFF in WHERE clause

    Newbie question; what is wrong with SELECT COMPANY FROM COMPANIES WHERE DATEDIFF ('m',INVOICED_ON,GETDATE()) = 1 I want to list all COMPANIES invoiced any time last month
  20. pwills

    Selecting this month only

    Is there a more efficient query than the following? SELECT * FROM WIDGETS WHERE (DATEPART(m, MADE_ON) = DATEPART(m, GETDATE())) AND (DATEPART(yy, MADE_ON) = DATEPART(yy, GETDATE()))

Part and Inventory Search

Back
Top