文章分类 - sql

摘要:1. 比方说某库中有N个存储过程: select name from sysobjects where xtype = 'P'; name ------------------------------------------------------------------------------------------------------- SO_updateorderdetail HR_y... 阅读全文

posted @ 2008-08-05 16:42 至今 阅读(2102) 评论(0) 推荐(0) 编辑 |

摘要:declare @v_sql varchar(8000) set @v_sql = ' ' select @v_sql = @v_sql + ',CASE WHEN object = ''' + object + ''' THEN fen else null end ' +'as '+object FROM cross_test set @v_sql = 'select '+right(@v... 阅读全文

posted @ 2008-08-05 16:40 至今 阅读(129) 评论(0) 推荐(0) 编辑 |

摘要:declare @i int,@j varchar(20),@k varchar(30),@m varchar(30) set @i=10 set @j=' ' set @k='*' while @i>0 begin set @m=substring(@j,1,@i)+@k set @k=@k+'**' print @m set @i=@i-1 end 阅读全文

posted @ 2008-08-05 16:35 至今 阅读(98) 评论(0) 推荐(0) 编辑 |

摘要:create function fun_getPY(@str nvarchar(4000)) returns nvarchar(4000) as begin declare @word nchar(1),@PY nvarchar(4000) set @PY='' while len(@str)>0 begin set @word=left(@str,1) --如果非汉字字符,返回... 阅读全文

posted @ 2008-08-05 16:34 至今 阅读(841) 评论(0) 推荐(0) 编辑 |

posts - 34, comments - 79, trackbacks - 0, articles - 5

Copyright © 2020 至今
Powered by .NET 5.0.0-rc.2.20475.5 on Kubernetes