Hello Tarwn,
The perl file is in C:/myPerlFiles/perl1.pl
How do I run perl1.pl from ASP? perl1.pl also prints out messages when it's running ... can I see these in ASP as well?
Zhavic,
Thanks for the pointer, but with the new code:
declare @str1 as varchar(8000)
declare @str2 as varchar(8000)
declare @str3 as varchar(8000)
select @str1 = Substring('<A href="http://www.domain.com/chem.asp?cId=' + CAST(chemicalId AS varchar) + '" target="NEW">' +...
Using the following code, I still get the same errors (shown above):
declare @str1 as varchar(8000)
declare @str2 as varchar(8000)
declare @str3 as varchar(8000)
set @str1 = Substring('<A href="http://www.domain.com/chem.asp?cId=' + CAST(chemicalId AS varchar) + '" target="NEW">' +...
maswien, I changed the code to:
INSERT INTO #TempChemicalsChunk (chemicalsInfo)
SELECT Substring('<A href="http://www.domain.com/chem.asp?cId=' + CAST(chemicalId AS varchar) + '" target="NEW">' + dbo.PROPER(chemicalTITLE) + '</A><BR>' +...
chemicalsInfo in #TempChemicalsChunk is TEXT, so it doesn't have a maximum length of 8000, does it?
If it does, do you have suggestions on how I can temporarily store chemicalsInfo (which can have up to 24,000 characters) to break down into 3 chucks (@Chuck1, @Chuck2, and @Chuck3)?
Code compiles but I get alot of errors for line "SELECT Substring ..." because chemicalId, chemicalTitle, chemicalDescription, chemicalCountry, chemicalState, chemicalCity, etc. gets the following errors:
Invalid column name 'chemicalId'
Invalid column name 'chemicalTitle'
Invalid column name...
If I use @RecordTimestamp which is the record value of a datetime field in the database:
set @datestr = replace(convert(char(10), cast(@RecordTimestamp as varchar), 10), '-', '')
set @timestr = replace(convert(char(12), cast(@RecordTimestamp as varchar), 114), ':', '')
2003-03-23 10:34:01.513...
My mistake ... I created a stored procedure:
CREATE PROCEDURE sp_AddUniqueId
@dt VARCHAR(250)
AS
DECLARE @datestr VARCHAR(6)
DECLARE @timestr VARCHAR(9)
DECLARE @randstr VARCHAR(11)
DECLARE @out VARCHAR(26)
BEGIN
set @datestr = replace(convert(char(10), @dt, 10), '-', '')
set @timestr...
I only have varchar (20) for the Unique ID string. The code currently creates 26 characters. If I change your @out to:
declare @out varchar(20)
Will your code break?
I would like to be able to generate a Unique ID string (varchar 20) that is based on a datetime field (RecordCreated) and an algorithm.
eg.
2001-08-21 21:08:11.620 -> ef2108g11x620y8a331g082101
where "ef", "g", "x" and "y8a331g" are randomly created letters and or numbers in...
I don't remember if I was able to attach both versions to the same SQL Server instance, and I don't suggest doing this.
If you want to back up your database before making a lot of changes to it, you should copy the original mdf / ldf files into another directory. These will be your backup files.
Druer,
I can't use a text field (ie. YourTextField) in a stored procedure because SQL server does not allow the use of TEXT datatype for local variables.
How can I get around this?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.