Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating a string using just one Select-SQL
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01086002
Message ID:
01086007
Views:
24
This message has been marked as the solution to the initial question of the thread.
It's possible if you combine a query with an UDF. Something like
SELECT id_a, Name, CAST(PhoneList(id_a) AS char(128)) Phone ;
  FROM tableA
In the PhoneList you would build a list of phones for the passed ID.

>
>First of all, I will introduce you my tables:
>
>Table_A                       Table_B
>   ID_A (I) 1--------+        ID_B (I)
>   Name (C)          +------N ID_A (I)
>                              Phone (C)
>
>
>My point is create a cursor like that:
>
>ID_A   Name                   Phone
>0001   Rodolfo Duarte         1234-5678 1234-1234 1234-3333
>0002   Denise Andrade         2222-3333 2222-4444
>
>
>Notice that I have 2 records in my Table_A and 5 records in my Table_B.
>So, is it possible to create my Cursor using just one Select-SQL or I have to process it manually?
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform