Forum Replies Created

Viewing 15 posts - 271 through 285 (of 295 total)

  • RE: Visual Studio environment for database development

    We use SSDT with Visual Studio 2013 and it works quite well; the ability to use TFS for source control is particularly useful along with generating the change scripts for...

  • RE: Link more than one item for one selling operation ...

    I would also suggest you review the C# code slightly; it would be better to create the parameters explicitly with the datatypes used by the stored procedure, eg.

    SqlParameter parm00 =...

  • RE: Why Don't We Have Better Practices?

    I don't think AmandS was suggesting buggy code, bad design, etc. should become viewed as emergent practice. Just that new programming methods and features become available before standards can be...

  • RE: SOX Compliance

    From what I remember of SOX, the answer depends partly on the type of data in your database (and mostly on who is auditing your SOX compliance). If your development...

  • RE: Why Don't We Have Better Practices?

    The IT industry is frequently compared to bridge-building - normally in a negative way. To put it into perspective, bridge-building has been going on for centuries, if not millennia; by...

  • RE: Unable to perform query message

    I think you probably need the country part of the WHERE clause as below;

    select ledger_account, supplier_country, receiver_country, supplier_number, supplier_name, supplier_invoice_number, purchase_order_number, tran_type_po, document_number_po, invoice_amount,

    currency, invoice_amount_hc, vat_account_po, vat_amount_po, tran_type_app, document_number_app, vat_account_app,...

  • RE: SQL Design Question

    I agree with Luis, but it does depend on how your data may expand in the future. We have a CRM application where there are several 'standard' phone numbers for...

  • RE: Cannot resolve the collation conflict between "Latin1_General_CI_AI" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.

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

  • RE: SQL 2012 - SQL Connections not getting Closed by Client Application and Impact Feedback Request

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

  • RE: Union difficulty

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

  • RE: Union difficulty

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

  • RE: Potential Locking Issue - Inserts Failing Due to Duplicate Values

    Is it possible that the @KeyCountReserve parameter is sometimes zero or negative? That would cause duplicates to be generated.

  • RE: SQL Statement not displaying results with zero value

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

  • RE: SQL Statement not displaying results with zero value

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

  • RE: Shopping Cart Status Change

    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) =...

Viewing 15 posts - 271 through 285 (of 295 total)