TOAD: Create a code statement mod

Discussion in 'ASP General' started by Colin Steadman, Jul 20, 2004.

  1. This may be slightly off topic, but this is probably a better place to
    ask than an Oracle group as folk here are more likely to use the
    feature I'm asking about.

    In Toad (Quest Software) there is a button called 'Create a code
    statement' that turns SQL into something you can use in ASP for
    building SQL strings:

    For example if in Toad you highlight the following, and click the
    button:

    SELECT
    name,
    address_line1,
    address_line2,
    county,
    city,
    postcode
    FROM
    address_table
    WHERE
    city = 'Birmingham'

    It copies this into clipboard:

    SQL = " SELECT "
    SQL = SQL & " name,"
    SQL = SQL & " address_line1,"
    SQL = SQL & " address_line2,"
    SQL = SQL & " county,"
    SQL = SQL & " city,"
    SQL = SQL & " postcode"
    SQL = SQL & " FROM "
    SQL = SQL & " address_table"
    SQL = SQL & " WHERE "
    SQL = SQL & " city = 'Birmingham'"

    This is a nice feature (and there is another button that does the
    reverse), but I like to build my SQL like this:

    Dim aSQL()
    Redim aSQL(8)

    aSQL(0) = "SELECT "
    aSQL(1) = " name, "
    aSQL(2) = " address_line1,"
    aSQL(3) = " address_line2,"
    aSQL(4) = " county,"
    aSQL(5) = " city,"
    aSQL(6) = " postcode"
    aSQL(7) = "FROM "
    aSQL(8) = " address_table"
    aSQL(9) = "WHERE "
    aSQL(10) = " city = 'Birmingham'"

    sql = Join(aSQL,"")
    Erase aSQL

    Anyone know if Toad can be modified to create the array above instead?
    I cant find any information about this anywhere.

    TIA,

    Colin
     
    Colin Steadman, Jul 20, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. praveen

    MOD function synthesis

    praveen, Sep 23, 2003, in forum: VHDL
    Replies:
    1
    Views:
    846
    Allan Herriman
    Sep 24, 2003
  2. Kwaj

    Mod (%) Function in VHDL

    Kwaj, Jan 14, 2004, in forum: VHDL
    Replies:
    7
    Views:
    44,365
    jacky Renaux
    Jan 20, 2004
  3. Hari Sekhon
    Replies:
    0
    Views:
    514
    Hari Sekhon
    Jun 20, 2006
  4. ryles
    Replies:
    3
    Views:
    537
    Piet van Oostrum
    Jul 26, 2009
  5. T. Onoma
    Replies:
    9
    Views:
    358
    Dave Thomas
    Dec 15, 2003
Loading...

Share This Page