vanithasree

vanithasree

57 Articles Published

Articles by vanithasree

Page 4 of 6

How can we write MySQL handler, in a stored procedure, that throws an error message and continues the execution?

vanithasree
vanithasree
Updated on 12-Feb-2020 882 Views

As we know that whenever an exception occurred in MySQL stored procedure, it is very important to handle it by throwing proper error message because if we do not handle the exception, there would be a chance to fail application with that certain exception in a stored procedure. MySQL provides a handler that throws an error message and continues the execution. To demonstrate it, we are using the following example in which we are trying to insert a duplicate value in a Primary key column.Examplemysql> DELIMITER // mysql> Create Procedure Insert_Studentdetails(S_Studentid INT, S_StudentName Varchar(20), S_Address Varchar(20))    -> BEGIN   ...

Read More

How can we get an idea about the server performance from the output of MySQL?

vanithasree
vanithasree
Updated on 11-Feb-2020 130 Views

After running a query, MySQL returns the number of rows and gives time in the output that shows how much it took for running that query. As for example, if we run the following querymysql> create table e1(id int); Query OK, 0 rows affected (0.23 sec)It is showing the time (0.23 sec).

Read More

How to set the whitespace between text in CSS?

vanithasree
vanithasree
Updated on 31-Jan-2020 263 Views

To set the whitespace between text, use the white-space property. Possible values are normal, pre, nowrap.ExampleYou can try to run the following code to set the whitespace between text in CSS:                            This text has a line break and the white-space pre setting tells the browser to honor          it just like the HTML pre tag.    

Read More

Set the font family with CSS

vanithasree
vanithasree
Updated on 30-Jan-2020 463 Views

The font-family property is used to change the face of a font. Possible value could be any font family name.                            This text is rendered in either georgia, garamond, or the default serif font          depending on which font you have at your system.          

Read More

With the help of function, how can we return the difference in Year, Month and Days between two date values?

vanithasree
vanithasree
Updated on 29-Jan-2020 141 Views

We can create a function, which accepts the date values as its argument and returns the difference in year, month and days, as followsmysql> CREATE FUNCTION date_difference(Date1 DATE, date2 DATE) RETURNS VARCHAR(30)    -> RETURN CONCAT(    -> @years := TIMESTAMPDIFF(YEAR, date1, date2), IF (@years = 1, ' year, ', ' years, '),    -> @months := TIMESTAMPDIFF(MONTH, DATE_ADD(date1, INTERVAL @years YEAR), date2), IF (@months = 1, ' month, ', ' months, '),    -> @days := TIMESTAMPDIFF(DAY, DATE_ADD(date1, INTERVAL @years * 12 + @months MONTH), date2), IF (@days = 1, ' day', ' days')) ;    Query OK, 0 ...

Read More

How does comparison operator work with date values in MySQL?

vanithasree
vanithasree
Updated on 28-Jan-2020 224 Views

Comparison operator between dates will work in a logical way. In the following example, while comparing two dates, MySQL is simply comparing two numbers or string −mysql> select 20171027 < 20150825; +---------------------------+ | 20171027 < 20150825       | +---------------------------+ |                      0    | +---------------------------+ 1 row in set (0.00 sec)The 0 output shows that the result of the above query is FALSE.mysql> select 20171027 > 20150825; +--------------------------+ | 20171027 > 20150825      | +--------------------------+ |                      1   | +--------------------------+ 1 row in set (0.00 sec)The output ‘1’ shows that the result of the above query is TRUE.

Read More

In MySQL, when VARCHAR data type will use 1-byte and when 2-bytes prefix length along with data?length along with data?

vanithasree
vanithasree
Updated on 28-Jan-2020 213 Views

As we know that in MySQL, VARCHAR values are stored as a 1-byte or 2-byte length prefix plus data. This length prefix points out the number of bytes in the value of data. The data value itself will decide that when VARCHAR data type will use 1-byte and when 2-byte prefix length.A column uses 1-byte length if values require no more than 255 bytes.A column uses 2-byte length if values may require more than 255 bytes.

Read More

What is onclick event in JavaScript?

vanithasree
vanithasree
Updated on 08-Jan-2020 682 Views

The onClick event is the most frequently used event type, which occurs when a user clicks the left button of the mouse.ExampleYou can put your validation, warning etc., against this event type.Live Demo                                         Click the following button and see result                          

Read More

How to create an ALV in docking container in SAP?

SAP
vanithasree
vanithasree
Updated on 12-Dec-2019 774 Views

Wa_fieldcat is a structure used as a container for the information that has to be added to t_fieldcat.Following Parameters are passed:                                *  pv_field   TYPE any for Field                               *  pv_tabname TYPE any for Table Name               *  pv_coltext TYPE any for Header TextThese variables can’t append under t_fieldcat without putting them in a unified structure.

Read More

Using SAP Tables from C# application - RFC_READ_TABLE

vanithasree
vanithasree
Updated on 10-Dec-2019 793 Views

Many users use RFC_READ_Table as API for generic table access.Joins are not supported in RFC_READ_TABLE - Not correct as you can any time join your application. If you face any issues, you can ask user ABAP developer to create a Function Module.Select * query does not work for most cases as the data_buffer_exceed error is thrown- You shouldn’t run select * all the time as you don’t need all the data. You should only pull information that is required.

Read More
Showing 31–40 of 57 articles
Advertisements