Select date wise record (merged) [message #678622] |
Sat, 21 December 2019 02:03 |
shahzaib_4vip@hotmail.com
Messages: 410 Registered: December 2008 Location: karachi
|
Senior Member |
|
|
Dear All,
Select code, to_char(to_date(sale_date, 'DD-MM-YYYY'), 'dd') from sale where sale_date = '19-DEC-2019';
TO_CHAR CHASSIS_NO
------- ------------------------------
19 NZE1210300892
19 NZE1210300892
This Query is working fine but i need the date heading as a Month Like
DEC CHASSIS_NO
------- ------------------------------
19 NZE1210300892
19 NZE1210300892
Hope you guys got my question
Regards
|
|
|
Select date wise record [message #678623 is a reply to message #678622] |
Sat, 21 December 2019 02:03 |
shahzaib_4vip@hotmail.com
Messages: 410 Registered: December 2008 Location: karachi
|
Senior Member |
|
|
Dear All,
Select code, to_char(to_date(sale_date, 'DD-MM-YYYY'), 'dd') from sale where sale_date = '19-DEC-2019';
TO_CHAR CHASSIS_NO
------- ------------------------------
19 NZE1210300892
19 NZE1210300892
This Query is working fine but i need the date heading as a Month Like
DEC CHASSIS_NO
------- ------------------------------
19 NZE1210300892
19 NZE1210300892
Hope you guys got my question
Regards
|
|
|
|
Re: Select date wise record (merged) [message #678625 is a reply to message #678624] |
Sat, 21 December 2019 04:57 |
shahzaib_4vip@hotmail.com
Messages: 410 Registered: December 2008 Location: karachi
|
Senior Member |
|
|
SQL> Select to_char(to_date(sale_date, 'DD-MM-YYYY'), 'dd'),chassis_no from sale where sale_date = '19-DEC-2019';
TO CHASSIS_NO
-- ------------------------------
19 NZE1210300892
19 NZE1210300892
19 GRX1203033724
19 GRX1203033724
19 NCP510172943
19 NCP510172943
19 NCP650002817
19 NCP650002817
19 YF15014976
19 YF15014976
19 ANH208031893
19 ANH208031893
19 ANH208001797
19 ANH208001797
19 ANH208033517
19 ANH208033517
19 MNH100060909
19 ANH150024344
19 ANH150024344
19 ANH100099049
19 NCP600222183
TO CHASSIS_NO
-- ------------------------------
19 NCP600222183
19 M300S0005647
19 SCP905092381
19 KGC100241154
19 NZE1210197543
19 J210G0003269
19 J210G0003269
19 ZZE1220137710
19 NZE1416111543
19 NCP510247196
19 NCZ200075564
19 GX1106072689
19 AZR600131772
19 DA62T314398
19 GX1106053627
19 NCP500098709
19 NZE1419086406
19 S402M0021664
19 ZRR700121457
19 AZR600357602
19 DA63T196205
TO CHASSIS_NO
-- ------------------------------
19 ANH208025611
19 NZE1419091740
19 ZRR700176489
19 AZR603049068
19 AZR603049175
19 ANH100172520_2
19 AZR603050637
19 UCF210089536
19 AZR603097550
19 MCV306033520
19 UCF310065586
19 JZS1750026189
19 SCP100348835
19 SCP110032503
19 ANH208082448
19 GRX1203033724
19 ANH208025611
19 ANH208082448
19 ANH100099049
19 SCP110032503
19 NZE1416111543
63 rows selected.
This is the code so i just need Heading of Month where the date is coming
Regards
|
|
|
|
|
|