Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2004
    Location
    Dallas, TX
    Posts
    77

    Unanswered: select question, is it possible?

    If I have one table tblA with column col1, col2, col3. for example:
    col1 col2 col3
    1 hello 10
    2 hi 35
    3 thanks 25
    4 thx 30

    I can use have: select sum(col3) from tblA; select col2, col3 from tblA.

    sum(col3) is not exist column before, but It could be created during select. Then I wonder: could I add extra column when I do the select.
    For example: I want to get this result without change tblA structure:
    Select col2, col3, col4( boolean default 1) from tblA

    col1 col2 col3 col4
    1 hello 10 1
    2 hi 35 1
    3 thanks 25 1
    4 thx 30 1

    Is this query result possible, if yes, how can I do it?




    thanks a lot

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Yes.

    SELECT col2, col3, True AS col4 FROM tblA;

    Next question ...
    Back to Access ... ADO is not the way to go for speed ...

  3. #3
    Join Date
    Sep 2004
    Location
    Dallas, TX
    Posts
    77
    yeah. got it.

    thanks a lot

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •