private string GetQuery(string code, string date) { var name = AxAPI.GetMasterCodeName(code); if (name.Equals(string.Empty)) { name = code.Replace(code.Substring(3, 2), date).Replace("201", "C").Replace("301", "P"); if (code.Last().Equals('2') || code.Last().Equals('7')) { name = string.Concat(name, ".5"); } } else { name = name.Replace(" ", string.Empty); } return(string.Concat("BEGIN CREATE TABLE [", name, "] ([", code, "] BIGINT NOT NULL CONSTRAINT pk", code, " PRIMARY KEY,[Date] DATETIME NOT NULL,[Price] FLOAT NOT NULL,[Volume] INT NOT NULL) END")); }
private string GetQuery(string code) { var name = AxAPI.GetMasterCodeName(code).Trim(); return(string.Concat("BEGIN CREATE TABLE [", name, "] ([", code, "] BIGINT NOT NULL CONSTRAINT pk", code, " PRIMARY KEY,[Date] DATETIME NOT NULL,[Price] INT NOT NULL,[Volume] INT NOT NULL) END")); }