How would you access the table when simultanous loading is going on

General
Enthusiast

How would you access the table when simultanous loading is going on

How would you access the table when simultanous loading is going on?

10 REPLIES
Enthusiast

Re: How would you access the table when simultanous loading is going on

Hi Atul,

One way of accessing is through -->

Locking row for access select * from tab_nm;

but this would be a dirty read hence there wont be any data consistency.

I hope u were asking the same thing.

cheers!

Nishant

Enthusiast

Re: How would you access the table when simultanous loading is going on

thanks Nishant..i was taking about the same..its working fine...

Enthusiast

Re: How would you access the table when simultanous loading is going on

Is there any other way then grant to give access to user on any created object in teradata..if yes then what would be its syntax or command...

Enthusiast

Re: How would you access the table when simultanous loading is going on

GRANT select/insert/update/delete  on <dbname>/<object_nm.  to USer1,User2;

Enthusiast

Re: How would you access the table when simultanous loading is going on

i have one source table..to load data from that source table to my base table i should know that for that period the data is available in table.. i wrote a query as:

sel column_name,count(1) from database.table group by column_name

 order by column_name having count(1)>0;

i got output as:

column_name     Count(1)

------------  -----------

  2013-06-03       181413

  2013-06-04       169961

  2013-06-05       170068

  2013-06-06       169928

  2013-06-07       172556

  2013-06-08       174937

2013-07-01         4679

  2013-07-02        27965

  2013-07-03       252164

  2013-07-04           19

  2013-07-05       174993

  2013-07-06        54564

  2013-07-07            4

  2013-07-08           25

  2013-07-09           32

  2013-07-10           57

i want to have a sql query which can give me date as month start date(the start date for which am getting data) and month end_Date(the last date for which am getting data) and the corresponding count for the complete period rather than having a saggrigated count for each date..please help...

Senior Apprentice

Re: How would you access the table when simultanous loading is going on

You should ask a new question in a new post.

I don't completely understand what you want:

sel min(column_name),max(column_name),count(*) from database.table;

Btw, you don't need having count(1)>0 as this is always true.

Dieter

Enthusiast

Re: How would you access the table when simultanous loading is going on

Thanks a Ton Dnoeth...that workd perfectly for case...

Enthusiast

Re: How would you access the table when simultanous loading is going on

Hi Experts

I have table loaded with a date data in format 'dd-mon-yyyy' exaample '24-oct-2010' for two months sept and oct. I need to perform the minus query with the another table have the same data as the one but with the variance in date column format as date format 'yyyy-mm-dd'.

Please suggest the proper syntax to cast the date in format 'dd-mon-yyyy' to format 'yyyy-mm-dd'. so that minus operation can be performed.

Enthusiast

Re: How would you access the table when simultanous loading is going on

CAST(dt_colmn as date format 'YYYY-MM-DD')