How to write SAP HANA Dynamic SQL Query Examples Examples: CREATE PROCEDURE DYNAMIC_QUERY1(IN TABLE_NAME VARCHAR(20)) AS BEGIN DECLARE QUERY VARCHAR(200); QUERY:='SELECT * FROM ' || :TABLE_N…
SAP HANA IF Statement Using AND and OR example TEMP_TABLE DATA ----------------------- ID NAME AGE --- --------- --- 1 PETER 23 2 DANIEL 45 3 ROSEMARY 22 4 …
SAP HANA Insert or Update Data Based on condition SQL Queries Example Here is a way to decide whether to insert or update data on the condition of a variable content. Example CREATE PROCEDURE…
following is the SAP HANA SQL Query to display all month names from current year until date: do begin declare i int := 0; tMo = select '' mo from dummy; while i < 12 do tMo = sel…
In this article we will look into FORMAT function in SQL Server to format the date and time. Suppose to get DD/MM/YYYY use SELECT FORMAT(getdate(),'dd/MM/yyyy') as date another example MM-DD…
There are some keyboard shortcuts to improve productivity with this tool. What I found: F8 :execute Query F9 :execute Query where Cursor is (Query means SQL Statements separated by semicolon ) Ctr…
Name Description CUME_DIST Calculate the cumulative distribution of a value in a set of values DENSE_RANK Assign a rank valu…
SQL Server offers a few ways of running a dynamically built SQL statement. Here are a few options: Writing a query with parameters Using EXEC Using sp_executesql Dynamic SQL by writing a…
Following is the list of String function in SQL Server with their use: Function Description ASCII Return the ASCII code value of a character …
Social Plugin