从SQL导出CSV文件格式的数据?

时间:2018-03-26 05:43:36

标签: sql sql-server csv export export-to-csv

我正在尝试将数据表从SQL Server导出为func setConstraints() { for i in 0...rows-1 { for j in 0...cols-1 { //First image if (i == 0 && j == 0) { floorImageView[i][j].anchor(top: self.view.safeAreaLayoutGuide.topAnchor, leading: self.view.safeAreaLayoutGuide.leadingAnchor, bottom: nil, trailing: nil, padding: .init(top: 180, left: 10, bottom: 0, right: 0), size: .init(width: 40, height: 40)) cellImageView[i][j].anchor(top: self.view.safeAreaLayoutGuide.topAnchor, leading: self.view.safeAreaLayoutGuide.leadingAnchor, bottom: nil, trailing: nil, padding: .init(top: 180, left: 10, bottom: 0, right: 0), size: .init(width: 40, height: 40)) } //Middle rows else if (i == 0 && j > 0) { floorImageView[i][j].anchor(top: self.view.safeAreaLayoutGuide.topAnchor, leading: floorImageView[i][j-1].trailingAnchor, bottom: nil, trailing: nil, padding: .init(top: 180, left: 0, bottom: 0, right: 0), size: .init(width: 40, height: 40)) cellImageView[i][j].anchor(top: self.view.safeAreaLayoutGuide.topAnchor, leading: floorImageView[i][j-1].trailingAnchor, bottom: nil, trailing: nil, padding: .init(top: 180, left: 0, bottom: 0, right: 0), size: .init(width: 40, height: 40)) } //First image of every row else if (i > 0 && j == 0) { floorImageView[i][j].anchor(top: floorImageView[i-1][j].bottomAnchor, leading: self.view.safeAreaLayoutGuide.leadingAnchor, bottom: nil, trailing: nil, padding: .init(top: 0, left: 10, bottom: 0, right: 0), size: .init(width: 40, height: 40)) cellImageView[i][j].anchor(top: floorImageView[i-1][j].bottomAnchor, leading: self.view.safeAreaLayoutGuide.leadingAnchor, bottom: nil, trailing: nil, padding: .init(top: 0, left: 10, bottom: 0, right: 0), size: .init(width: 40, height: 40)) } //Middle js else if (i > 0 && j > 0) { floorImageView[i][j].anchor(top: floorImageView[i-1][j].bottomAnchor, leading: floorImageView[i][j-1].trailingAnchor, bottom: nil, trailing: nil, padding: .init(top: 0, left: 0, bottom: 0, right: 0), size: .init(width: 40, height: 40)) cellImageView[i][j].anchor(top: floorImageView[i-1][j].bottomAnchor, leading: floorImageView[i][j-1].trailingAnchor, bottom: nil, trailing: nil, padding: .init(top: 0, left: 0, bottom: 0, right: 0), size: .init(width: 40, height: 40)) } //Last row else if (i > 0 && j == cols-1) { floorImageView[i][j].anchor(top: floorImageView[i-1][j].bottomAnchor, leading: floorImageView[i][j-1].trailingAnchor, bottom: nil, trailing: self.view.safeAreaLayoutGuide.trailingAnchor, padding: .init(top: 0, left: 0, bottom: 200, right: 10), size: .init(width: 40, height: 40)) cellImageView[i][j].anchor(top: floorImageView[i-1][j].bottomAnchor, leading: floorImageView[i][j-1].trailingAnchor, bottom: nil, trailing: self.view.safeAreaLayoutGuide.trailingAnchor, padding: .init(top: 0, left: 0, bottom: 200, right: 10), size: .init(width: 40, height: 40)) } } } } 文件格式,但在此警告之后无法继续执行。我不知道如何解决这个问题,我需要在工作中更进一步。

Error

1 个答案:

答案 0 :(得分:0)

编写查询以检索要导出的数据 右键单击结果并另存为csv文件。见图像波纹管 enter image description here