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 Andrzejek 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. drtree

    Count > X Parameter

    I don't have a ton of experience with this, but it looks like this Technet article might help http://msdn.microsoft.com/en-us/library/ee210533(v=sql.105).aspx
  2. drtree

    Using dropdown list for parameter

    How do you have your filter set up? If you could post a screenshot, that might be more helpful. Also, in my experience, sometimes I have to convert the parameter value to an Integer (using Cint) to get the filter to work. You could also try setting up parameters in the report's query source.
  3. drtree

    Data validation and error handling during insertion of data into a temp table bu using Stored Proced

    Hi, Couldn't you just set up your query so that the the headers are excluded in the where clause? As an example (I tried to set it up to exclude those instances where the Zip Code field is ZipCode too)... SELECT * FROM MyTable WHERE ZipCode NOT LIKE '%Zip%Code%' Alternatively, you...
  4. drtree

    Problem showing/splitting data on a single report page

    Hi Patrick, I think that you have a few options on how you do this (I've had to do similar things in the past). You could set up a list and have it group by the Sales Rep's Name, and then put two table objects into the list and filter them based on the list's current sales rep. The list would...
  5. drtree

    Learning Teradata

    Hi All, I searched the forum and didn't find this question being asked, so I hopefully it hasn't been yet! I'm relatively new to Teradata (most of my database related work has been done in SQL Server 2000/2005/2008) and was wondering what the best place to get started would be. I've done some...
  6. drtree

    Joining tables

    Hi, I think you'd want to set up one main query with two subqueries pulling the 'empty' movement and 'loaded' movement. So... SELECT m.Order, l.Loaded, e.Empty FROM orders m LEFT OUTER JOIN (SELECT Order, Distance As Loaded FROM Movements WHERE...
  7. drtree

    Sub-Totalling - Help.

    Hi Milt, While not very elegant, I think this should work... SELECT cust.[State], cust.CustID, cust.CustName, o.OrderID, o.OrderTotal, oc.CustomerTotal, s.StateTotal FROM Customer cust LEFT OUTER JOIN (SELECT o.CustID, o.OrderId, SUM(i.Quantity * i.Price) As OrderTotal FROM...
  8. drtree

    trying to get grandtotal in sql query

    This is totally random, but are you using fund-raising software (possibly made by JSI/Sage/Best)? The reason I ask is because I spent many years writing queries just like that for folks in a Development Office and it brought back some memories...
  9. drtree

    complex join between two datasets

    Hi, I think that you could use a Derived Column transformation (http://www.bimonkey.com/2009/08/the-derived-column-transformation/) in DataSet_2 set prior to doing the join with DataSet_1. You could also do the value extract in SQL prior to doing to the join (with Dataset_1) but I think that...
  10. drtree

    update table with multiple rows from another table

    Hi, Well, that certainly makes it more interesting. :) I guess you could modify the CASE in the prior example to be like this: CASE WHEN PATINDEX('%,%', OtherReason) = 0 THEN (CASE WHEN intakecom IS NULL OR intakecomm = '' THEN otherreason ELSE intakecom + ', ' + otherreason END)...
  11. drtree

    update table with multiple rows from another table

    Hi, You could use a cursor to loop through your source table and combine all of the rows (and then insert them into another table), but this might work too... update intake set intakecom = CASE WHEN intakecom IS NULL OR intakecomm = '' THEN otherreason ELSE intakecom + ', ' + otherreason...
  12. drtree

    move data from development to production database

    Hi, Yes, you should be able to do that, In SQL Server, relationships are defined as Foreign Keys - so you would want to drop the Foreign Key Constraints on the destination tables (the ones you are going to truncate) prior to the Truncate operation. I'm not sure what toolset you're using, but...
  13. drtree

    view or table join

    The performance should be the same. I would probably go with the view. I've had instances where I worked where someone would change the underlying table and go ahead and update the view with the new field references. If I had been using the actual table in my sql call, I would have gone back in...
  14. drtree

    Error when importing data in SQL2005 Express

    Hi, It looks like the service that is importing the data is using the Local System account (that is, I think, the NT Authority\System account). Did the service used to run under someone else's credentials, or has there been a change in the accounts/security configuration for the target...
  15. drtree

    varchar(MAX) settings

    Hi Nicola, I did some quick research myself and it looks like it may be that ASP (or CFML, I'm assuming) does not support the new data type - check this out - http://forums.iis.net/t/1051953.aspx Hope that helps, Dr Tree
  16. drtree

    Permission Denied w/ SQL Server 2005

    Hi, Are you running the SQL Server Agent accounts under different accounts in 2000/2005? It looks like one of them may have permissions to copy the file (via the code in line 29) and other account does not... HTH, Doc Tree
  17. drtree

    Moved DB, now Users can't login to my web app.

    Hi, If possible, I would drop the database you moved and remove all of the user accounts that were created when you moved it. I had run into a similar problem in the beginning of the year when we were moving to a new server (and SQL 2005). Just doing the backup/restore didn't work for me...
  18. drtree

    Deleting backup files

    Denny has a point in his question - things have changed in SQL 2005. To clean up old back up files, you'll need to set up a Maintenance Clean Up Task as part of your packages. Check out this link...http://technet.microsoft.com/en-us/library/ms345177(SQL.100).aspx Dr Tree
  19. drtree

    Varchar to date

    Yep - Boris has got it. You could put together a query like: SELECT * FROM i_bossdayends WHERE IsDate(import_date) = 0 to get all the records without a valid date. HTH, Doc Tree

Part and Inventory Search

Back
Top