Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error 1054 when copying BOM to another product
02-24-2017, 02:24 PM
Post: #1
Error 1054 when copying BOM to another product
Hi;
After recent update, I get an error when copying BOM from existing items to new item. Worked before, now get the following error:
Database Error 1054 :
Unknown column 'decimalplaces' in 'field list'
Database SQL Failure : The SQL that failed was INSERT INTO bom SELECT 'TH-PMNT-401' AS parent, sequence, component, workcentreadded, loccode, effectiveafter, effectiveto, quantity, autoissue, remark, digitals, decimalplaces FROM bom WHERE parent='TH-PMNT-404';
Failed on multiple products; BOM's and item details look correct; maybe something to do with the remarks field.

Pls advise if need to add or edit some info to correct the error.

Thank you very much for any advice. very appreciated.
Find all posts by this user
Quote this message in a reply
02-24-2017, 02:57 PM (This post was last modified: 02-24-2017 02:57 PM by Exsonqu_Qu.)
Post: #2
RE: Error 1054 when copying BOM to another product
Hi,
It's fixed in the trunk. Please refer to the attachment.
Best regards!
Exson

(02-24-2017 02:24 PM)archer62 Wrote:  Hi;
After recent update, I get an error when copying BOM from existing items to new item. Worked before, now get the following error:
Database Error 1054 :
Unknown column 'decimalplaces' in 'field list'
Database SQL Failure : The SQL that failed was INSERT INTO bom SELECT 'TH-PMNT-401' AS parent, sequence, component, workcentreadded, loccode, effectiveafter, effectiveto, quantity, autoissue, remark, digitals, decimalplaces FROM bom WHERE parent='TH-PMNT-404';
Failed on multiple products; BOM's and item details look correct; maybe something to do with the remarks field.

Pls advise if need to add or edit some info to correct the error.

Thank you very much for any advice. very appreciated.


Attached File(s)
.php  CopyBOM.php (Size: 5.89 KB / Downloads: 2)
Find all posts by this user
Quote this message in a reply
02-24-2017, 05:50 PM
Post: #3
RE: Error 1054 when copying BOM to another product
Hi Exson;
tks very much for your help, after updating, I get this error:

Database Error 1136 :
Column count doesn't match value count at row 1
Database SQL Failure : The SQL that failed was
INSERT INTO bom SELECT 'TH-PMNT-801' AS parent, sequence, component, workcentreadded, loccode, effectiveafter, effectiveto, quantity, autoissue, remark, digitals, digitals FROM bom WHERE parent='TH-PMNT-808';

tks again for your help.


(02-24-2017 02:57 PM)Exsonqu_Qu Wrote:  Hi,
It's fixed in the trunk. Please refer to the attachment.
Best regards!
Exson

(02-24-2017 02:24 PM)archer62 Wrote:  Hi;
After recent update, I get an error when copying BOM from existing items to new item. Worked before, now get the following error:
Database Error 1054 :
Unknown column 'decimalplaces' in 'field list'
Database SQL Failure : The SQL that failed was INSERT INTO bom SELECT 'TH-PMNT-401' AS parent, sequence, component, workcentreadded, loccode, effectiveafter, effectiveto, quantity, autoissue, remark, digitals, decimalplaces FROM bom WHERE parent='TH-PMNT-404';
Failed on multiple products; BOM's and item details look correct; maybe something to do with the remarks field.

Pls advise if need to add or edit some info to correct the error.

Thank you very much for any advice. very appreciated.
Find all posts by this user
Quote this message in a reply
02-25-2017, 03:30 PM
Post: #4
RE: Error 1054 when copying BOM to another product
Looks like the column 'digitals' is listed twice ?

Can you edit the script and change the SQL portion before the FROM clause...

from this:
Code:
remark, digitals, digitals FROM

...to this:
Code:
remark, digitals FROM
Find all posts by this user
Quote this message in a reply
02-26-2017, 08:01 PM
Post: #5
RE: Error 1054 when copying BOM to another product
In my opinion this field shouldn't be in the bom table. The sequence number of the item should be an integer. This complex solution to a non existent problem should be removed IMO

Thanks
Tim
Visit this user's website Find all posts by this user
Quote this message in a reply
03-02-2017, 01:41 PM
Post: #6
RE: Error 1054 when copying BOM to another product
that works, thanks to everyone for their help and suggestions
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)