views:

82

answers:

2

I'm porting a sybase application to mysql and of course there's tons of sql compatibility issues, but one that I don't see an easy way out of without changing every single sql is that in sybase you can refer to a table by db..table notation, but in mysql it requires db.table. I'm kinda on mysql's side on this one, but this is what it is. Is there a way to get mysql to accept that syntax?

+1  A: 

use a program like notepad++ that has the ability to search and replace across a whole directory of files. do a search for .. and replace with .

longneck
or a command-line tool like sed which you can run all your files through if it's a big task.
Deverill
Yes, I just had eclipse do that to see what would happen.It's amazing how many ellipses and other uses for .. there are in code.
stu
A: 

I ended up doing something like this:

global replace .. with " + Defs.DELIMETER + "
Then replace " + Defs.DELIMETER + ".  with ...  to take care of elipses
Then replace " + Defs.DELIMETER + "" + Defs.DELIMETER + "  with .... for those cases.

That got most of them. So at least now it's easily changable.

stu