Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RE : Ms-Sql2000....field check
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
RE : Ms-Sql2000....field check
Divers
Thread ID:
00661884
Message ID:
00661884
Vues:
57
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform