Wednesday, July 20, 2022

Useful my sql comments

To get the current Date

SELECT * FROM dbname.tablename where cast(rec_add_dt as Date) ='2020-01-08'

To make the primary key as auto increment

ALTER TABLE db.tablename MODIFY id int NOT NULL AUTO_INCREMENT;

To Create Table

create table db.EXAM_RESULT (
   student_name VARCHAR(30) NOT NULL,
   dob DATE NOT NULL,
   percentage  double NOT NULL
);



SELECT * FROM outboundcontact.contactcalldetail;contactcalldetail

Delete FROM outboundcontact.contactcalldetail where idcontactlist=1;

ALTER TABLE outboundcontact.contactcalldetail
Change OriginatorDB OriginatorDN varchar(45);
ALTER TABLE outboundcontact.contactcalldetail
drop column contact_disposition

ALTER TABLE outboundcontact.contactcalldetail
drop column originator_type

ALTER TABLE outboundcontact.contactcalldetail
drop column contact_type


Driver class name  for mySQL 8.0 : com.mysql.cj.jdbc.Driver

<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
<dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
    <version>8.0.11</version>
</dependency>

To find the driver
Control+Shift+T and look for Driver class and find the fullyQualified name of the driver


<second> <minute> <hour> <day-of-month> <month> <day-of-week> <year> <command>
@Scheduled(cron = "0 58 12 * * ?")

To run in specific hour of the day
0 13,14,15 * * * /home/user/command


Useful cron expressions
https://www.baeldung.com/cron-expressions


101.Spring Boot Batch MySQL Database to CSV file_PART1




Finesse gadget integration

 Finesee gadget samples https://github.com/CiscoDevNet/finesse-sample-code URL for js files http(s)://<FQDN>:<port>/desktop/asse...