Home > database >  Using SQL or stored procedures can create this table (see)
Using SQL or stored procedures can create this table (see)

Time:10-13

VISIT V1 V2 V3 V4 V5 V6 V7
Total 552 365 341 291 204 125 80
01001 01002 01002 01002 01007 01007 01007
01002 01003 01004 01005 01008 01008 01008
01003 01004 01005 01007 01009 01009 01009
01004 01005 01007 01008 01012 01012 01012
01005 01007 01008 01009 01013 01013 01013
01006 01008 01009 01012 01016 01016 01016
01007 01009 01012 01013 01018 01018 05001
01008 01010 01013 01016 01020 02005 05002
01009 01012 01016 01018 02003 02007 05003
01010 01013 01018 01020 02005 05001 05004
01011 01016 01020 02001 02007 05002 08002
01012 01018 02001 02003 02008 05003 11004
01013 01020 02003 02005 02009 05004 11005
01014 02001 02005 02007 05001 05007 11007
01015 02003 02007 02008 05002 05009 12004
01016 02005 02008 02009 05003 05010 12006
01017 02007 02009 02010 05004 05013 12007
01018 02008 02010 05001 05007 06004 12009
01019 02009 02011 05002 05008 08002 13001
01020 02010 02012 05003 05009 08003 13002
02001 02011 02013 05004 05010 08004 14001
02002 02012 05001 05006 05013 10001 14003
02003 02013 05002 05007 05017 11004 14005
02004 05001 05003 05008 06004 11005 14006
02005 05002 05004 05009 06006 11007 14007
02006 05003 05006 05010 08002 11009 14008

Consult a great god, and if you use SQL or stored procedures can achieve table this format? If not, I won't tangle want to other way.
Simple means less number next VISIT is not fixed, 10, more than 30, the total is statistical number under a VISIT, and then display detail, detail the number of rows of each VISIT is different also.

CodePudding user response:

Can let the stored procedure returns a cursor,

But these figures come out later, where will receive (handle)?

CodePudding user response:

Don't quite understand what to do, is to construct data or?

CodePudding user response:

This format is what kind of format,
  • Related