Question: I'm looking for information about how to age data in a db, generally related to Oracle and Sql 
 Server, but any database would be good. Any examples or books containing examples of how the best 
 techniques would be cool.

Bob

Answer: 
I've made this function based on earlier answers in this post.
I share it here because some of previous examples has been thrown me segfaults

```
const char* str_repeat(char* str, size_t times)
{
    if (times < 1) return NULL;
    char *ret = malloc(sizeof(str) * times + 1);
    if (ret == NULL) return NULL;
    strcpy(ret, &str);
    while (--times > 0) {
        strcat(ret, &str);
    }
    return ret;
}

```
<http://ideone.com/5sNylW>

```
#include <stdio.h>
#include <string.h>
int main(void) {
     char k[100];
     gets(k);
     int lk=strlen(k);
     int times;
     scanf("%d",&times);
     int tl= times*lk;
     int i,x=0;
        for(i=lk-1;i<tl;i++)
        {
        k[i+1]=k[x];
        x++;
        }
    for(i=0;i<tl;i++)
    {
    printf("%c",k[i]);
    }

     return 0;
}

```