Sharan Kumar Sharan Kumar - 1 year ago 61
Python Question

<type 'exceptions.SyntaxError'> invalid table/column name "size" is a "ALL" reserved SQL/NOSQL keyword

Field('availablefrom', 'string'),
Field('availableto', 'string'),
Field('rooftype', 'string'),
Field('sitetype', 'string'),
Field('name', 'string'),
Field('email', 'string'),
Field('mobile', 'string'),
Field('industry_food', 'string'),
Field('industry_ecommerce', 'string'),
Field('industry_furniture', 'string'),
Field('industry_exim', 'string'),
Field('industry_auto', 'string'),
Field('industry_chemical', 'string'),
Field('industry_logistics', 'string'),
Field('industry_construction', 'string'),
Field('industry_agriculture', 'string'),
Field('industry_telecom', 'string'),
Field('industry_others', 'string'),
Field('parameter_numgates', 'string'),
Field('parameter_numdocks', 'string'),
Field('parameter_centralheight', 'string'),
Field('parameter_sidewallheight', 'string'),
Field('parameter_parkingarea', 'string'),
Field('parameter_firenoc', 'string'),
Field('parameter_foodlicense', 'string'),
Field('service_security', 'string'),
Field('service_cctv', 'string'),
Field('service_insurance', 'string'),
Field('service_racking', 'string'),
Field('service_pallets', 'string'),
Field('service_forklift', 'string'),
Field('service_powerbackup', 'string'),
Field('service_loading', 'string'),

By typing the above code i am getting this error( invalid table/column name "size" is a "ALL" reserved SQL/NOSQL keyword)Help me get rid out of this.
what should be used in this case.

Answer Source

Size is a word that is reserved by the db. That is, they have a special meaning to the db and so cannot be redefined. For this reason, you cannot use them to name database objects such as columns, tables, or indexes. Try using a different name instead :)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download