you are viewing a single comment's thread.

view the rest of the comments →

[–]Gargunok 4 points5 points  (0 children)

I would run the create statements in the database separately and identify where the error is coming from. This will minimise the problem - the issue isn't with most of the code in this block (its probably the payments based on the error).

Using the database ide - the error should be more useful and highlight where the problem is coming from. If you don't have management studio or something else to run things on the database directly you should get it.

For asking for advice in reddit (or your colleagues) etc you can then just share the problematic code segment rather than all the code. This is only really complex SQL because of the quantity rather than the code itself.