Hi carp,
I like kluge but it didn't work (results are blank and when I remove it then there are results). The field is a DateTm type. I was hoping that I could have it in my oracle query but I think I can use the program that I will be importing the data to summarize it, etc. to change the "."...
When I select the field "DTTM_STAMP" and look at "View SQL", it has "TO_CHAR(CAST((DTTM_STAMP) AS TIMESTAMP),'YYYY-MM-DD-HH24.MI.SS.FF')" (result example: 04/10/2019 3:16:59PM).
I thought this expression "TO_CHAR(CAST(DTTM_STAMP) AS TIMESTAMP),'YYYY-MM-DD HH24:MI:SS') would work but it doesn't...
The fees highlighted in red are the ones I need returned in the SELECT statement. Some classes will only have a "CLASS" or "COURSE" level but some will have both and if they have both then I only want to return the "CLASS" level.
Class Level Type Nbr Amt
[highlight #EF2929]TEST...
I'm using Oracle 11. I have thousands of records so this is just a quick example:
Table
Nbr Mon Tues Wed Thurs Fri Sat Sun Start_Date End_Date
1 Y N Y N Y N Y 12/2/2019 12/14/2019 (Mon, Wed, Fri and Sun have 'Y')
2 N N Y Y N N N 12/4/2019 12/5/2019...
Change DATE and also a TIMESTAMP to just a date 'MM/DD/YYYY'
Table1:
Example in the date field: 2013-03-28 22:14:44. Need to have it as 03/28/2013
Table1 if null: 01/01/1900
Table 2:
Example in the timestamp field in table2: 2010-01-02 00:00:00.000000. Need to have it as 01/02/2010
Help is...
Extract after and between spaces in a string
1. If I want to extract "in a string" so any string after the 5th space.
2. If I want to extract "between spaces" so any string between the 3rd space and 5th space.
Help is appreciated.
Thank you!
Dayofweek Values in the fields
MON Y
TUE Y
WED N
THU Y
FRI N
IF MON='Y' THEN 'M'
IF TUE='Y' THEN 'T'
IF WED='Y' THEN 'W'
IF THU='Y THEN 'H'
IF FRI='Y' THEN 'F'
Results needed
MTH since MON,TUE and THU has 'Y'
Thank you for your help!
In the future, new attributes could be added to the database so this is why I don't want to list them in a select statement.
Table
ID SUBJECT ATTRIBUTE
1 TEST CN
1 TEST TE
1 TEST AO
2 TESTING
3 PLACE_TEST CN
Results wanted
ID SUBJECT CN TE AO
1 TEST...
When I don't have Title as a field and in the GROUP BY
ID Term Effective_Date(Year)
1 1175 2015
1 1145 2012
1 1135 2012
When I add Title as field and GROUP BY
ID Term Effective_Date(Year) Title
1 1175 2015 Placement Testing (I just want this title in effective date's year 2015 since 2015 is...
Hi Bill,
It works great if I don't have the TITLE as a field. When I add it then I get the error "ORA-00979: not a GROUP BY expression."
Thanks for your help!
Are the results needed toward the bottom of this post, even possible? I hope I've explained it so it makes sense.
TABLES:
MAIN TABLE
ID TITLE EFFECTIVE_DATE (This is in the table as string and not date)
1 Placement Testing 10/01/2015
1 Testing...
CSV FILE
ID SUBJECT CLASS
1 art 100
1 art 101
1 test 500
2 art 501
3 rec 500
3 rec 502
3 rec 504
3 rec 600
3 lan 100
3 craft 100
Results wanted (Just the subject that has top #classes per id)
ID...
In Oracle, I can have in the criteria:
test_table.id = email_table.id (+)
AND
NVL(email_table.primary_email(+),'Y')
WHAT IT DOES:
If the test_table.id and email_table.id is the same and the email_table.primary_email='Y' then have 'Y' else '' in the email_table.primary_email results so...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.