CodePudding user response:
000000000000000000011000000000This value is how you work out? No see for a algorithm
CodePudding user response:
Understand the value is the number of days a month, I think about how to do a cycleCodePudding user response:
If you only use SQL statements do:Set up a temporary table, insert a value default is 0
The create # LSB (
Day1 varchar (1)
Day2 varchar (1)
Day3 varchar (1)
.
.
Day31 varchar (1)
)
And then through the cc column loop for CCRQ intercept CCRQ month and day, according to the month to determine how many days the month, according to the day to update # LSB corresponding as 1.
Finally according to the days of the month (e.g., 30 days) make a list of top 30 # LSB pieced together, is the value you want
CodePudding user response:
Suggest you don't convert numerical, define the field into a character directly, such as varchar (50), and then direct store this 000000000000000000011000000000, more intuitive, more convenient to parse andCodePudding user response:
Trains do cross ~ + date water with month dateCodePudding user response:
In the host language processing, should be very simpleCodePudding user response:
Didn't understand why the statistics' some trains in operation within one month of the number of days' 'why do you want to use this method, on the other hand, in the PB, or write a stored procedure, should be very simple