home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0430 - 0439 / ibm0430-0439 / ibm0438.tar / ibm0438 / SQL42114.ZIP / SQL421A.014 / SQL / MIPS / TEMPSP.SQL < prev    next >
Encoding:
Text File  |  1994-01-25  |  746 b   |  22 lines

  1. /* Temporary version of sp_server_info, to be used by dblib during setup */
  2. /* Actual version installed later through instcat.sql             */
  3.  
  4. if (exists (select * from sysobjects
  5.         where name = 'sp_server_info' and sysstat & 7 = 4))
  6.     drop proc sp_server_info
  7. go
  8.  
  9. create proc sp_server_info (
  10.             @attribute_id  int = null)
  11. as
  12. select attribute_id=18,attribute_name="COLLATION_SEQ",
  13.      attribute_value="charset="+t2.name+" sort_order="+t1.name
  14.          +" charset_num="+rtrim(convert(char(4),t1.csid))+
  15.          " sort_order_num="+rtrim(convert(char(4),t1.id))
  16.      from syscharsets t1, syscharsets t2, sysconfigures t3
  17.      where t1.csid=t2.id and t1.id=t3.value and t3.config=123
  18. go
  19.  
  20. grant execute on sp_server_info to public
  21. go
  22.