Multiple lines to single line

I have code as below

# create temporary table `temp4277`(key(waybill_no))
                               select waybill_no,concat_ws('',card_type,card_series_no) cardinfo
                               from rfid_temp_ticket where waybill_no='4277'
                               group by waybill_no,concat_ws('',card_type,card_series_no)
/*!*/;

It start with create temporary table ans ends with /*!*/;

I used

cat  /tmp/filetest.txt | tr -d '\n'

But Need to include conditional based with starts and end points

What would you like the result to look like?

Result Should be into single line

# create temporary table `temp4277`(key(waybill_no))             select waybill_no,concat_ws('',card_type,card_series_no) cardinfo                    from rfid_temp_ticket where waybill_no='4277'                group by waybill_no,concat_ws('',card_type,card_series_no) /*!*/;

Try:

awk '/create temporary table/{ORS=""} $1=="/*!*/;"{ORS=RS}1' file

With sed

sed -e '/# create temporary table/{' -e ':L' -e '$b' -e 'N; s/\n//; \#/*!*/;#!bL' -e '}' filetest.txt