Re: [GENERAL] convert access sql to postgresql

2007-11-19 Thread Tom Hart
Shane Ambler wrote: Tom Hart wrote: Hey guys. I have a long piece of sql that I'm trying to take out of an existing Access db and modify to work with Postgresql. I've started trying to convert it, but I've come across a problem that I don't even know how to describe, let alone google. Here's t

Re: [GENERAL] convert access sql to postgresql

2007-11-16 Thread Shane Ambler
Tom Hart wrote: Hey guys. I have a long piece of sql that I'm trying to take out of an existing Access db and modify to work with Postgresql. I've started trying to convert it, but I've come across a problem that I don't even know how to describe, let alone google. Here's the function INSERT

Re: [GENERAL] convert access sql to postgresql

2007-11-16 Thread A . M .
On Nov 16, 2007, at 5:43 PM, Tom Hart wrote: Tom Hart wrote: Peter Eisentraut wrote: Tom Hart wrote: Specifically I'm looking at these two lines isactive and (mb_mail_cd=0 or mb_mail_cd=1) as ismail, ismail and (mb_stat_cd=0 or mb_stat_cd=2) as ispromomail, which appear to use other field

Re: [GENERAL] convert access sql to postgresql

2007-11-16 Thread Martijn van Oosterhout
On Fri, Nov 16, 2007 at 05:43:44PM -0500, Tom Hart wrote: > I've been doing some googling on sql aliases (my sql knowledge is far > from impressive) and it appears that column aliases can be great for > displaying different column names in your output. However I was unable > to find any informat

Re: [GENERAL] convert access sql to postgresql

2007-11-16 Thread Tom Hart
Tom Hart wrote: Peter Eisentraut wrote: Tom Hart wrote: Specifically I'm looking at these two lines isactive and (mb_mail_cd=0 or mb_mail_cd=1) as ismail, ismail and (mb_stat_cd=0 or mb_stat_cd=2) as ispromomail, which appear to use other fields it's preparing to insert as variables in the

Re: [GENERAL] convert access sql to postgresql

2007-11-16 Thread Tom Hart
Peter Eisentraut wrote: Tom Hart wrote: Specifically I'm looking at these two lines isactive and (mb_mail_cd=0 or mb_mail_cd=1) as ismail, ismail and (mb_stat_cd=0 or mb_stat_cd=2) as ispromomail, which appear to use other fields it's preparing to insert as variables in the determination of

Re: [GENERAL] convert access sql to postgresql

2007-11-16 Thread Peter Eisentraut
Tom Hart wrote: > Specifically I'm looking at these two lines > > isactive and (mb_mail_cd=0 or mb_mail_cd=1) as ismail, > ismail and (mb_stat_cd=0 or mb_stat_cd=2) as ispromomail, > > which appear to use other fields it's preparing to insert as variables > in the determination of the values of oth

[GENERAL] convert access sql to postgresql

2007-11-16 Thread Tom Hart
Hey guys. I have a long piece of sql that I'm trying to take out of an existing Access db and modify to work with Postgresql. I've started trying to convert it, but I've come across a problem that I don't even know how to describe, let alone google. Here's the function INSERT INTO MemberMailin