General information
Category:
Coding, syntax & commands
Title:
SELECT &mindbf..ansnavn,&mindbf.ansattnumm
In a multiuser env. using grids I'm using
variables to create unique tablenames like
mindbf=SUBSTR(SYS(2015), 3, 10)
I then runs sqls like:
SELECT &mindbf..ansnavn,&mindbf..ansattnumm,&mindbf..avdeling,&mindbf..job,;
&mindbf..dato1,&mindbf..skift,&mindbf..lønnsartna,;
&mindbf..lønnsartnu,;
&mindbf2..timer-&mindbf..Timer AS Timer;
FROM &mindbf,&mindbf2;
WHERE &mindbf..ansattnumm=&mindbf2..ansattnumm;
AND &mindbf..dato1=&mindbf2..dato1;
AND &mindbf..avdeling=&mindbf2..avdeling;
AND &mindbf..job=&mindbf2..job;
AND &mindbf..lønnsartnu=&mindbf2..lønnsartnu;
AND &mindbf2..timer-&mindbf..timer !=0;
GROUP BY &mindbf..ansattnumm,&mindbf..dato1,&mindbf..avdeling,&mindbf..job,&mindbf..lønnsartnu;
ORDER BY &mindbf..ansattnumm,&mindbf..dato1,&mindbf..avdeling,&mindbf..job,&mindbf..lønnsartnu;
INTO TABLE &korrdbf
I'm just wondering if this is a correct way to things??
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only