Re: basic questions: setting a variable and using a column name

2005-12-26 Thread Jigal van Hemert
Joseph Alotta wrote: greetings, I know this is pretty basic stuff, but I couldn't find an answer in google. 1. I want to set the @maxdate variable, but mysql complains. What am I doing wrong? > set @maxdate = select max(date) from positions where account = > "111200512343222"; select (

basic questions: setting a variable and using a column name

2005-12-26 Thread Joseph Alotta
greetings, I know this is pretty basic stuff, but I couldn't find an answer in google. 1. I want to set the @maxdate variable, but mysql complains. What am I doing wrong? 2. The 3rd to the last line: and (p.value - t.amount) < -1000 I wanted to say diff < -1000 but mysql