Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
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?
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 MoreHow to get last day of the next month in MySQL?
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 MoreImporting data from Pgsql to SAP HANA database
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 MoreList of Common Reasons for Segmentation Faults in C/C++
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 MoreHow to create a zero-filled JavaScript array?
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 MoreHow to concatenate several strings in JavaScript?
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 MoreUsing clients in SAP ERP
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 MoreFormatting date in SAP system
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 MoreHow to have a structure with a table in ABAP?
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 MoreConverting a file into a byte array in SAP ABAP
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