dbWriter Home
IP to Country Look up
Site Map

IP to Country DB

Free Databases:

ASP Code

ASP Links

VB Script functions:
Array
Case/Select
In String (inStr)
Replace

HTML code:
SELECT Color
SELECT Countries
SELECT Language
SELECT State/Province

SQL:

SQL Functions:
Delete leading Char
Get Browser
Long number from IP

Stored Procedures:

SQL Tricks:
Delete ALL duplicates
Delete dup records

MISC
IP Address Owner
MS SQL Server

Mortgage Calcs:
how much is my payment
Loan Amortization
Loan Calculator
Mortgage Calculator
Motrgage Pay Off

dbWriter License

Link to US

Links

Contact US
 

dbWriter SQL STORED PROCEDURE SPLIT ON CHARACTER

This SQL stored procedure splits an input from a checkbox input   Request.Form("cbox") on any character.

Such as a comma delimited string.  Use this procedure to delete multiple ID's from a table with one call.

Change the DELETE table line to the code you need run on your table.
 

CREATE PROCEDURE [DBO].[ZP_YOUR_PROC_SPLIT]
@List VARCHAR(300)
AS
BEGIN
DECLARE @SplitOn varchar (5)
DECLARE @ID int
Set @SplitOn = ','


While (Charindex(@SplitOn,@List)>0)
Begin

SET @ID = ltrim(rtrim(Substring(@List,1,Charindex(@SplitOn,@List)-1)))
--put your code here to run on each ID
--DELETE tbl_YOURTABLE where YOUR_ID = @ID
SET @List = Substring(@List,Charindex(@SplitOn,@List)+len(@SplitOn),len(@List))
End
 

-- this is the last ID in the list for your code to run on
DELETE tbl_YOURTABLE where YOUR_ID =  ltrim(rtrim(@List))

RETURN 0
END
GO
 

 

Partners/Links © 2005 - 2008 dbWriter.com All Rights Reserved
This site is protected by the dbWriter IPtoCountry MS/SQL database!!
Site map | Link to US
Contact Us

Sign up for PayPal and start accepting credit card payments instantly.