C
Colin Steadman
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
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