Did you replace "1.pattern" with a reasonable string to identify the start of your table, and "2.pattern" with sth. to recognize its end? Post the command you applied!
Your awk statement does exactly what you tell it to do:
If "pattern $$ $$" is matched, switch "on" to TRUE (= 1).
If "pattern" is matched, switch "on" to FALSE (= 0).
If "on" == TRUE, print the actual line.
The problem you encounter is that you switch on and off in adjacent actions on the same input line, so the script has no chance to print anything. So the task resolves to scrutinize the data to find patterns that can't be intermixed to switch printing on and off AND carefully formulate regexes that uniquely identify either.
BTW - my earlier statement that awk does not recognize sed like address ranges was wrong - apologies for that. So your original ansatz was OK in priciple (syntax error mayhap due to the comma after the awk program) but suffered from above - find the right patterns. Try this:
1) T'was the same error you encountered before: $$ was present at the end of the starting pattern and thus closed the address range immediately, printing exactly that one line. Adding the "^" told awk to look for $$ as the first chars in the line, making it ignore those at the end and thus extending the range.
2) I would not phrase it like so, but yes, you could imagine implicit ons and offs in that command.
3) Yes, by carefully rearranging the sequence of commands in the awk program:
You want to leave out the switching line - so switch off before print and switch on after print.
I don't see a reason why it should not work on a single line except that awk might have difficulties and needed some help to separate the pattern {action} pairs.
the only way I could make sense of why that works is awk prints out whatever line that are between the two patterns, without much directionality.
/pattern2/ {on=0} on
when pattern2 is found, store the lines but do not print, is that correct?
/pattern1/ {on=1}
when pattern1 is found turn on print. But pattern 1 occurs before pattern 2 in the table. So what is it printing? I think awk works its way down the table as it executes the command, so that code doesn't make much logical sense to me. Or does it not work like that?
Please try diving in deeper into awk by reading man pages or other literature. awk in very general terms does the following: execute the BEGIN action (if exists), then read input line after line, and apply the program steps given sequentially to each line. Program steps consist of pattern {action} pairs, in priciple. Whenever a pattern evaluates to TRUE, execute the action. The default action is {print}. So in your case
... # read line
/pattern2/ {on=0} # does closing pattern occur in the line --> store THE FACT (implies not printing the closing line)
on # default print if on (on == TRUE), don't if FALSE
/pattern1/ {on=1} # does opening pattern occur in the line --> store THE FACT (implies not having printed the opening line)
...
So, as you can see, by carefully arranging the steps you can tailor the output to your needs.
BTW - you could, of course, append the down-the-line awk processing that you mentioned before into the above awk program...