sc_lookup(Dataset, "SELECT tablename FROM pg_catalog.pg_tables
where schemaname = 'public'and tablename not like 'pong8%'") ;
{TabName} = {Dataset[1][0]};
echo "{TabName} " ;
$sql ='INSERT INTO pong8_maintable ("timestamp8","Last","TradePrice", "TradeVolume" , "BestBid") SELECT
cast(public.pong8."Timestamp" as timestamp) ,
cast(public.pong8."Last" as numeric) ,
cast(public.pong8."Trade Price" as numeric) ,
cast(public.pong8."Trade Volume" as numeric),
cast(public.pong8."Best Bid" as numeric)
FROM Public.{TabName}';
How can I change {TabName} in the last line to make this code work
[TABLE=“class: scErrorTable, align: center, cellpadding: 0, cellspacing: 0”]
[TR]
[TD=“class: scErrorTitle, align: left”]Error[/TD]
[/TR]
[TR]
[TD=“class: scErrorMessage, align: center”]pg_query(): Query failed: ERROR: relation “public.$tabname " does not exist LINE 9: FROM Public.”$tabname " ^[/TD]
[/TR]
[/TABLE]
[TABLE=“class: scErrorTable, align: center, cellpadding: 0, cellspacing: 0”]
[TR]
[TD=“class: scErrorTitle, align: left”]Error[/TD]
[/TR]
[TR]
[TD=“class: scErrorMessage, align: center”]Error while accessing the database:
ERROR: relation “public.$tabname " does not exist LINE 9: FROM Public.”$tabname " ^[/TD]
[/TR]
[/TABLE]