Monica Mona has Published 85 Articles

How can I use MySQL IF() function within SELECT statement?

Monica Mona

Monica Mona

Updated on 10-Feb-2020 10:40:37

3K+ Views

It is quite possible to use MySQL IF() function within SELECT statement by providing the name of the column along with a condition as the first argument of IF() function. To understand it, consider the following data from table ‘Students’.mysql> Select * from Students; +----+-----------+-----------+----------+----------------+ | id | Name   ... Read More

How can we reverse a MySQL string connected by the dash?

Monica Mona

Monica Mona

Updated on 07-Feb-2020 11:10:47

47 Views

MySQL has function name REVERSE() with the help of which we can reverse the string. But suppose if we want to reverse the string connected by dash then by using REVERSE() function will not give appropriate result as shown in the following example:mysql> Select REVERSE('AB-CD-EF'); +---------------------+ | REVERSE('AB-CD-EF') | +---------------------+ ... Read More

What are the similarities and differences between MySQL ORD() and ASCII() functions?

Monica Mona

Monica Mona

Updated on 07-Feb-2020 06:41:57

185 Views

MySQL ORD() function returns the code for the leftmost character if that character is a multi-byte i.e. sequence of one or more bytes, with the help of the following formula(1st bytecode) + (2nd bytecode * 256) + (3rd bytecode * 256^2)On the other hand, ASCII() function returns the ASCII value ... Read More

In MySQL, how to remove the specific prefix from entire column’s value and update them?

Monica Mona

Monica Mona

Updated on 06-Feb-2020 06:44:36

1K+ Views

It can be done by applying TRIM() function on the column along with MySQL UPDATE statement. The example below will make it more clear.ExampleSuppose, we have a table ‘Employee’ which have the prefix ‘Dept.’ with all the values of Column ‘Department’ as follows −mysql> Select * from Employee; +------+----------------+------------+----------------------+ | ... Read More

What is the difference between MySQL LOCATE() and FIND_IN_SET() functions?

Monica Mona

Monica Mona

Updated on 03-Feb-2020 06:14:05

362 Views

As we know, both the functions are used to search a string from the arguments provided in them but there are some significant differences between them as followsFIND_IN_SET() function uses the string list that is itself a string containing the substring separated by commas. Whereas, LOCATE() function contains a string ... Read More

How can we use WHERE condition when creating a table with CTAS (Create Table as Selected) script?

Monica Mona

Monica Mona

Updated on 29-Jan-2020 06:39:37

134 Views

As we know that we can copy the data and structure from an existing table by CTAS script. Use of WHERE clause is demonstrated in the example belowmysql> Create table EMP_BACKUP2 AS SELECT * from EMPLOYEE WHERE id = 300 AND Name = 'Mohan'; Query OK, 1 row affected (0.14 ... Read More

How Can I check the size of the tables in a particular MySQL database?

Monica Mona

Monica Mona

Updated on 28-Jan-2020 10:55:04

203 Views

As we have checked the size of the MySQL database, similarly we can also check the size of tables in a particular database. It can be done as follows −mysql> SELECT     -> table_name AS "Table",     -> round(((data_length + index_length) / 1024 / 1024), 2) as SIZE ... Read More

Difference between SAP Crystal Reports and CR for Visual Studio

Monica Mona

Monica Mona

Updated on 16-Dec-2019 07:40:22

1K+ Views

Crystal Reports for Visual Studio 2010 comes free and you can develop as many reports and can host runtime engine without any cost. Now Crystal Reports has been excluded from Visual Studio by default and you need to download it free from SAP site.You can use the following link for ... Read More

Fetching list of products from SAP: connecting SAP database from .net application

Monica Mona

Monica Mona

Updated on 12-Dec-2019 06:53:34

139 Views

You can troubleshoot by trying a telnet to SAP system.Open a command prompt on the system you are running your .net application and try to telnet server having SAP system installed.Telnet 127.0.0.1 3300If you using a local system, try using a hostname instead of loopback IP address and make an ... Read More

How to Fetch source code of the transaction note in SAP R/3?

Monica Mona

Monica Mona

Updated on 11-Dec-2019 10:31:57

267 Views

If you ever need to fetch the mapped program with a transaction, you need to call the transaction SE93. It will fetch you the program and variant of the selection screen.Now, if you need source code then you can use the transaction SE38 or SE80. If you also require Dynpro ... Read More

Advertisements