I want to convert a varchar column that has written time information in it. But in an unusual way.
Here a sample of the column dtib
Time: 70'000
should be converted to 07:00:00Time: 143'000
should be converted to 14:30:00
I want to make variable on it, so I can use it for example:
where btip between &btibA and &btibB
and if possible with the column type of time
.
In the end, I want to create a variable for btiA = 07:00:00
and 15:00:00 and filter all column that fits in this time range.
Can anyone help me?
1条答案
按热度按时间umuewwlo1#
You can use as below mention code, but I'll suggest to change table design if possible.