Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RE : Ms-Sql2000....field check
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
RE : Ms-Sql2000....field check
Miscellaneous
Thread ID:
00661884
Message ID:
00661884
Views:
56
Hi mate,

Thanks for your answer.This time;

At the " EXECUTE ('update mal set ' + @xdepo + ' = ' + @xmiktar + ' where malno = ' + @xmalno ) " row I have trouble, like; the statement of @xmalno should be double quotation mark.

Example = '0150020'

How can I use quotation mark with @xmalno statement.

' " ' + @xmalno + ' " ' -------------> returns error
' ' ' + @xmalno + ' ' ' -------------> returns error


Sample code is:
---------------
declare @max_sene smallint,@xmalno nvarchar(17),@xmiktar nvarchar(15),@xdepo nvarchar(9)
set @max_sene = (select max(sene) from path_dat)
DECLARE depo_hrk CURSOR FOR
select malno,cast(sum(miktar) as nvarchar(15)) as miktar,'depo_' + cast(depo AS nvarchar(4)) AS depo
from hrk
where sene = @max_sene
group by malno,depo
order by malno,depo
OPEN depo_hrk
FETCH NEXT FROM depo_hrk INTO @xmalno,@xmiktar,@xdepo
WHILE @@fetch_status = 0
BEGIN
EXECUTE ('update mal set ' + @xdepo + ' = ' + @xmiktar + ' where malno = ' + @xmalno )
FETCH NEXT FROM depo_hrk INTO @xmalno,@xmiktar,@xdepo
END
CLOSE depo_hrk
deallocate depo_hrk
Next
Reply
Map
View

Click here to load this message in the networking platform