GithubHelp home page GithubHelp logo

sql's Introduction

sql

字符统计


USE [mtAppBBSG] GO /****** Object: UserDefinedFunction [dbo].[fn_charCount] Script Date: 2019/8/8 18:29:56 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO

ALTER FUNCTION [dbo].[fn_charCount] ( @str nvarchar(1), --要统计的字符 @oStr nvarchar(max) --字符串 ) RETURNS int AS BEGIN declare @i_start int =1 declare @i_cnt int=0 while(CHARINDEX(@str,@oStr,@i_start)!=0) begin

set @i_start=CHARINDEX(@str,@oStr,@i_start)+1
set @i_cnt=@i_cnt+1;

end

	
RETURN @i_cnt

END

sql's People

Contributors

as010101 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.