I see that unix shell variables can be referred to in bteq statements when the bteq code is embedded within the shell script. Is this possible in a batch script that will run in windows.
If yes, can someone provide me with a sample script.
Any info. on this is much appreciated.
Thanks!
I was talking about the SQL stmt only and not the title. One of these set commands before the export cause the SQL to appear in the output. I have removed them now after seeing your post and the SQL doesn't appear, would you happen to know if it is the set format on that caused the problem...
Hi
Happen to get this error message upon running an Ab intio graph. Would someone be able to explain why this would happen.
Any help with this is much appreciated.
Thanks!!!
ABINITIO(DB15038): Teradata ODBC Error
ABINITIO(DB15038): SQLCODE: 145
ABINITIO(DB15038): SQLSTATE: 08S01...
You can create a new table using 'create table tbl_nm' as select stmt;
Apply the filter in the select.
You can drop the original table and rename this new table.
May be this is what you are looking for.
select case when a.code is null then b.code else a.code as code,
case when a.code is null then b.type else a.type as type,
case when a.code is null then b.cond else a.cond as cond
from tbl_a a
full outer join tbl_b b
on a.code=b.code
Hi,
I am trying to convert minutes to Hour and Minutes through PL/SQL, for exmple 6 minutes should be shown as 0 Hr and 6Mins.
Any idea as how to do this?
Thanks!
Have a question regarding the design of a party account relationship table in a financial services model.
Say there can be many parties associated with an account , and there is a role type column which defines the role a party plays on the account and there is a primary party indicator and...
You will need an access lock only if there is a possibility that the concerned tables will be updated when queries are in progress.
Multiple selects can run concurrently without access locks.
Something lke this should work.
where_clause=
(CASE WHEN &name IS NOT NULL THEN 'and name =' || &name else ' ' END) ||
(CASE WHEN &status IS NOT NULL THEN 'and status=' || &status else ' ' END) ||
(CASE WHEN &state IS NOT NULL THEN 'and state =' || &state else ' ' END) ||
(CASE WHEN &city IS...
There might be a better way to do this, but this works as well.
select substr('00000',1,5-characters(trim(cast(cast(500.000 as integer) as char(5)))))
||trim(cast(cast(500.000 as integer) as char(5)))
Substitute col_name for '500.000'
Try this.
select
case when isnull(a.name) then b.name else a.name end,
case when isnull(a.time) then b.time else a.time end,
purchased,sold,offered
from (select * from tableA where time between '10:30' and '11:00') a
Full outer join (select * from tableB where time between '10:30' and...
You get this error msg because the index is not created in the database 'PLATO'. To get the database in which the index is created, try this.
select databasename, tablename from dbc.tables where tablename in...
If the same view name exists in multiple databases you can try this.
select requesttext from dbc.tables where tablekind='V' and tablename='view_name' and databasename='database_name'.
Try this, but as Dieter says ,more info is needed to understand and improve the execution plan.
SELECT
WEEK_DIM.WEEK_DESC,
FACT.SALES
FROM
FACT,
(SELECT * FROM WEEK_DIM WHERE LAST_WEEK_IND = 1) WEEK_DIM
WHERE
FACT.WEEK = WEEK_DIM.WEEK
Something like this should work.
select * from sub_trans a
where not exists (select * from all_trans b
where b.join_col1=a.join_col1
and b.join_col2=a.join_col2 ......)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.