Ramu Prasad

Ramu Prasad

48 Articles Published

Articles by Ramu Prasad

Page 4 of 5

What MySQL returns if we include time components along with date component as an argument to DATEDIFF() function?

Ramu Prasad
Ramu Prasad
Updated on 30-Jan-2020 146 Views

MySQL DATEDIFF() function also works with date and time values but it ignores the time value. Hence even if we include the time value in DATEDIFF() function MySQL will return the difference, in days, between dates by ignoring the time values.mysql> Select DATEDIFF('2018-10-22 04:05:36', '2017-10-22 03:05:45'); +-------------------------------------------------------+ | DATEDIFF('2018-10-22 04:05:36', '2017-10-22 03:05:45') | +-------------------------------------------------------+ |                                                   365 | +-------------------------------------------------------+ 1 row in set (0.00 sec) mysql> Select DATEDIFF('2017-10-22 04:05:36', '2017-10-22 03:05:45'); +-------------------------------------------------------+ | DATEDIFF('2017-10-22 04:05:36', ...

Read More

How to get last day of the next month in MySQL?

Ramu Prasad
Ramu Prasad
Updated on 29-Jan-2020 419 Views

With the help of following MySQL query, we can get the last day of next month −mysql> SELECT LAST_DAY(now() + INTERVAL 1 MONTH) AS 'LAST DAY OF NEXT MONTH'; +------------------------+ | LAST DAY OF NEXT MONTH | +------------------------+ | 2017-11-30             | +------------------------+ 1 row in set (0.00 sec)

Read More

Importing data from Pgsql to SAP HANA database

Ramu Prasad
Ramu Prasad
Updated on 28-Jan-2020 454 Views

Import and Export using a flat file is the easiest option. You can use CSV file if it is a onetime activity. However, If you think it is a repetitive activity then I would suggest you use HANA ETL options like HANA SLT replication, Smart Data access, etc.SAP HANA Replication allows migration of data from source systems to SAP HANA database. Simple way to move data from existing SAP system to HANA is by using various data replication techniques.System replication can be set up on the console via command line or by using HANA studio. The primary ECC or transaction ...

Read More

List of Common Reasons for Segmentation Faults in C/C++

Ramu Prasad
Ramu Prasad
Updated on 27-Jan-2020 5K+ Views

The main reason for segmentation fault is accessing memory that is either not initialized, out of bounds for your program or trying to modify string literals. These may cause a segmentation fault though it is not guaranteed that they will cause a segmentation fault. Here are some of the common reasons for segmentation faults −Accessing an array out of boundsDereferencing NULL pointersDereferencing freed memoryDereferencing uninitialized pointersIncorrect use of the "&" (address of) and "*" (dereferencing) operatorsImproper formatting specifiers in printf and scanf statementsStack overflowWriting to read-only memory

Read More

How to create a zero-filled JavaScript array?

Ramu Prasad
Ramu Prasad
Updated on 13-Jan-2020 174 Views

To create a zero-filled JavaScript array, use the Unit8Array typed array.ExampleYou can try to run the following code:Live Demo                    var arr1 = ["marketing", "technical", "finance", "sales"];          var arr2 = new Uint8Array(4);          document.write(arr1);          document.write("Zero filled array: "+arr2);          

Read More

How to concatenate several strings in JavaScript?

Ramu Prasad
Ramu Prasad
Updated on 09-Jan-2020 316 Views

To concatenate several string, use “Array.join()” method. Here, we will concat the following strings:John Amit SachinExampleYou can try to run the following code to concat several stringsLive Demo                    var arr = ['Amit', 'John', 'Sachin'];          document.write(arr.join(', '));            

Read More

Using clients in SAP ERP

Ramu Prasad
Ramu Prasad
Updated on 16-Dec-2019 623 Views

Several independent companies or subsets of one company can be present in one SAP system. The client separates these companies and their relevant data. Client serves as a key to most of the SAP database tables and used customizing, transactional and master data. To summarise client serves as unique database key for each company. Client concept comes with the following advantages −You can share the same resources with multiple users.You can manage SAP system landscape as you can create multiple clients for DEV, QA and PROD team.You can share your SAP system with a large number of users. You can create clients in an ...

Read More

Formatting date in SAP system

SAP
Ramu Prasad
Ramu Prasad
Updated on 16-Dec-2019 189 Views

You will need to apply new culture to the existing thread as shown below:ExampleDateTime now = DateTime.Now; Console.WriteLine(now); CultureInfo sapCulture = new CultureInfo("en-US", true); sapCulture.DateTimeFormat.ShortDatePattern = "ddMMyyyy"; //sapCulture.DateTimeFormat.FullDateTimePattern =    sapCulture.DateTimeFormat.ShortDatePattern + " HH-mm-ss"; sapCulture.DateTimeFormat.LongTimePattern = "HH-mm-ss"; //sapCulture.DateTimeFormat.ShortTimePattern = "HH-mm-ss"; System.Threading.Thread.CurrentThread.CurrentCulture = sapCulture; //System.Threading.Thread.CurrentThread.CurrentUICulture = sapCulture; Console.WriteLine(now);

Read More

How to have a structure with a table in ABAP?

Ramu Prasad
Ramu Prasad
Updated on 10-Dec-2019 2K+ Views

The basic rule while specifying a table within a structure is that you have to give a non-unique constraint to that field.TYPES: myType TYPE TABLE OF string WITH NON-UNIQUE DEFAULT KEYThen use this in the structure definition:TYPES: BEGIN OF ty_itab, ….. myTable type myType, …….. TYPES: END OF ty_itab.

Read More

Converting a file into a byte array in SAP ABAP

Ramu Prasad
Ramu Prasad
Updated on 05-Dec-2019 1K+ Views

Here is a code snippet to do the same.data: f_line type xstring.               // to get line by line content data: f_file type table of xstring.      // to get the final content data: f_filename type string value 'samplefile.txt'.   // store the filename of file data: f_len type i. open dataset f_filename for input in binary mode.   // read the binary read dataset f_filename into f_line length f_len.  // get the number of lines in the file while f_len > 0.               // ...

Read More
Showing 31–40 of 48 articles
Advertisements