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. lesleycampbell

    INSERT INTO OVERWRITING ROWS

    I'm on SQL 2008. I'm trying to insert rows into a table from a temp table. Instead of adding new rows it is overwriting the existing rows. Below is what I'm using. The COMMISSION_REV_DET_LC table does have an identity column as the primary key. I have no idea what I'm doing wrong. INSERT...
  2. lesleycampbell

    Creating a View - Need Alternate for Temp Table

    I have it currently as a Stored Procedure but currently, my users only have access to Views. I'm new at this so the CTE, more complicated SELECT statement, and variables are still tough for me. I'm trying.
  3. lesleycampbell

    Creating a View - Need Alternate for Temp Table

    I'm trying to create a view in SQL 2008. My code uses a temp table and I'm getting the error that I can not have a temp table in a View. I have included my code below. Does anyone have any suggestions on how to get around using a temp table? CREATE TABLE #DASHBOARDLC ([Order ID]...
  4. lesleycampbell

    User Permissions to Refresh Power Query from Stored Procedure

    I might make a mess out of this answer, so please bear with me. The users have 'access' to the database with a log in to our software system. They do not have direct access (log in) to the server where the database is located. Our server access is using Windows Credentials. Does this...
  5. lesleycampbell

    User Permissions to Refresh Power Query from Stored Procedure

    I have an Excel 2010 file containing a Power Query that executes a Stored Procedure. The users trying to refresh the query are not able to. I have updated the properties of the Stored Procedure to allow them to execute it, but they still can not. What else can I do?
  6. lesleycampbell

    User Permissions to Refresh Power Query from Stored Procedure

    I have an Excel 2010 file containing a Power Query that executes a Stored Procedure. The users trying to refresh the query are not able to. I have updated the properties of the Stored Procedure to allow them to execute it, but they still can not. What else can I do?
  7. lesleycampbell

    Complicated UPDATE Statement

    Thank you! This is what I have and it is trying to return more than one value. Any suggestions? UPDATE #APPTRACKERLC SET Remarks = (SELECT HIST.Comment FROM HISTORY WHERE HIST.Event IN ('AC','CTN','I1','I2','OA', 'OC','OD','OE','OO','RCT') AND HIST.History_ID = (SELECT TOP 1...
  8. lesleycampbell

    Complicated UPDATE Statement

    I'm using SQL Server 2008. I'm trying to update a temp table with values dependent on the max occurrence of another column. Please be patient with me in my explanation. Thank you! Temp Table - #APPTRACKER Columns - Reason, Remarks Table - History Columns - HistoryID, Date, Comment, Event...
  9. lesleycampbell

    Refresh Query in Excel by Unauthorized Users

    Thank you! How do I do I schedule the refresh where I don't have to do it manually?
  10. lesleycampbell

    Refresh Query in Excel by Unauthorized Users

    I am working in Excel 2010 with a SQL query. The spreadsheet will be shared with individuals that do not have permissions to SQL, but they will need to refresh the query. Is there anyway to work around this to allow them to refresh the query?
  11. lesleycampbell

    Formula in Group Footer Only Evaluating Last Row

    I am using CR11 and working on an invoice report. One employee will have multiple pay codes listed on the invoice. In order to format according to client's request, I am working on aligning all pay codes in one horizontal line versus each pay code listed as an individual line item...
  12. lesleycampbell

    Joining Multiple Tables - Help with Links

    I did not know that! Any outer join, or if I am using a LEFT outer join? And vice versa for a RIGHT outer join? Thank you!
  13. lesleycampbell

    Joining Multiple Tables - Help with Links

    Isn't that what I had with the first 2? I am linking the tables in CR, not working in SQL. If it isn't, how do I do it in CR?
  14. lesleycampbell

    Joining Multiple Tables - Help with Links

    It still is only showing the billing profiles that have orders associated with them. I have the following links: CustomerMaster.Customer_ID INNER JOIN CustomerBillingProfile.CustomerKey CustomerBillingProfile.BillingProfileKey LEFT OUTER JOIN OrderMaster.BillingProfileKey I had that and it...
  15. lesleycampbell

    Joining Multiple Tables - Help with Links

    I am working on a report where I want to group by Customer, Billing Profile, and Order. I only want the Customers to show that have active orders. I want ALL Billing Profiles associated with the Customer to show whether they are attached to an order or not. I can not get the Billing...
  16. lesleycampbell

    Group Not Working When Field Value Is Null

    In my report, I am grouping on a Purchase Order field. Not all Orders require Purchase Orders. Even if the purchase order field is null, I still want the order to show. I tried the following formula to group on: IF (ISNULL({OrderMaster.PurchaseOrder}) OR {OrderMaster.PurchaseOrder} = " ")...
  17. lesleycampbell

    Inserting text into field without removing existing data

    That is EXACTLY what I wanted to do. I'm sorry I was unclear. I am very new to SQL. Thank you so much!! I didn't know about the stars, so sorry about that.
  18. lesleycampbell

    Inserting text into field without removing existing data

    Thank you! This is working but I have now run into a second issue. The field is limited to 50 characters. Some of the pre-existing data is causing the updated string to exceed those characters. Is there a way to only update the accepted number of characters?
  19. lesleycampbell

    Inserting text into field without removing existing data

    I am trying to insert text into a field without deleting the existing text. I want to insert it at the beginning of the existing text string. Example: Existing text in field = 'Existing Data' Text string to insert = 'UPDATE 123 - ' Desired result = 'UPDATE 123 - Existing Data' Thank you!
  20. lesleycampbell

    Stored Procedure Parameter

    I am working in CR11. I am building a report from a store procedure and adding some additional information to it. Everything works fine except for one parameter. There is a 'user id' parameter built into the store procedure that I wish to ignore. Is there anyway to do that?

Part and Inventory Search

Back
Top