Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sTk4E-001xF7-A4 for pgsql-general@arkaria.postgresql.org; Tue, 16 Jul 2024 15:26:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sTk4C-001kJn-O8 for pgsql-general@arkaria.postgresql.org; Tue, 16 Jul 2024 15:26:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sTk4C-001kJe-Cy for pgsql-general@lists.postgresql.org; Tue, 16 Jul 2024 15:26:12 +0000 Received: from fhigh6-smtp.messagingengine.com ([103.168.172.157]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sTk49-002Qsk-P2 for pgsql-general@postgresql.org; Tue, 16 Jul 2024 15:26:11 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfhigh.nyi.internal (Postfix) with ESMTP id A79261148084; Tue, 16 Jul 2024 11:26:08 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Tue, 16 Jul 2024 11:26:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1721143568; x=1721229968; bh=b7zvGMoBQ0P8I8m6ShPX5HmE0sTZG8tboqwRHMV1GbI=; b= sdeIdB9cOwLUQmStbnWGBZS8DjhzrPGnAOxmExxiuEFfLVceM0mIvCEe6VH2SAsw MxxnJ2OuvOt6yjT5tnN3Nq4t1SwqN+JjIQBLEGudFDkEycBW3oRbiLsyfupRqubw e4eT058Jp17MwUmrWImXJAfbJnnp1F8VSI2Hf4FPqKNRnqIcbIEerpSEuTk8qv4u O7AVQcvHaMcVepeIIOYXRtlnMW8YrWr7K1pOwQ1/vYLQImxCYV2ku87E13W5n109 /gKt7t6e5Iu4ChCFLMsQTjCl1Qx6sKjPTdXdvw/h8+J6m6Di3bhguZGBsQP2edl9 wP+T363aJwwta3qERK7KQA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1721143568; x= 1721229968; bh=b7zvGMoBQ0P8I8m6ShPX5HmE0sTZG8tboqwRHMV1GbI=; b=N at+xGZXoDShNBp/UEZOxz0Hb5mQZJendCm83BDwIf0k/gzPAvL/Lwb0BnHTeW5Zn ZZKKI6rwd5TZZsqLEIgOiAcBMnSuSF1Eca9Tku9zn8CM+L08/cm//QpsARP4lq7x 6fRcfTsgSSdutOGtfJDyio/vtgCKxl+G3dQ7ld4MQKUVwvEgJz1s7UTo0Aj6DZnP /+wT37t/eDpeUfwhvibLqQHbHu4r5VQqysTpouo67Mn6cxoD2OiwvXOHEX9548Pm CsMjtByBpj5AyIetNo7iMpZmdOSlhjsiEX3qOfhInxx5o80WxbQUPTJaSXPgECI5 ZxMNMFZXox/rqsguIowDw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrgeeggdekjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfhfvefhjggtgfesthejredttddvjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpefgieevffffheefheeihfekvdeuheefleefjeefgeff udeuiefhvdeifefhvedvgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 16 Jul 2024 11:26:07 -0400 (EDT) Message-ID: <5b8cb137-121d-40c6-b907-7d59e53b5e13@aklaver.com> Date: Tue, 16 Jul 2024 08:26:06 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Code does Not Read in FY 2025 Data To: Anthony Apollis References: <1fd63ee5-a8a3-492e-a38d-82ff21da26b8@aklaver.com> <82ff4dac-d8b0-4b8b-aa88-e5d74f624a4d@aklaver.com> Content-Language: en-US Cc: pgsql-general From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 7/16/24 08:15, Anthony Apollis wrote: Reply to list also Ccing list > i did attached the sample data. Yes I know and the data for 2025 will fail because they are like this: Date FY Period Quarter Day Month Year Loaddate 2025-01-10 00:00:00.000 NULL NULL NULL 10 1 2025 2023-07-10 11:55:09.733 The FY values are NULL and they will not be found by: "FY" IS NOT NULL AND "FY" >= 'FY24' For the updated data that is for 2026 and 2027 there are FY values, but then you do: WEEK_NUMBER."Date" < CURRENT_DATE where WEEK_NUMBER is the alias for the sub-select that filtered on: "FY" IS NOT NULL AND "FY" >= 'FY24' So even if the sub-select found values in the future you filter them out with < CURRENT_DATE -- Adrian Klaver adrian.klaver@aklaver.com