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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by dhulbert

  1. dhulbert

    how to calculate number of weeks between current date and a receipt date

    Both of the above answers will give you the number of weekends the item has been in stock not the number of weeks. Datediff does not calculate the number of periods between 2 dates it gives you the number of period ends. Example if you use DATEDIFF(YEAR, '2013-12-31', '2014-01-01') it returns...
  2. dhulbert

    How to use a Parameter to switch between two tables?

    2 Simple ways to do this either 1) Have 2 scripts 1 for each table then use the parameter to decide which script to run. 2) Use dynamic SQL to create and execute the SQL statement with the appropriate table name included. Option 1 is the easiest to set up but ongoing there could be issues...
  3. dhulbert

    List Groups Along with Tables and Permissions

    Should have said that this works for SQL server 2008R2. Not sure about older versions. I love deadlines. I like the whooshing sound they make as they fly by Douglas Adams (1952-2001)
  4. dhulbert

    List Groups Along with Tables and Permissions

    Have a look at SYS.database_permission this lists all of the permissions assigned within the current database, there is also SYS.syspermissions which lists all of the permissions for the server. Major_id links back to the id in sys.sysobjects, Grantee and Grantor principle_id's link back to the...
  5. dhulbert

    SSRS Parameters, 1 Select multiple values

    I'm trying ot get SSRS to populate a number of parameters from a single drop down select box I currently have a single drop down list generated from a query that allows a user to select a specific report and it popultes the parameter @Report_ID. I want this select to populate a number of...
  6. dhulbert

    Multi Page Graph

    We have a standard bar chart whcih sits on a single A$ Landscape sheet of paper when it is printed. Problem is the end user can select a large number of items which run along the x-axis, this obviously causes problems whrh you come to display/print it. Is there a way to say when the user...
  7. dhulbert

    New Table

    Tables don't just appear in the table list in Management Studio, you need to right click and select refresh. I love deadlines. I like the whooshing sound they make as they fly by Douglas Adams (1952-2001)
  8. dhulbert

    Getting Server Does not Exist Error on SQL 2k DTS package running on SQL 2005

    The error you get isn't coming from this piece of script, once you've moved the files to the destination folder what's the next step? I would guess thats where somethign actually refers to the SQL server. The messhge you get is beacuse of the ODBC you use to connect to the server, this exists...
  9. dhulbert

    Automatically save and attached file when email is received in Outlook 2007

    If you write a script to save the attachment you can trigger the script from an outlook rule that way you can specify where the e-mail comes from etc before the script is run. I love deadlines. I like the whooshing sound they make as they fly by Douglas Adams (1952-2001)
  10. dhulbert

    Index or Partition

    We're running 2008R2 I love deadlines. I like the whooshing sound they make as they fly by Douglas Adams (1952-2001)
  11. dhulbert

    Need help replacing all instances of incorrect text

    Apologies George. Quick skim first thing in the morning before coffee. I love deadlines. I like the whooshing sound they make as they fly by Douglas Adams (1952-2001)
  12. dhulbert

    Where are package success/failure values stored?

    Depends on how thay are run. If they are run through SQL server agent than the results of the jobs are stored in th esysjonhistory table in MSDB, have a look there to start with. use msdb select * from sysjobhistory I love deadlines. I like the whooshing sound they make as they fly by...
  13. dhulbert

    Index or Partition

    I have a few tables of over 50 Million rows which obviously take a while to query. From a performance point of view will a query run faster on a table that it partitioned of indexed. For instance Financial year is a regular report variable would I be better with an index on FinYear or a table...
  14. dhulbert

    Need help replacing all instances of incorrect text

    Mark. George's script above will give you any columns with the appropraiate text in the column name. Are you looking for that or do you need to find the text in individual records in a table? I love deadlines. I like the whooshing sound they make as they fly by Douglas Adams (1952-2001)
  15. dhulbert

    Delete duplicates

    SELECT MIN(ID) AS ID, myWords, chkbox1, chkbox2, chkbox3 INTO #TEMP001 FROM YOURTABLE GROUP BY myWords, chkbox1, chkbox2, chkbox3 TRUNCATE YOURTABLE INSERT INTO YOURTABLE SELECT * FROM #TEMP001 I love deadlines. I like the whooshing sound they make as they fly by Douglas Adams...

Part and Inventory Search

Back
Top