Teradata sql assistant code completion aliases not working - teradata

Teradata SQL assistant version 16.20.
Code completion(The drop down suggestion list after i write dots) is not working for me when I use aliases, does anyone know why?

Related

Same SQL query which works in Teradata doesn't work in Fitnesse

Same SQL query which works in Teradata SQL Assistant doesn't work in Fitnesse. I get below error when we run the query
"SELECT failed. 3706: Syntax error: expected something between '(' and the 'SUBSTR' keyword
I have faced the same problem in past. I understand the problem is with copy and paste. In past it was small query so I manually typed and it worked. But now my query expands over 300 lines, so I am not able to retype it. I even tried to copy and paste in plain text via notepad and notepad ++, but still unable to resolve it. Can you throw some light please?
There are some functionalities that are managed (translated) by ODBC itself (as SQL Assistant is using ODBC, it's relevant). I had similar issued when moving dem SQL Assistant to bteq.
In my case it was LENGTH (which don't exist in Teradata, but is handled by ODBC), after changing to CHAR_LENGTH it worked. Can you post the SQL? Otherwise, go Function by Function through your Query and double-check Teradata documentation (does it exist, has is the parameters I used?).
In the connection string I changed TMODE from ANSI to TERA and it started working.

How to execute bind variables in pl/sql?

I was learning about bind variables in pl/sql and tried to execute the following code on oracle 10g database
VARIABLE v_bind1 VARCHAR2(10);
EXEC :v_bind1:='shweta';
when i executed it, one pop-up asking for bind variable came as shown in the picture
screenshot of pop up box
Then I entered the value 'shweta' in it and submitted, but it shows invalid sql statement.
what should I enter in the pop-up box, so that my program execute successfully?
Well, you use Apex SQL Workshop, its ancient version (2.1) which dates in January 2006, was part of 10g Express Edition database. I never thought that someone might still be using it. Upgrade to at least 11gXE, it is free.
I suggest you test your skills in SQL*Plus instead because responses you get from tool you chose might be misleading.

Does Flyway support executing multiple SQL scripts called from one SQL script?

I am trying to execute multiple scripts from one SQL file, running it in sequence. E.g. if I have V1.0__Test0.sql, and the contents are:
#V1.1__Test1.sql;
#V1.1__Test2.sql;
If I run the migrate option, I get an ORA-00900: invalid SQL statement error. Does Flyway support what I am trying to achieve?
No. This is documented in the limitations: http://flywaydb.org/documentation/database/oracle.html#limitations

do I need to learn sqldeveloper-specific commands for PL/SQL queries?

There are statements like
SET server output ON
PRINT var_name
DEFINE var_name
VARIABLE var_name
etc. which are typed outside the PL/SQL block. These are SQL+ commands which also seem to work on SQlDeveloper, both of which are tools to execute PL/SQL scripts in. Is there any standard that these non-PL/SQL commands follow, i.e. since they are tool-specific, they can differ, say in, SqlDeveloper and SqlPlus. Whose statements should I learn ?
You should learn the commands supported by the tool you are using - SQL Plus commands for SQL Plus, etc. There is overlap between SQL Plus and SQL Developer because SQL Developer has been designed to be easy to use by people who have previously used SQL Plus. To see which SQL Plus commands SQL Developer supports, open its online help and navigate to:
SQL Developer Concepts and Usage
Using the SQL Worksheet
SQL*Plus Statements Supported and Not Supported in SQL Worksheet

Trying to attach a database to a currently open database but i'm getting an error saying ATTACH is not allowed from SQL

I'm trying to attach a database(db2.sqlite) to a currently open database(db1.sqlite) and copy the contents of one of the tables in db2 into one of the tables in db1. The logical way to do this I thought was to use the attach command and then select all from db2 and insert into db1:-
attach 'C:\db2.sqlite' as newData;
insert into main.table1 select * from newData.table1
Both database's have identical table names (table1) and the exact same schema. To make sure my syntax was correct I tried this out in the Firefox SQLite Manager and everything worked perfectly.
Unfortunately when I tried the same method in my air application I got the following error:-
"ATTACH is not allowed from SQL.', operation:'execute', detailID:'2053'"
Can anyone please tell me why this isn't working?
Many Thanks
Adam
From the Adobe LiveDocs:
The following SQL elements and SQLite
features are supported in some SQLite
implementations, but are not supported
in Adobe AIR. Most of this
functionality is available through
methods of the SQLConnection class:
* ATTACH: This functionality is available through the
SQLConnection.attach() method.

Resources