Results 1 to 3 of 3

Thread: MS SQL 2005 - function limitQuery

  1. #1
    mrobertson is offline Sugar Community Member
    Join Date
    Jun 2006
    Posts
    42

    Default MS SQL 2005 - function limitQuery

    I've installed Sugar 4.5.1 on MS SQL 2005 and configured the main database as a merge replication publisher. Unfortunately this adds a the column rowguid to all the tables that are marked for replication. This then causes the limitquery function in mssqlmanager.php to generate an error when you are selecting an item to view that is not the top one.
    Code:
    SQL Error : The column 'rowguid' was specified multiple times for 'a'.
    Is they a way that I can edit Sugar to ignore the column rowguid or edit the table call in limitquery so that it will collect column names except for rowguid?

    Windows Server 2003
    Apache 2.058
    MS SQL 2005 Enterprise
    PHP 5.04

  2. #2
    MJBVrijmoed is offline Sugar Community Member
    Join Date
    Sep 2007
    Posts
    20

    Default Re: MS SQL 2005 - function limitQuery

    Does anybody has an answer for this problem?

    thanx

  3. #3
    mrobertson is offline Sugar Community Member
    Join Date
    Jun 2006
    Posts
    42

    Default Re: MS SQL 2005 - function limitQuery

    If I remember correctly it only occurs if you have a custom field table.
    I had changed Ln 409 of MssqlManager.php and made DISTINCT uppercase and I modified Account.php
    Code:
    375// mrobertson: changed this query to stop the duplication of rowguid
    376//             instead of selecting accounts.* it lists all of teh fields
    377//               $query .= "
    378//                    users.user_name assigned_user_name,
    379//                    accounts.*";
    380//                 if($custom_join){
    381//					$query .=  $custom_join['select'];
    382//				}
    383
    384                $query .= "
    385                    users.user_name assigned_user_name,
    386                        accounts.id, accounts.date_entered, accounts.date_modified,
    387                        accounts.modified_user_id, accounts.assigned_user_id, accounts.created_by,
    388                        accounts.name, accounts.parent_id, account_type,
    389                        industry annual_revenue, accounts.phone_fax,
    390                        billing_address_street, billing_address_city, billing_address_state,
    391                        billing_address_postalcode, billing_address_country, accounts.description,
    392                        rating, phone_office, phone_alternate,
    393                        accounts.email1, accounts.email2, website, ownership, employees,
    394                        sic_code, ticker_symbol, shipping_address_street,
    395                        shipping_address_city, shipping_address_state, shipping_address_postalcode,
    396                        shipping_address_country, accounts.deleted, accounts.team_id, campaign_id";
    397                 if($custom_join){
    398					$query .=  $custom_join['select'];

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. MS SQL Express VS. MS SQL 2005 full edition
    By TakeMarket in forum Installation and Upgrade Help
    Replies: 5
    Last Post: 2008-07-30, 08:12 PM
  2. Replies: 1
    Last Post: 2008-02-22, 04:25 PM
  3. Bypass ROW_NUMBER(), or upgrade to MS SQL 2005
    By Forgie in forum General Discussion
    Replies: 0
    Last Post: 2006-09-15, 08:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •