HI Everyone,
I am fairly new to Oracle development having come from the world of TSQL and am struggling with the syntax slightly.
I need to create a table that will find out a maximum ID from another table, then create a row for every ID from 0 - the maximum for every hour in the day. i.e.
Hour ID
0000 1
0100 1
0200 1
0300 1
0400 1
0500 1
0600 1
0700 1
0800 1
0900 1
1000 1
---up to 2300---
then start on the next id
Hour ID
0000 2
0100 2
0200 2
0300 2
0400 2
0500 2
0600 2
0700 2
0800 2
0900 2
1000 2
---up to 2300---
etc till all the ID's have this up to the max in the table. This is different on different sites.
Can anyone help. I have looked on lots of pages but cant find anything similar and cant get my head around the oracle syntax when using loops or variables.
I would very much appreciate some help with this
Cafcrew
aka.Matt
I am fairly new to Oracle development having come from the world of TSQL and am struggling with the syntax slightly.
I need to create a table that will find out a maximum ID from another table, then create a row for every ID from 0 - the maximum for every hour in the day. i.e.
Hour ID
0000 1
0100 1
0200 1
0300 1
0400 1
0500 1
0600 1
0700 1
0800 1
0900 1
1000 1
---up to 2300---
then start on the next id
Hour ID
0000 2
0100 2
0200 2
0300 2
0400 2
0500 2
0600 2
0700 2
0800 2
0900 2
1000 2
---up to 2300---
etc till all the ID's have this up to the max in the table. This is different on different sites.
Can anyone help. I have looked on lots of pages but cant find anything similar and cant get my head around the oracle syntax when using loops or variables.
I would very much appreciate some help with this
Cafcrew
aka.Matt