SAP HANA SQL Script – First Steps

Hello all to the very first SAP HANA SQL Script specific tutorial post. In this post, we talk about what SQL is, how it is relevant in HANA development and if it is as hard as it appears to be.

Over the years, while working on different developments in SAP, the one constant I always found funny was that whenever I had a screen open with some random lines of code open, anyone who saw me looked at me as a genius. Coding is a fear that many SAP back end developers carry around without ever facing it. Through my series of tutorials, I intend to present SQL of HANA in a simple and fun way to my audience so that you can finally see how handicapped you currently are how powerful you can become with the knowledge of SQL. Trust me with your time and patience and I assure you of excellence.

What is SAP HANA SQL Script now?



To anyone new to technology, let’s talk about what SQL really is. SQL stands for Structured Query Language and is used to communicate with the database. It’s a language that relational databases understand. So if you want to ask a school’s database to provide you the list of students from the sixth grade with attendance less than 50%, all you need is a simple SQL request to get the data. Such requests are called “Queries”. Similarly, there are different type of commands for different purposes – to add data to the tables in database, to change data, renaming tables and many more.

With my enterprise HANA tutorials, you will see that you don’t need to code to create most views and tables in HANA. You have a simple graphical interface to drag and drop and create the logic you need. But there are some times where it’s more flexible to create an HANA object with SQL and I personally find it more fun to do so. Plus sometimes, performance issues cause developers to switch to SQL also as it gives you the ultimate power to run a SQL query in the best way you feel fit. Whenever you use a standard graphical logic without coding, you allow the software to decide the best path of execution (which is never a bad thing as usually it knows the optimal way) but if softwares were perfect, you and I would be looking for other lines of work.

Bottom-line is that SQL makes gives you the raw power to do amazing things and by choosing to be afraid, you let go of an opportunity to excel at your craft.

Can you pick up HANA SQL with no coding experience?



I started learning SQL from scratch starting with basic statements working all the way up to complex queries and that will be how I structure this tutorial – just the way I picked it up. Again, with ample amount of time, practice and regularly reading these tutorials, I assure you that you will be a great SQL coder in no time.

Be sure to help this website grow by using the share buttons to spread this post on social media. This will also keep me motivated to write more.

Watch out for more tutorials coming soon.

Goodbye for now future SQL Experts!SAP HANA SQL Script

<<Back to Home Page                                                                                                             Next Tutorial>>

Content Protection by DMCA.com
Tagged , , , , , .

20 Comments

  1. Outstandingly insightful bless you, I believe your followers could just want far more items such as this continue the good hard perform.
    coupons

  2. Hi Shyam,

    Can we get a short introduction about performance tuning and analytical privileges in HANA also.

    Thanks in advance,

    Manue

  3. Hi Shyam,

    Thanks for your reply, I have got few doubts in HANA.

    1) What is the advantage of CV of type cube over CV of cube with star join and vice versa as we can achieve the requirement in both the models , is this only to use the power of OLAP engine?
    2) Can you help me with some sample scenarios to go with table functions (CV of type sql script)?
    3) Why was xml procedure depreciated and hdb procedure came into picture?
    4) can we also get a small session about query optimization and debugging?

    Thanks in advance.

    Manue

    • 1. I’ve not seen anyone using Star joins. Nor have I heard of anyone getting performance benefits from it.Just use the regular calculation view. There are lots of options around which you may never use.
      2. Try transposing a data set just like you do in Excel with table functions.. it’s an interesting use case for SQL based views or table functions. It can also be done with graphical views but would be simpler with SQL. Try both ways.
      3. XML procedures or .procedures are now depreciated by SAP. .hdbprocedures are preferred for better change management, transport management and are also supported by SAP.
      4. Will try to write one as soon as I can.

      Thanks for reading!

  4. Hi. Thanks for the kind words. Please do support the site by sharing documents that you like on social media.
    Regarding CE functions – No.. I won’t be writing about them as they have been obsolete for a few years now.
    Any document or website that tells you to use them is probably not updated and you should ideally read from updated sources.

    CE functions should never be used and is a bad practice in development.

  5. Excellent Shyam. I have gone throught the site completely and one of the best sites around to learn HANA. The site is very clear.

  6. Hi Shyam,

    i was searching for site for learning HANA and recently came across with this site, I have started my learning and what I can say is it is one of best site the way you have explained everything it makes easier to understand thanks for your efforts. Hoping you will share more real time examples and developments so that we can relate the things.

  7. i have one dought in cv,

    in cv we have two columns one is from date and the other is to date in the same table i used to put a input parameter on a single date field, but when we pass the value to the date it should check the values in from date and to date.

  8. I have a fobia about coding, in fact I tried with my blogs and tutorials to overcome that… First time feeling happy and quite confident on SQL after reading this blog. Expecting more info on Bw/4 Hana. Many thanks.

    • You are welcome. It’s ok to be afraid of coding. It’s just not ok to give up. Keep trying .. ask your doubts ..get better.

Leave a Reply