Viewing 15 posts - 256 through 270 (of 272 total)
Note that one of your collations is accent-sensitive and the other isn't. When applying the suggested solutions to your code, make sure you specify the one you need. For example,...
April 23, 2014 at 10:03 am
The programmers are definitely wrong (as you already know). They need to use one connection and decide either to keep it open all the time and close on exit, or...
April 17, 2014 at 4:32 am
I think you need to modify the Group By clause in the first select to
group by ath_stlmnt_instr_id, ath_instr_id, ae.stlmnt_line_instr_id, ath_gl_num, ath_cost_cntr
but you should also review the way you're handling the...
April 16, 2014 at 8:16 am
Maybe the Case/Sum part is intended to be;
SELECT ISNULL(ath_stlmnt_instr_id, ae.stlmnt_line_instr_id) AS ath_instr_id
,ath_instr_id AS orig_instr_id
,ath_gl_num
,ath_cost_cntr
,sum(CASE
WHEN ath_postype = 'GLD'
THEN ath_usdamt
WHEN ath_postype = 'GLC'
THEN ath_usdamt * - 1
END) AS ath_usdamt
,count(*)
FROM dbo.ACCTING_TRANSACTION_HISTORY
left join...
April 16, 2014 at 5:20 am
Is it possible that the @KeyCountReserve parameter is sometimes zero or negative? That would cause duplicates to be generated.
April 16, 2014 at 5:09 am
The IsNull should be used like this;
SELECT distinct
GBPriceList.[Mfr_Part_Num],
[HP_ Long_ description],
[HP_ Short_ Description],
--Exhibit_Unpivoted.Exhibit,
WeightKGS,
WarrantyCode,
ProductLine,
Serialized,
ListPrice,
Prod_Class,
IsNull(Exhibit_Discount.Discount, 0) AS Discount
rather than in the WHERE clause if you want to...
April 4, 2014 at 7:45 am
It occurs to me that there may not be an Exhibit_Discount record for products where the discount is zero. If that's the case, you'll need a left outer join to...
April 3, 2014 at 2:12 am
You could do something like the following to update the Cart status after each update of an order item.
update Cart
set Status = OverallStatus
from Cart inner join
(Select Cart2.CartNumber,
case when sum(Orders.PickStatus) =...
April 2, 2014 at 8:23 am
Sorry, yes I did check for triggers and there aren't any (not visible to my login anyway - I'll ask a server admin to check for me).
April 1, 2014 at 4:32 am
The stored procedure really is in the same database as the tables; most of our stored procedures use the 3-part name because some operate across more than one database and...
April 1, 2014 at 2:09 am
The table(s) and stored procedure are definitely in the same database and that is the same database specified by the application when it opens the connection. We've tried explicitly granting...
March 31, 2014 at 8:58 am
Thanks for your response. The error we're getting is shown in the attachment; not much detail as it's being displayed by an old VB6 program. The stored procedure just does...
March 31, 2014 at 8:10 am
No, it's a member of the db_datareader role and the only other permission is the Execute on dbo.
March 25, 2014 at 10:22 am
This works with the data provided.
Selectdistinct
a.EmplID,
Case when c.EmpID is null then b.Designation else c.Designations End as [Role]
from #EmpIDs a
inner join #EmpRoles b on a.EmplID = b.EmpID
left outer join #LatestRoles c...
March 20, 2014 at 2:41 am
My 2 penn'orth; I think the error you're getting is from an attempt to execute the stored proc with a connection that isn't open so you're not seeing the message...
March 13, 2014 at 5:27 am
Viewing 15 posts - 256 through 270 (of 272 total)