simple but challenging ignore case

Folks - I found this code on the forums to extract a paragraph for a matching pattern but I don't know how to make it ignore case.
grep "-ip" is not an option for me as I am on SUSE LINUX.
Thanks for ur help.

I run this script as below:

grep_para.ksh sqlstate < logfile

"The end result should include entries if there is a match for "sqlstate" or "SQLSTATE".

#!/bin/sh
sed -n '
# if an empty line, check the paragraph
/^$/ b para
# else add it to the hold buffer
H
# at end of file, check paragraph
$ b para
# now branch to end of script
b
# this is where a paragraph is checked for the pattern
:para
# return the entire paragraph
# into the pattern space
x
# look for the pattern, if there - print
/'$1'/ p

=====================================

Here's an awk way for doing that...

awk 'tolower($0) ~ "sqlstate"' file
grep_para.ksh '[Ss][Qq][Ll][Ss][Tt][Aa][Tt][Ee]' < logfile