Viewing 15 posts - 2,221 through 2,235 (of 2,894 total)
Yes like this:
DECLARE name CURSOR ...
FOR SELECT ....
OPEN name
FETCH NEXT FROM name INTO @var
WHILE @@FETCH_STATUS = 0
BEGIN
... Do some work
...
August 17, 2011 at 10:16 am
You should move your second
FETCH Next From MPDV INTO @QId,@MPDV,@answer,@dtLogged,@strRemarks,@strLogged
inside of loop
The same is for
FETCH Next From Pers INTO @Personnel
I guess it's cut-&-paste one 😉
August 17, 2011 at 9:51 am
Script file is the text isn't it?
So nvarchar(max) is the best for this. There is an option to store nibanry data in ntext, text ot image datatype, but it's...
August 17, 2011 at 9:24 am
SQL2000?
Good Luck!
Ok, you will need to use temp table:
SELECT IDENTITY(int,1,1) idn,
0 AS RN,
...
August 17, 2011 at 9:15 am
You are posting to fast 😀
Check the previous post!
August 17, 2011 at 8:38 am
Lavanyasri (8/17/2011)
HI ,I want store some script files in my table . Which data type i have to use to store script files .
Regards,
Lavanya sri
If your scripts...
August 17, 2011 at 8:37 am
karthikeyan-444867 (8/17/2011)
CREATE TABLE W
(
ID INT,
val varchar(255)
)
insert into W
select 100, 'D,20.5%,10.25%,A account is being linked to B...
August 17, 2011 at 8:35 am
Not bad, but try to set your input variable to:
select @_sPlatform = 'D,20987987.5%,A account is being linked to B account'
Sample I've gave you would work;-)
However, using Tally method would...
August 17, 2011 at 8:33 am
sharath.chalamgari (8/17/2011)
"After declaration, all variables are initialized as NULL, unless a value is provided as part of the declaration."
so when...
August 17, 2011 at 8:27 am
As you ingoring the forum advise to present your question in a polite way, I can only show you a generic sample:
DELETE fk
FROM TableWithFK fk
JOIN TableWithPK...
August 17, 2011 at 8:14 am
If your read: http://msdn.microsoft.com/en-us/library/ms188927.aspx
You will find that the scope of a local variable is the batch in which it is declared (you are not in c# or vb :-)).
That's...
August 17, 2011 at 7:27 am
Jason-299789 (8/17/2011)
I think 98% of people would...
August 17, 2011 at 7:05 am
Yep, as simple as this:
declare @_sP varchar(1024)
select @_sP = 'D,20.5%,10.25%,A account is being linked to B account'
declare @cA varchar(1024),@cB varchar(1024),@cC varchar(1024),@cD varchar(1024),@p int
SET @cA=@_sP
SET @p=CHARINDEX(',',@cA); IF @p>1 SELECT @cB=SUBSTRING(@cA,@p+1,1024),...
August 17, 2011 at 6:46 am
If you are splitting just one single value, anything would do!
You can use just SET operators to check next position of comma and to get one value after another.
If you...
August 17, 2011 at 6:39 am
Viewing 15 posts - 2,221 through 2,235 (of 2,894 total)