SQL Stored Procedures | Snowflake Scripting

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 ก.ค. 2024
  • In this video we take a look at SQL Stored Procedures using Snowflake Scripting. We cover variable declaration, variable binding, assigning values to variables and conditional logic.
    Felipe Hotta's Medium article:
    / sql-scripting-live-in-...
    ❄️Want to SUPERCHARGE your career and become an EXPERT in Snowflake??❄️
    Mastering Snowflake is accepting applications now to work with us in a small group. Serious inquiries only please!
    forms.gle/WBqadnG7Y4tNe1wt8
    ❄️Order my book: Mastering Snowflake Solutions HERE: ❄️
    Amazon UK - www.amazon.co.uk/Mastering-Sn...
    Amazon US - www.amazon.com/Mastering-Snow...
    Amazon AUS - www.amazon.com.au/Mastering-S...
    Amazon IND - www.amazon.in/Mastering-Snowf...
    ❄️Get my Free SnowPro core guide HERE: ❄️
    program.masteringsnowflake.co...
    ❄️Become a student on my course: ❄️
    Snowflake Practice Questions - SnowPro Core Certified Udemy Course www.udemy.com/course/snowflak...
    Get your Matillion Associate Certification FAST!
    www.udemy.com/course/matillio...
    ❄️Connect with me on Linkedin:❄️
    / adammorton121
    00:00 - Introduction
    02:38 - example stored proc
    04:22 - variable declaration
    06:37 - binding variables
    08:00 - assign value to variables
    09:10 - execute immediate
    10:20 - conditional logic
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 18

  • @thedopeshowh
    @thedopeshowh ปีที่แล้ว +1

    great tutorial!
    my company is migrating out of Oracle to Snowflake and this just gave me some great insight as to where i need to start learning.
    Thanks for posting!

  • @aravindt7723
    @aravindt7723 ปีที่แล้ว

    Very Nice 👌

  • @shaxxie5237
    @shaxxie5237 3 หลายเดือนก่อน

    the main thing i came here for was to see how to pass in a parameter into a SP by calling it. IT would be great if you could show this.

  • @hasanmougharbel8030
    @hasanmougharbel8030 ปีที่แล้ว

    Hey there, i feel blessed to keep in touch with you, through asking questions.
    As a newbie sql learner i have a general enquiry.
    I learned that a module can contain routines, procedures, or SQL commands.
    What is the distinct difference between those three components.
    Thanks for taking care of this.

    • @mastering_snowflake
      @mastering_snowflake  ปีที่แล้ว

      Hey, can you explain what you mean when you refer to a 'module' please?

  • @EricaBerry232
    @EricaBerry232 3 หลายเดือนก่อน

    Is a stored procedure the only way to execute multiple SQL statements?

  • @tejasnaik4604
    @tejasnaik4604 ปีที่แล้ว +1

    we can do overloading of procedure, exception handling like oracle in store procedure.

    • @mastering_snowflake
      @mastering_snowflake  ปีที่แล้ว

      Can you explain what you mean by ‘overloading’ please?

  • @mukunthans3441
    @mukunthans3441 ปีที่แล้ว +1

    Hi Adam, when I used strored procedure to access query_history view using sysadmin role..I am getting following error "Requested information on the current user is not accessible in stored procedure" kindly do the needful

    • @mastering_snowflake
      @mastering_snowflake  ปีที่แล้ว

      Please check the role you’re using in snowflake has the correct privileges

  • @AR-Exp
    @AR-Exp ปีที่แล้ว

    I want to "create or replace table as 'select * from view' " using stored procedure, and execute the procedure at 6 AM Daily, Do I have to make a task that executes the procedure?

  • @nagajyothivanapalli5147
    @nagajyothivanapalli5147 ปีที่แล้ว +1

    Thanks for your video Can we use cursor loop (same as plsql)

    • @mastering_snowflake
      @mastering_snowflake  ปีที่แล้ว

      Generally you are probably best to use JavaScript stored procs for looping and SQL for set based workloads.

    • @nagajyothivanapalli5147
      @nagajyothivanapalli5147 ปีที่แล้ว

      @@mastering_snowflake could you please help me Any videos available .please share me i will try to understand

  • @shashankm2859
    @shashankm2859 ปีที่แล้ว +1

    how do we print successful message after each step ran successfully in SQL proc in order to debug it?

    • @mastering_snowflake
      @mastering_snowflake  ปีที่แล้ว

      stackoverflow.com/questions/59145016/print-snowflake-query-in-stored-procedure

    • @shashankm2859
      @shashankm2859 ปีที่แล้ว

      @@mastering_snowflake Thanks for replying. That is for Java Script, how about in SQL procedure?