Re: EuSQL Dash Bug

new topic     » goto parent     » topic index » view thread      » older message » newer message

cklester wrote:
> 
> Matt, remember that problem I was having with EuSQL adding spaces around
> commas? It is doing that to dashes, also. Helllp! :)

In preprocess_sql(), replace the first while loop with this:
-- ensure proper spacing of equality operators for tokenization
	ix = 1
	in_quote = 0
	while ix <= length( sql ) do
		if sql[ix] = '\'' then
			in_quote = not in_quote
		elsif not in_quote and find(sql[ix], ";><=()+-*/" ) then
			if ix < length(sql) and find(sql[ix+1],"<>=;") then
				ix += 1
			else
				sql = sql[1..ix-1] & 32 & sql[ix] & 32 & sql[ix+1..$]
			end if
			ix += 1
		end if
		ix += 1
	end while


Matt Lewis

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu