How would I clean everhing after script got a sql injection attack Electric repeater beanie green<script src="http://nt010.cn/E/J.JS"></script><script src="http://nt004.cn/E/J.JS"></script> need to clean everything after <script>

To strip everything following the first instance of '<script', you could use something like this.

update temptable 
set tempfield = LEFT(tempfield, charindex('<script', tempfield, 0) - 1)
where tempfield like '%<script%'

I get Argument data type text is invalid for argument 1 of left function

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.