I am using Db2 on Cloud database. the scenario is users can create posts, and other users can create comments. Each post/comment has corresponding data in another database that requires being deleted too once any post/comment is deleted. So I need to fetch every comment id on a post being deleted and all of the comments of the comments, and all the comments of those comments, and comments on those comments (could go on forever). I am having difficulty writing this what seems to be recursive SQL statement to select all of the id's for all these elements.
What I've been trying: SELECT CONNECT_BY_ROOT id AS id, parentId AS parentId, threadId AS threadId, LEVEL AS level FROM post_comment START WITH parentId = 1 CONNECT BY threadId = id
Gives error: "Unexpected token 'CONNECT BY' following "", expected """
I have been on this issue for days with no progress. I'm too busy to chat via a call or session but if you could simply write up this SQL statement for me correctly and it return all the child ids based on the post/comment parentId I would gladly pay you for your efforts.
17 freelancers estão ofertando em média $447 nesse trabalho
Hi, Dear. I have a lot of experience in web development. I think myself a satisfied developer for your job. I can work fulltime remotely for you. I will wait for you reply. Sincerely.
Hi, Please message me and I'll get you the DB2 SQL statement you need. I'm Colorado-based but currently in Boston (Eastern Time); message me at any hour though. Thanks! RC
Hi, I can help you on your Select/Delete statements. I charge $50/hr. I would require a walk through of your code before we start off. Please message me to discuss further. Thanks.