select command using BTEQ is not returning all fields

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
alexcol
Participant
Posts: 17
Joined: Mon Feb 28, 2011 8:52 am

select command using BTEQ is not returning all fields

Post by alexcol »

Good morning:

i need your help: i've got 2 questions:

the first one is:
i use bteq to connect to Teradata and i want to select the first 5 records of a table but returned just 2 columns.

select top 5 * from DWH_LOG.procesos where nom_proceso = 'wedo_sqntbalanceexpire';

*** Query completed. One row found. 8 columns returned.
*** Total elapsed time was 1 second.

Num_proceso Nom_proceso
----------- ---------------------------------------------------------------
119 wedo_sqntbalanceexpire

BTEQ -- Enter your DBC/SQL request or BTEQ command:


but the table has 8 colums as you can see below:

Column Name Type Comment
------------------------------ ---- ---------------------------------------
Num_proceso I ?
Nom_proceso CV ?
Fec_proceso TS ?
Periodicidad CV ?
Prefijo_planos CV ?
Tiempo_Estimado I ?
FecUltimoCorteDatos TS ?
Status CV ?

what can i do to return all columns in the query?

2nd - is there any command to show me which databases and tables a database user has access and what kind of permissions. i.e select - insert permissions?

id appreciate your help, thanks
ALEJO
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I suspect (the metadata in) your job design only names two columns.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
alexcol
Participant
Posts: 17
Joined: Mon Feb 28, 2011 8:52 am

Post by alexcol »

thanks for your help

But where can i check out this and can i changed withotut any problem? if so how can i chage it

the 2nd quetion is if is there any command that let me know which tables a desired user has access and what type select,insert.etc.

id appreciate your help
ALEJO
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Look on the Columns tab. How many columns are mentioned there?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

I think Teradata can limit the number of fields in select * from table. Talk to your DBA.
Mamu Kim
Post Reply