Hello everyone!
I'm pretty new here using Connect In-DB so I can get all the data I need from a Teradata Server, using ODBC Teradata Drive.
I'm trying the simplest thing that is "SELECT CURRENT_DATE" in the SQL Query Builder, but I always get an error: Error: Connect In-DB (1): Error SQL Prepare: [Teradata] [ODBC Teradata Driver] [Teradata Database] (-3707) Syntax error, expected something like a name or a Unicode delimited identifier or an 'UDFCALLNAME' keyword or '(' between the 'FROM' keyword and ';'.
I've tried even "GETDATE ()", searching an answer from this forum, but I still l can't get a simple date.
I'm trying to get this simple thing to start automate inside SQL queries, like:
If it is Month 01 and Day less than 21 then bring everything that is called "B01"
If it is Month 01 and Day greater than 22 but smaller than 30 then bring everything that is called "B02"
It is a quick example which, of course, have another level of complexity inside it's own code.
Again, pretty new using Connect In-DB, so any help would greatly be appreciated!
Solved! Go to Solution.
Copy the query into Notepad++. Remove all line breaks and extra spaces from the query and make sure there is a space after the words Select, From, Where, Case, When, Then, Else, Like, And, End, As, etc. Then paste the SQL query in the SQL Editor tab.
You need to specify what table you are grabbing data from. Here is an example below where I have a from statement pulling data from table Audit.
You could also try using the visual query builder to build out this SQL code.