在以下示例中, credentials = new ProfileCredentialsProvider("default").getCredentials();
AWSCostAndUsageReportClientBuilder reportBuilder = AWSCostAndUsageReportClientBuilder.standard();
AWSCostAndUsageReportClient costAndUsageReport = (AWSCostAndUsageReportClient) reportBuilder
.withCredentials(new AWSStaticCredentialsProvider(credentials))
.withRegion("us-east-1")
.build();
ReportDefinition reptDefinition = new ReportDefinition();
reptDefinition.setReportName("ChandraReport123");
reptDefinition.setTimeUnit("DAILY");
reptDefinition.setCompression("ZIP");
ArrayList addidtionSchemaElements = new ArrayList();
addidtionSchemaElements.add("RESOURCES");
reptDefinition.setAdditionalSchemaElements(addidtionSchemaElements);
reptDefinition.setS3Bucket("etho-onnu22");
reptDefinition.setS3Prefix("someprefix");
reptDefinition.setS3Region("us-east-1");
reptDefinition.setFormat("textORcsv");
request.setReportDefinition(reptDefinition);
PutReportDefinitionResult reportResult = costAndUsageReport.putReportDefinition(request);
列是parents
array
(int
)。
如果我想选择parents INT[]
数组包含parents
的所有行,我可以运行此查询:
42
现在我想反过来选择SELECT * FROM records WHERE 42 = ANY (parents);
包含parents
的每一行。
我试过了:
42
没有运气......有谁知道如何做到这一点?
我正在使用Postgresql SELECT * FROM records WHERE 42 != ANY (parents);
。
答案 0 :(得分:1)
答案 1 :(得分:0)
检查示例。 参考 - > Refrence link
SELECT value_variable = ANY ('{1,2,3}'::int[])