Date condition in IR
Hi,
Iam working on IR 11 version. There is a scenario in writing a query where i need to calculate the values for example
actual==previous-current
for current::: iam using date function between '01-01-08 to 06-06-08'(current) by this iam getting current values
i need to get previous value which is on '31-dec-07'..value which is on this date will subtract with current value...so that i'll get actual result
what will be the date function to get the previous value???
please help me in this issue...its urgetn
hi,
database am using is oracle 10g.My business requirement is i want to calculate the meter reading for current month and from the last month where the meter reading has started..
for example take speedometer of car...
i will take the current month readings(speedometer) i.e from 1-sep to till date..I want to know the speedometer reading of the car on 31-aug..so that i can calculate the miles that i travelled from 1-sep to till date..
what ever the speedometer reading ended on 31-aug will be my starting position of the meter on 1-sep.
this has to be written in IR query.what will be the function for calculating??
hope you understand the example...
Similar Messages
-
Date condition not working correctly in Desktop
Hello,
I have two custom folders in Admin that are joined. One of the folders contains the following query:
SELECT ORGANIZATION_ID, ASSET_NUMBER, MIN(CURRENT_READING_DATE) FIRST_READ_DATE, MIN(CURRENT_READING) FIRST_READING
FROM EAM_METER_READINGS_V
WHERE PREV_DESC IS NULL
Group By ORGANIZATION_ID, ASSET_NUMBER
I want my workbook to report the earliest meter reading that exists, based on the date that is specified in the parameters in Desktop. When I create a parameter for the date, the workbook reports the earliest reading in the database; it ignores the date restriction entered in the parameter. This is the parameter:
First Read Date MIN BETWEEN :First Reading Date and SYSDATE
If I include the date condition in the SQL of the custom folder the workbook functions exactly as it should. The date condition is in the SQL as the following:
and current_reading_date between '01-JAN-2007' and SYSDATE
Since the workbook functions correctly when the condition is coded in the SQL but not when it is based on a parameter, I assume the problem is with the parameter. Any ideas on how I may correct this?
Thanks,
SteveThanks for the response Michael. I tried using the MIN function as you suggested, but I still am not getting the expected result. I’m not sure that I was clear in my initial problem description. I will try to provide more detail with this post.
The reason I have two custom folders is that my original query has a nested Select statement (EAMV) and I couldn’t find a way to pass the parameter from EAMV to Discoverer. Following is the original query. I suppose the first logical questions would be, is there a way to pass the parameter to Discoverer? Would this alleviate the need for the second custom folder?
SELECT K.ORGANIZATION_CODE "ORG" -- ORGANIZATION
, K.ORGANIZATION_ID
,A.NAME "PM SCHEDULE NAME" -- PREVENTIVE MAINTENANCE SCHEDULE NAME
--( (B.RUNTIME_INTERVAL/F.USER_DEFINED_RATE) + D.LAST_SERVICE_END_DATE) "PROJECTED READ DATE" -- USES USER_DEFINED_RATE FROM METER DEFINITION
,(C.LAST_SERVICE_READING + B.RUNTIME_INTERVAL) "PROJECTED READ UNITS" -- NEXT SERVICE READING DUE UNITS
,F.METER_UOM "UOM" -- UNIT OF MEASURE ON METER
,F.METER_NAME "METER NAME" -- METER NAME
,G.SERIAL_NUMBER "MAINT EQ NO" -- MAINTAINED EQUIPMENT NUMBER
,H.C_ATTRIBUTE1 "MAKE" -- MAINTAINED EQUIPMENT NUMBER - MAKE/MANUFACTURER
,H.C_ATTRIBUTE2 "MODEL" -- MAINTAINED EQUIPMENT NUMBER - MODEL
,H.C_ATTRIBUTE4 "SERIAL NO" -- MAINTAINED EQUIPMENT NUMBER - SERIAL NUMBER
,I.SEGMENT1 "ACTIVITY" -- ASSET ACTIVITY
,D.LAST_SERVICE_END_DATE "LAST READ DATE" -- DATE OF LAST PM SERVICE READING
,C.LAST_SERVICE_READING "LAST READ UNITS" -- UNITS OF LAST PM SERVICE READING
,E1.CURRENT_READING_DATE "CURRENT READ DATE" -- DATE OF CURRENT SERVICE READING (FROM METER FORM)
,E1.CURRENT_READING "CURRENT READ UNITS" -- UNITS OF CURRENT SERVICE READING (FROM METER FORM)
,E1.LIFE_TO_DATE_READING "LIFE TO DATE READING" LIFE TO DATE READING
--,(E1.CURRENT_READING - C.LAST_SERVICE_READING) "CURRENT/LAST VARIANCE" -- UNITS SINCE LAST PM SERVICE READING
,( (C.LAST_SERVICE_READING + B.RUNTIME_INTERVAL) - E1.CURRENT_READING ) "PROJECTED/CURR VARIANCE" -- UNITS REMAINING UNTIL NEXT SCHEDULED READING
,J.DESCRIPTION "LOCATION" -- OWNING DEPARTMENT DESCRIPTION OF ASSET NUMBER
,J.DEPARTMENT_CODE
,E1.DISABLE_FLAG
,G.CURRENT_STATUS
,B.RUNTIME_INTERVAL
,Y.SET_NAME
,EAMV.FIRST_READ_DATE READ_DATE
,EAMV.FIRST_READING READING
FROM EAM.EAM_PM_SCHEDULINGS A
,EAM.EAM_PM_SCHEDULING_RULES B
,EAM.EAM_PM_LAST_SERVICE C
,INV.MTL_EAM_ASSET_ACTIVITIES D
,EAM.EAM_ASSET_METERS E
,EAM.EAM_METER_READINGS E1
,EAM.EAM_METERS F
,INV.MTL_SERIAL_NUMBERS G
,INV.MTL_EAM_ASSET_ATTR_VALUES H
,INV.MTL_SYSTEM_ITEMS_B I
,BOM.BOM_DEPARTMENTS J
,INV.MTL_PARAMETERS K
,EAM.EAM_PM_SET_NAMES Y
,(SELECT ORGANIZATION_ID, ASSET_NUMBER, MIN(CURRENT_READING_DATE) FIRST_READ_DATE, MIN(LIFE_TO_DATE_READING) FIRST_READING
FROM EAM_METER_READINGS_V
WHERE CURRENT_READING_DATE BETWEEN '01-JAN-2007' AND '30-JUN-2007'
GROUP BY ORGANIZATION_ID, ASSET_NUMBER) EAMV
WHERE A.PM_SCHEDULE_ID = B.PM_SCHEDULE_ID
AND A.ACTIVITY_ASSOCIATION_ID = C.ACTIVITY_ASSOCIATION_ID
AND C.ACTIVITY_ASSOCIATION_ID = D.ACTIVITY_ASSOCIATION_ID
AND D.SERIAL_NUMBER = E.ASSET_NUMBER
AND D.ORGANIZATION_ID = E.ORGANIZATION_ID
AND E.METER_ID = E1.METER_ID
AND E1.METER_READING_ID =
(SELECT MAX(METER_READING_ID)
FROM EAM_METER_READINGS
WHERE METER_ID = E1.METER_ID
AND (DISABLE_FLAG = 'N' OR DISABLE_FLAG IS NULL))
AND E.METER_ID = C.METER_ID
AND E.METER_ID = B.METER_ID
AND E.METER_ID = F.METER_ID
AND D.MAINTENANCE_OBJECT_ID = G.GEN_OBJECT_ID
AND D.ORGANIZATION_ID = G.CURRENT_ORGANIZATION_ID
AND G.SERIAL_NUMBER = H.SERIAL_NUMBER
AND G.CURRENT_ORGANIZATION_ID = H.ORGANIZATION_ID
AND D.INVENTORY_ITEM_ID = H.INVENTORY_ITEM_ID
AND H.ATTRIBUTE_CATEGORY = 'EQUIPMENT DETAILS'
AND D.ASSET_ACTIVITY_ID = I.INVENTORY_ITEM_ID
AND D.ORGANIZATION_ID = I.ORGANIZATION_ID
AND G.OWNING_DEPARTMENT_ID = J.DEPARTMENT_ID (+)
AND I.ORGANIZATION_ID = K.ORGANIZATION_ID
AND A.SET_NAME_ID = Y.SET_NAME_ID
AND Y.SET_NAME IN ('MAIN','COMP')
AND G.CURRENT_ORGANIZATION_ID = EAMV.ORGANIZATION_ID
AND G.SERIAL_NUMBER = EAMV.ASSET_NUMBER
AND K.ORGANIZATION_CODE = 'MCC'
Using this query I want to show the most recent reading (current reading) and then give users the flexibility to enter an earlier date so the earliest reading as of that date will also show. For example, if they enter 1-JAN-2007 as the parameter and there was a reading taken on 2-JAN-07 and 28-JAN-07, the report should show the 2-JAN-2007 reading (in addition to the most recent reading in a separate column). Currently, everything on the report displays correctly, except for the reading based on the parameter. -
Teradata database error when using a Universe-defined Date condition
I have encountered an odd problem when connecting Crystal to a Universe. There is a pre-defined Date condition built into the Universe that is defined as follows:
@Select(Date\Week End Date) > @Select(Conditions\User Response Select Date week -28) AND @Select(Date\Week End Date) <= @Select(Conditions\User Response Select Date)
The filter is designed to retrieve a rolling 4 weeks of data.
When I try and create and refresh a Crystal Report that includes this Date prompt, I get the following error:
Failed to retrieve data from the database.
Details: 22003:(ODBC Teradata Driver)(Teradata Database) A character string failed conversion to a numeric value.
If I create the same query in a WebI report it works fine, but in Crystal the error is produced. I have also tried constructing the same prompt and filter within Crystal rather than use the pre-built prompt but that did not work either.
Does anyone have any experience or advice on this error? I can't seem to find many related postings on this specific error.
BO Enterprise XI 3.1 SP2 running on Windows 2008 Server R2
Crystal Reports 2008 SP2 running on Windows XP SP3
Universe is built on a Teradata 12 source
Thanks!One item I found I had to do with Teradata was cast my date/time values to dates, otherwise I got weird errors like this. You say it's working in Web Intelligence, so this might not be the issue, but it is an easy thing to test.
In the universe, change your end date definition to
cast(table.end_date as date)
and see if that helps. -
How to hide fields in Web UI on basis of some data conditions
Hi,
Is there any way we can hide the fields on some data conditions, i know we can disable the field in get_i method but just wondering if we can hide it completely.
Regards,
KameshAs far as I know there is no way to hide a field via the provided methods (Ex: GET_xxx...). The only way I reckon you can achieve this is to create a separate UI config for the fields you want to hide. I assume your scenario is simple else it would not make sense to create a ton of UI configs or would it?
-
Select Query Based on date condition
Hi ,
Is it Possible.
i want to run select query based on date condition.
Eg...
if the date between 01-jan-01 and 01-jan-05 then
select * from table1;
if the date between 02-jan-05 and 01-jan-08 then
select * from table2;
Becaz i have data in 2 diffrent tables , based on the date condition i wnt to run the select statement to diffrent tables.
i dont want plsql here Just SQL needed.
thanks,
-R
Edited by: infant_raj on May 5, 2009 11:48 PMHelo Kanish,
this is not the one i was asking..
wht i mean was .
i use bind variable to get date while running the select statement , once i get the date then i want to choose any one of the table to run select query.
EG..
select col1,col2 from table1 where date between only if 01-jan-01 and 01-jan-05;
select col1,col2 from table2 where date between only if 02-jan-05 and 01-jan-08;
Run any one of the two . not all
thanks,
_raj -
Date Condition Not Working ,Value not cming in to item.
Hi Friends,
i have create a form for palce order and i have create a MASTER table for fixed item Rate between two date with price code like A,B,C,D .
In Form i have for Item
:P1_ORDER_DATE
:P1_ITEM_CODE
:P1_PRICE_CATEGORY Select List With Submit
:P1_ITEM_RATE
In Item rate i have put in Source ,
Source Type --SQL Quary
Source Vale
select RATE_1 from SAM_ITEM_MAS where ITEM_CODE =:P1_ITEM_CODE and PRICE_CATEGORY=:P1_PRICE_CATEGORY and :P1_ORDER_DATE
between FROM_DATE and TO_DATEMy Table
CREATE TABLE "SAM_ITEM_MAS"
( "ID" NUMBER NOT NULL ENABLE,
"ITEM_CODE" NUMBER,
"PRICE_CATEGORY" VARCHAR2(5),
"FROM_DATE" DATE,
"TO_DATE" DATE,
"RATE_1" NUMBER,
CONSTRAINT "SAM_ITEM_MAS_PK" PRIMARY KEY ("ID") ENABLE
/that code's not working but if i run this code in to SQL Command Then it's work fine.but not in to ITEM :P1_ITEM_RATE .
i want when i select P1_PRICE_CATEGORY Like A,B,C,D then Respective Rate from Table SAM_ITEM_MAS should come in to item :P1_ITEM_RATE .
Oredr date condition is not working.
Thanks
Edited by: 805629 on Dec 28, 2010 11:32 PMHi,
Have you tried casting the item values as dates using TO_DATE():
select RATE_1
from SAM_ITEM_MAS
where ITEM_CODE =:P1_ITEM_CODE
and PRICE_CATEGORY=:P1_PRICE_CATEGORY
and TO_DATE(:P1_ORDER_DATE,'DD/MM/YYYY') between "FROM_DATE" AND "TO_DATE"(change the date format string to match the format of the P1_ORDER_DATE page item)
You should probably change the name of the field to something other than TO_DATE as this is an Oracle function name - try DATE_FROM and DATE_TO or START_DATE and END_DATE or something like that. Otherwise you may have to use the double-quotes as I have shown above
Andy -
Hi :
I am working on Plant Maintenance module, i extracted work orders ( aufnr ) from AUFK based on some conditions, i am wondering to know how to code date condition for these.In the selection screen i have s_date option where the user can give any date range .my question is ...after selecting all the work orders i want only those work orders whose status is conformed and date condition is " For the calender week X, work order actual end date ( getri ) should not be later than the week ending of sunday night 11:59pm " .
I am able to extract work orders whose status is conformed , but i need logic for tha date condition.
points will be rewarded ..
Thx.
RaghuHi
For selecting records between date range, s_date-low and s_date-high for a record which contains begin date field as begda and end date field as endda (This is for HR tables).
We give date conditions as endda >= s_date-low AND begda <= s_date-high.
When the user clicks on the checkbox, change the s_date-high to the appropriate date and you can filter records accordingly.
Regards
Navneet -
Requires a user to input a date (condition [%0])
Hi,
I'm trying to write a query that requires a user to input a date (condition [%0]). The data brought back would show invoices with activity but I need to get only the invoices that are 60 days past due from the date the user inputs.
--SELECT T0.[DocNum]'Invoice No.',
--T0.[CardCode],
--T0.[CardName],
--T1.PYMNTGROUP,
--T0.[DocDate],
--T0.[DocDueDate],
--DATEDIFF(DAY,T0.DOCDUEDATE,GETDATE())'Past Due',
--T0.[DocTotal] 'Balance Due',
--MAX(T2.RECONTACT)'Last Activity',
--max(t2.details)'Activity Details'
--FROM OINV T0 LEFT JOIN OCTG T1 ON T0.GROUPNUM=T1.GROUPNUM LEFT JOIN OCLG T2 ON T0.CARDCODE=T2.CARDCODE
--WHERE T0.[Docstatus] ='o' and
--T0.docduedate<getdate() -60
--GROUP BY T0.[DocNum], T0.[CardCode], T0.[CardName],T1.PYMNTGROUP, T0.[DocDate], T0.[DocDueDate] ,
--DATEDIFF(DAY,T0.DOCDUEDATE,GETDATE()),T0.[DocTotal]Hi,
Welcome you post on the forum.
Try this:
Declare @ToDate DateTime
SET @ToDate = /(SELECT T0.DocDate FROM OINV T0 where T0.DocDate =/ '[%0\]'
SELECT T0.DocNum'Invoice No.',
T0.CardCode,
T0.CardName,
T1.PYMNTGROUP,
T0.DocDate,
T0.DocDueDate,
DATEDIFF(DAY,T0.DOCDUEDATE,@ToDate)'Past Due',
T0.DocTotal 'Balance Due',
MAX(T2.RECONTACT)'Last Activity',
max(t2.details)'Activity Details'
FROM OINV T0 LEFT JOIN OCTG T1 ON T0.GROUPNUM=T1.GROUPNUM LEFT JOIN OCLG T2 ON T0.CARDCODE=T2.CARDCODE
WHERE T0.Docstatus ='o'
GROUP BY T0.DocNum, T0.CardCode, T0.CardName,T1.PYMNTGROUP, T0.DocDate, T0.DocDueDate ,
DATEDIFF(DAY,T0.DOCDUEDATE,@ToDate),T0.DocTotal
Having DATEDIFF(DAY,T0.DOCDUEDATE,@ToDate)>60 -
Using a year parameter in a date condition
I am collecting a year parameter from my user and want to use that year as part of a complete date condition.
So I collect the year 2003 from my user.
A condition is applied to the report in that the date must be after 01-APR-...and here is where i want to utilize the parameter @Year. So I can apply the same date condition depending on what year we are looking at.
I am sure this can be done but I am missing the syntax.
Thanks, mpaskeviThanks for the reply. I had started taking the date apart using tochar as in:
WHERE (QUAL.CANCELLATION_DATE IS NULL
OR
to_char(QUAL.CANCELLATION_DATE,'YYYY') = :Year
AND
to_char(QUAL.CANCELLATION_DATE,'DD')>'04'
AND
to_char(QUAL.CANCELLATION_DATE,'MM')>'02')
But was still struggling.
If I use your method which is much more efficient I get the following error. I would have expected a prompt for the parameter.
ORA 01008 not all variables bound
Any thoughts?
Message was edited by:
user509963
Message was edited by:
user509963
Message was edited by:
user509963 -
How to limit extract base on date condition in oracle goldengate?
Hi all,
I have a problem about date condition in extract parameter:
My extract parameter:
GGSCI>edit params ext1
EXTRACT ext1
USERID ggadmin, PASSWORD ggadmin
EXTTRAIL /u01/app/oracle/product/gg/dirdat/lt
DDL INCLUDE MAPPED
table test.chien, where (id >4 and TDATE>TRUNC(TO_DATE('01/01/2011 00:00:00','DD/MM/YYYY HH24:MI:SS')));
when I start extract, have a error:
+7. 2011-11-04 07:06:45 ERROR OGG-01157 Oracle GoldenGate Capture for Oracle, ext1.prm: Error in WHERE clause for TEST.CHIEN.+
I check where condition in the select statement is ok.
I don't know what is different between condition in params of extract and condition in select statement?
Please explaint to me and hepl me how to limit extract capture base date condition,
Thanks so much.
Omni
Edited by: user12378049 on 21:46 03-11-2011Thanks for Stevencallan's reply.
I try again with Stevencallan's way, but not successful.
TABLE SCOTT.EMP, sqlpredicate "where EMPNO >4 AND HIREDATE> TO_DATE('01/01/1911 00:00:00','DD/MM/YYYY HH24:MI:SS')"; All Error is the same my old post:
2011-11-07 05:37:52 INFO OGG-01517 Oracle GoldenGate Capture for Oracle, ext1.prm: Position of first record processed Sequence 26, RBA 21009936, SCN 0.1498876, Nov 7, 2011 5:34:14 AM.
2011-11-07 05:37:53 ERROR OGG-00212 Oracle GoldenGate Capture for Oracle, ext1.prm: Invalid option for MAP: "where.
2011-11-07 05:37:53 ERROR OGG-01668 Oracle GoldenGate Capture for Oracle, ext1.prm: PROCESS ABENDING. {code}
The trunc(date) to round date to the first time in the day. I think it is not reason of the error.
{code} The TRUNC (date) function returns date with the time portion of the day truncated to the unit specified by the format model fmt. The value returned is always of datatype DATE, even if you specify a different datetime datatype for date. If you omit fmt, then date is truncated to the nearest day. Please refer to "ROUND and TRUNC Date Functions" for the permitted format models to use in fmt.
{code}
I have no resolution for this problem yet.
Who had passed this case and had resolution? Please tell me your way
Thanks so much.
---Omni -
Hi :
I am working on Plant Maintenance module, i extracted work orders ( aufnr ) from AUFK based on some conditions.
In the selection screen i have s_date option where the user can give any date range .my question is ...after selecting all the work orders, i want to count work orders whose status is conformed and date condition is " For the calender week X, work order actual end date ( getri ) should not be later than the week ending of sunday night 11:59pm " .
Here calender week X, starts on monday morning 00:01 am and ends sunday night 11:59pm
I am able to extract work orders whose status is conformed , but i need logic for tha date condition based on the time ie, end date should not be later than the week ending of sunday night 11:59pm.
points will be rewarded ..
Thx.
Raghuif you want the current date and time you can check with sy-datum or sy-uzeit.
Or you can find if there is any date and time fields in the table and compare them against the date you want to.
I am not sure if youa re looking for this. -
How to cummulate the quantity based on the date condition?
hi,
In my query,i need to cummulate the open quantity based on the two date condition.
If my Schedule line date > system date, i need to cummulate the open quantity.
But in my query level i am getting 0 or 1 based on the above condition.
i am struggling to cummulate the open qty based on the above condition.
can any body throws an idea to resolve my issue.
Regards,
ravi.Thanks for suggestion,Almost i narrow down my issue to get the proper result.
But i have one doubt.
Is it possible to user Formula variable (Processing by replacement path-Reference char as Scheduline date) in my Calculated Key Fig calculation.?? But here i am created Scheduline date as Characher infoobject.
Actually i am created Scheduline date as Character InfoObject,If i am using the following condition like
(Schedule line date > system date) its throwing "X" value.
For the above issue,if i am changing the Scheduline date as Key figure InfoObject means i will get the proper output for the condition(Schedule line date > system date) either 0 or 1.
Is it correct????
Regards,
Ravi. -
Date condition in BEx is getting converted as String prompt in Crystal
Hi,
The Date condition in BEx is getting converted as String prompt in Crystal Reports.
User is not getting the flexibility to select date using Calendar option because of string type
Please advice
Thanks,
VishalPost your question BEX and B1 and classic SAP data source issues to the Integration Kit forum
-
it's possible modify or add a master data condition (price) for the purchising agreement using a bapi_po_change?
Edited by: francesco aiello on Jul 26, 2010 12:12 PMHi Francesco
Check the link below [http://www.sap-img.com/abap/sample-abap-code-on-bapi-po-change.htm] -
how to print data conditionally in Adobe forms ,
do anyone have step by step screen shot tutorials of adobe , please forward and definitely
be rewarded.
Ankeshthanks
-
How to use the MAX DATE condition in WHERE CLAUSE FILEDS
Hi,
I am trying to fetch the result for getting maximun date but when i try to execute the query i am getting the error as follows.
CONDITION : trunc(max(RD.DATERECEIVED)) BETWEEN TO_DATE('01/08/2011','DD/MM/YYYY') AND TO_DATE('01/08/2011','DD/MM/YYYY')
ERROR: Group function is not allowed here.
CHEERS,
PRABU AMMAIAPPANI see a couple of problems here.
First, what you posted below is not a syntactically valid query. It seems to be part of a larger query, specifically, this looks to be only the GROUP BY clause of a query.
Prabu ammaiappan wrote:
Hi,
I Have a group function in the Query. Below is the Query i have used it,
GROUP BY S.FREIGHTCLASS,
R.CONTAINERKEY,
S.SKU,
S.DESCR ||S.DESCRIPTION2,
S.PVTYPE,
RD.LOTTABLE06,
R.WAREHOUSEREFERENCE,
RD.TOLOC,
R.ADDWHO,
R.TYPE,
S.CWFLAG,
S.STDNETWGT,
S.ORDERUOM,
R.ADDDATE,
C.DESCRIPTION,
(CASE WHEN P.POKEY LIKE '%PUR%' THEN 'NULL' ELSE to_char(P.PODATE,'dd/mm/yyyy') END),
NVL((CASE WHEN R.ADDWHO='BOOMI' THEN RDD.SUPPLIERNAME END),SS.COMPANY),
RDD.BRAND,
S.NAPA,
RD.RECEIPTKEY,
R.SUSR4,
P.POKEY,
RDD.SUSR1,
r.STATUS, DECODE(RDD.SUSR2,' ',0,'',0,RDD.SUSR2),
rd.SUSR3Second, the answer to your primary question, "How do I add a predicate with with a MAX() function to my where clause?" is that you don't. As you discovered, if you attempt to do so, you'll find it doesn't work. If you stop and think about how SQL is processed, it should make sense to you why the SQL is not valid.
If you want to apply a filter condition such as:
trunc(max(RD.DATERECEIVED)) BETWEEN TO_DATE('01/08/2011','DD/MM/YYYY') AND TO_DATE('01/08/2011','DD/MM/YYYY')you should do it in a HAVING clause, not a where clause:
select ....
from ....
where ....
group by ....
having max(some_date) between this_date and that_date;Hope that helps,
-Mark
Maybe you are looking for
-
How to view long chapter titles without abbreviation for audiobooks in music app?
Many of the names of the chapters of the audiobooks I listen to in the music app are extremely long (i.e., more than 22 characters). However, I cannot find a way to display more than the first ~22 characters. When I start playing an audiobook, I cli
-
I have Office 365. I have Outlook 2013 downloaded on my computer with all my emails and contacts, etc. I want to import the entire PST file with my emails, contacts etc. into Office 365 / Exchange Online (cloud?). Once that is done, I want to set it
-
HTTP 403 Service Error, HTTP 500 Internal Server Error
My scenario is: Rfc adapter --> XI --> WebService I am get the following error(403,500) at the Call adapter. I like to know whether the following error occurs due to the timing out occuring as the client is not sending back a response? Any suggestion
-
Hi experts please help me to write the logic to the below requirement 1) Identify header materials with Material Type & Plant, Material Group , Material Number a) Go to MARA table get the material list for material type, material group, mat
-
MS Excel - can't enter data after a few minutes of operation
Ever since upgrading to Yosemite, MS Excel partially freezes after a few minutes of being open. Specifically, I cannot enter data or numbers into any cell, although other functions (including cut/pasta and entering data in the Search box) continue f