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...
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.
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]...
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...
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?
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?
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...
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...
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?
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...
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...
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...
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} = " ")...
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.
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?
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!
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?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.