hello there, god bless your efforts..I have a simple enquiry as new sql learner. How are CTEs different from temporary tables? Thanks for taking care of this.
Great question. There are many differences but the biggest difference is that the CTE has to be used in the current query scope (re-execute the CTE code everytime you want to include those results). The temp table will exist for the entire duration of your session and does not need to be re-executed everytime you want to reference its results.
Do you perhaps know how to reverse this, i have a row with all the emails linked to the project in one cell separated by a ; i need to have all those emails listed each in a row and the project they dealt with
Try to experiment with the PARSENAME function in TSQL. The limitation may be that you need to know the project with the max number of emails, so you can repeat the PARSENAME function that many times. www.mssqltips.com/sqlservertip/6321/split-delimited-string-into-columns-in-sql-server-with-parsename/
Great video. One suggestion... please consider either lowering or omitting the background music because I found it a bit distracting. Thank you, Anthony.
Thanks Anthony, your video is super helpful and very clear explain. Super like! Cheers!
Thank you!
You rock. SQL is so fun. I'm always learning something new. Thank you and thank everyone for sharing.
Thanks for the comment!
You rock for sharing this comment!
Thank you Anthony. I’m learning SQL, Tableau, and Python right now and your videos are so helpful!❤
Thank you for sharing this comment Jordan!
This was really a great help for me
Glad to hear it!
hello there, god bless your efforts..I have a simple enquiry as new sql learner.
How are CTEs different from temporary tables?
Thanks for taking care of this.
Great question. There are many differences but the biggest difference is that the CTE has to be used in the current query scope (re-execute the CTE code everytime you want to include those results). The temp table will exist for the entire duration of your session and does not need to be re-executed everytime you want to reference its results.
How would you take them out of that one column and put them into Email1, Email2, Email3....
Use the STRING_SPLIT function. learn.microsoft.com/en-us/sql/t-sql/functions/string-split-transact-sql?view=sql-server-ver16
Is it work for oracle sql as well?
I believe Oracle has a string aggregate function. You may have to tweak the code a bit. Give it a try and let us know.
Do you perhaps know how to reverse this, i have a row with all the emails linked to the project in one cell separated by a ; i need to have all those emails listed each in a row and the project they dealt with
Try to experiment with the PARSENAME function in TSQL. The limitation may be that you need to know the project with the max number of emails, so you can repeat the PARSENAME function that many times. www.mssqltips.com/sqlservertip/6321/split-delimited-string-into-columns-in-sql-server-with-parsename/
@@AnthonySmoak thank you, I managed to find string_split
Ok great. I was thinking you needed each value as a new column instead of a row. String Split should work. 👍🏽
Will this work if i have it in views and there are alot of inner joins ?
The function should work against a view.
Great video. One suggestion... please consider either lowering or omitting the background music because I found it a bit distracting. Thank you, Anthony.