Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. igorsandler

    SELECT SQL and free tables

    Try my las post. Tomorrow I will show your SELECT to my colleague, he knows FoxPro 9. Or maybe someone else will correct it
  2. igorsandler

    SELECT SQL and free tables

    This is something specific to FoxPro 9 Try this: Select <All the non-aggregate fields from parent>, ; (select sum(somefield) from child where child.parentid = parent.id) as TotalsField ; FROM Parent Your Parent is RESERVAS, your child is PASSAGEIROS. Something like that: SELECT...
  3. igorsandler

    SELECT SQL and free tables

    Try this: SELECT; RESERVAS.LOCALIZA,; RESERVAS.EMISSAO,; RESERVAS.CODAGENTE,; RESERVAS.NOMAGENTE,; RESERVAS.NOMECIA,; RESERVAS.NOMENAV, ; RESERVAS.NUMCAB,; RESERVAS.TIPCATCAB,; RESERVAS.DATASAIDA,; RESERVAS.VENDEDOR,; RESERVAS.VOUCHER...
  4. igorsandler

    SELECT SQL and free tables

    I don't use FoxPro 9. OK, do this: SELECT; RESERVAS.LOCALIZA,; RESERVAS.EMISSAO,; RESERVAS.CODAGENTE,; RESERVAS.NOMAGENTE,; RESERVAS.NOMECIA,; RESERVAS.NOMENAV, ; RESERVAS.NUMCAB,; RESERVAS.TIPCATCAB,; RESERVAS.DATASAIDA,; RESERVAS.VENDEDOR...
  5. igorsandler

    SELECT SQL and free tables

    You keep using RIGHT JOIN, changed it to INNER. Right JOIN could create NULL, cannot group by NULL
  6. igorsandler

    SELECT SQL and free tables

    Doesn't make any sense. Try without table name SELECT; RESERVAS.LOCALIZA,; RESERVAS.EMISSAO,; RESERVAS.CODAGENTE,; RESERVAS.NOMAGENTE,; RESERVAS.NOMECIA,; RESERVAS.NOMENAV, ; RESERVAS.NUMCAB,; RESERVAS.TIPCATCAB,; RESERVAS.DATASAIDA,; RESERVAS.VENDEDOR...
  7. igorsandler

    SELECT SQL and free tables

    Try this: SELECT; RESERVAS.LOCALIZA,; RESERVAS.EMISSAO,; RESERVAS.CODAGENTE,; RESERVAS.NOMAGENTE,; RESERVAS.NOMECIA,; RESERVAS.NOMENAV, ; RESERVAS.NUMCAB,; RESERVAS.TIPCATCAB,; RESERVAS.DATASAIDA,; RESERVAS.VENDEDOR,; RESERVAS.VOUCHER...
  8. igorsandler

    SELECT SQL and free tables

    That's what you need: SELECT; RESERVAS.LOCALIZA,; RESERVAS.EMISSAO,; RESERVAS.CODAGENTE,; RESERVAS.NOMAGENTE,; RESERVAS.NOMECIA,; RESERVAS.NOMENAV, ; RESERVAS.NUMCAB,; RESERVAS.TIPCATCAB,; RESERVAS.DATASAIDA,; RESERVAS.VENDEDOR,; RESERVAS.VOUCHER...
  9. igorsandler

    SELECT SQL and free tables

    OK, so, you are listing all the fields from the parent and nothing from the child but you have a join on the child and that duplicates all your parent records, that's why they look like duplicates. No matter what you do, as soon as you join to the child(many), your parent(one) will have...
  10. igorsandler

    SELECT SQL and free tables

    Agreed. Seems like very simple SQL Statement but something doesn't make any sense. And without seeing the data, it's very hard to help
  11. igorsandler

    View Designer - can it handle a derived table?

    Hello vaxman9, I am using FoxPro 7 so I don't know what "derived " table is but if you want to create SUM() based on the logical field, all you have to do is SUM(IIF(logical field,field1,0.00)) + 00000000000000.00 As sum_field You need to pad the result with some zeros for the max or enough...
  12. igorsandler

    SELECT SQL and free tables

    SitesMassTec, So, RESERVAS.DBF is a parent(one) and PASSAGEIROS.DBF is a child(many). If you have more than one record in the child table with the same key as parent, you will have 5 records. If those 5 records are identical, that's what you are going to have. I mean, it's a bit hard to help...
  13. igorsandler

    SELECT SQL and free tables

    Well, use GROUP BY the key field, LOCALIZA I guess. You use SELECT DISTINCT, even though I don't like it and do no use it. You have one-to-many relationship between two tables and it seems you have duplicated on many side, not sure why. Doesn't look like normalized database to me. Your...
  14. igorsandler

    SELECT SQL and free tables

    Totally agree with all comments above. I don't want to sound like an a..s but it seems you are not very comfortable with writing your own SQL statements so try FoxPro View Wizard, that's how you can learn to write your won SQL. The only problem with the wizard(at least in FoxPro 7 I use), you...
  15. igorsandler

    SELECT SQL and free tables

    You need to qualify LOCALIZA with table name. This field seems belong to both tables: Select; free_table1.LOCALIZA,; free_table2.LOCALIZA AS LOCALIZA_2 Look at the FoxPro Help, it should say the same thing
  16. igorsandler

    SELECT SQL and free tables

    ...free tables located in D:\TEMP\free_table1, D:\TEMP\free_table2, you need to open them first: use D:\TEMP\free_table1 in 0 use D:\TEMP\free_table2 in 0 Select; free_table1.*,; free_table2.*; from free_table1; JOIN free_table2 I do it all the time as long as you know where free...
  17. igorsandler

    COPY FILE in an Exe

    It is open, has to be. Check Task Manager. What is .scx anyway?
  18. igorsandler

    Variables: NULL vs RELEASE

    Agreed. We normally test if this is till an object and then Release and = .NULL.
  19. igorsandler

    Visual foxpro matrix framework

    We are using MMortals Framework by Kevin MacNish(not sure about last name, can double check tomorrow), using it for more than 25 years utilizing in commercial software. It's pretty great. Basically framework has a lot of base classes with a lot of functionality that you can use by calling a...
  20. igorsandler

    foxpro print

    You don't have to do it at the same time. Let user to print laser report and then call the program to create a text file

Part and Inventory Search

Back
Top