private string CreateColumnList(ASTNodeList aNodes) { StringBuilder columnList = new StringBuilder(); columnList.Append(" ("); int nodeCounter = 0; IASTNode currentNode = null; while (nodeCounter < aNodes.Count) { var previousNode = currentNode; currentNode = aNodes[nodeCounter++]; if (currentNode.Text[0] == ',' || currentNode.TextEqualTo("from")) { columnList.Append(previousNode.Text.Trim('"', '[', ']')); if (currentNode.TextEqualTo("from")) { break; } columnList.Append(", "); } } columnList.Append(")"); return(columnList.ToString()); }