Can someone tell me what the proper syntax is to ensure that the data type
of "sum(ia)" is created in the schema?

 

The following syntax produces a schema of:

"CREATE TABLE theTest(company varchar(21), ia);"

 

Thank you,

Marc

 

//------------------------------------------------------

       sql = string("create table theTest ")

           + " as select all "

           + " company                                         ,"

           + " sum(ia)                   as ia                  "

 

           + " from anyThing                                    "

 

           + " group by                                         "

           + " company                                          ";

 

       sqlAns = sqlite3_exec(lite3, sql.c_str(), nothingCB, pArg, errMsg);

//------------------------------------------------------

 

Reply via email to