by artu01 » Mon Oct 04, 2021 10:57 pm
Trabajo con mssql pero debe ser similar en MARIADB
- Code: Select all Expand view RUN
cSQL := "CREATE TABLE pcaj"
cSQL += "("
cSQL += "lote varchar(6) NOT NULL, "
cSQL += "ineto NUMERIC(12,3),"
cSql += "idmat int NULL,"
cSql += "idcol int NULL,"
cSql += "material char(12) NOT NULL,"
cSql += "color char(10) NOT NULL,"
cSql += "prove char(15) NOT NULL,"
cSQL += "sneto NUMERIC(12,3) DEFAULT 0,"
cSQL += "fingr Date NOT NULL,"
cSQL += "puni numeric(6,2) NOT NULL,"
cSQL += "tica numeric(6,3) NOT NULL,"
cSQL += "pigv numeric(5,2) DEFAULT 0,"
cSQL += "abrev char(10) NULL"
cSQL += ")"
Try
oConnect:Execute( cSQL )
Catch
MsgInfo( "Table Create pcaj Failed" )
End try
try
oConnect:Execute( "CREATE INDEX mat_col_lote_idx ON #pcaj( material, color, lote )" )
Catch
MsgInfo( "Fallo creacion de indice" )
end try
fwh 17.12, harbour 3.2.0, pelles C, bcc7, Ms-Sql