|
From: Thomas L. B. <tho...@to...> - 2004-03-16 23:56:55
|
Thanks. I had a problem with the code below. It compiles but generates a
runtime exception.
Fail: user error (SqlError {seState = "E", seNativeError = 7, seErrorMsg =
"ERROR: column \"username1\" does not exist\n"})
userIds = do
users <- table phpbb_users
group <- table phpbb_user_group
-- restrict (users!(U.user_id) .==. group!(G.user_id) )
project ( username << users!username #
user_email << users!user_email #
user_regdate << users!user_regdate #
group_id << group!group_id )
If I uncomment the restriction everything runs smoothly. I suspect that there
is a lacunae in the SQL generation code for cases where the JOIN is
unqualified.
Tom
On Tue, 16 Mar 2004 07:19 pm, Bjorn Bringert wrote:
> Thomas L. Bevan wrote:
> > How is it possible to do join between tables?
>
> Hi Tom,
>
> here is an example of a join between two tables:
>
> do
> r <- table time_reports
> u <- table users
> restrict (r!userid .==. u!xid)
> project (first_name << u!first_name
> # last_name << u!last_name
> # activity << r!activity)
>
> /Bjorn
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> _______________________________________________
> Haskelldb-users mailing list
> Has...@li...
> https://lists.sourceforge.net/lists/listinfo/haskelldb-users
--
A poet who reads his verse in public may have other nasty habits.
|