V4RB getting table name from cursor
Ruslan Zasukhin
sunshine at public.kherson.ua
Mon Dec 8 10:13:00 CST 2003
on 12/8/03 10:01 AM, Andy Pasichnyuk at kuap_a at yahoo.co.uk wrote:
Hi Andy,
Thank you for info.
> On MS SQL there is no any table names in the column's
> caption by default.
>
> ==========================================================================
> 1.
> select * from img, img2 where img.id_num = img2.id_num
>
> id_num company_name id_num company_name
> ----------- ------------------------- ----------- -------------------------
> 2 Lucerne Publishing 2 New Moon Books
> 1 New Moon Books 1 Lucerne Publishing
>
> (2 row(s) affected)
>
>
> ==========================================================================
> 2. The result will be the same as above with the queries:
>
> select * from img i1, img2 i2 where i1.id_num = i2.id_num
> select img.id_num, img2.id_num, img.company_name, img2.company_name from img,
> img2 where img.id_num = img2.id_num
>
> ==========================================================================
>
> 3. The only way to have what we want is: to use 'AS' clause
>
> select img.id_num as id1, img2.id_num as id2, img.company_name as name1,
> img2.company_name as name2 from img, img2 where img.id_num = img2.id_num
>
> id1 id2 name1 name2
> ----------- ----------- ------------------------- ---------------------------
> 2 2 Lucerne Publishing New Moon Books
> 1 1 New Moon Books Lucerne Publishing
>
> (2 row(s) affected)
>
> or
>
> select img.id_num as 'img.id_num', img2.id_num as 'img2.id_num',
> img.company_name as 'img.company_name', img2.company_name as
> 'img2.company_name' from img, img2 where img.id_num = img2.id_num
>
> img.id_num img2.id_num img.company_name img2.company_name
> ----------- ----------- ------------------------- ---------------------------
> 2 2 Lucerne Publishing New Moon Books
> 1 1 New Moon Books Lucerne Publishing
>
> (2 row(s) affected)
>
> --
> WBR,
> Andrew Pasichnyuk
>
> _______________________________________________
> Vdevelopers mailing list
--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
More information about the Valentina
mailing list