Line break pl/sql
fidjy5
Posted messages
10
Status
Membre
-
fidjy5 Posted messages 10 Status Membre -
fidjy5 Posted messages 10 Status Membre -
Hello,
I am working on a script where I need to insert a database if it does not exist as well as other elements, and I cannot add a trigger on this table..
Here is the header of the code:
trigg="IF OBJECT_ID('stat_temp_"&schema&"') IS NOT NULL EXECUTE 'CREATE TRIGGER [verif_"&schema&"] ON [dbo].[stat_temp_"&schema&"] "
trigg=trigg&"AFTER INSERT AS "&vbCrLf&" DECLARE @cpt int;"&vbCrLf&" DECLARE @good int;"&vbCrLf&" DECLARE @tiers int;"
trigg=trigg&"SELECT @good=count(*) from stat_goods where code_good=(select code_good from inserted)"
trigg=trigg&" IF @good=0"
trigg=trigg&" begin"
......
So every time I concatenate, but it causes a problem that under SQL Server 2003 I cannot find the carriage return/new line symbol..
I am working on a script where I need to insert a database if it does not exist as well as other elements, and I cannot add a trigger on this table..
Here is the header of the code:
trigg="IF OBJECT_ID('stat_temp_"&schema&"') IS NOT NULL EXECUTE 'CREATE TRIGGER [verif_"&schema&"] ON [dbo].[stat_temp_"&schema&"] "
trigg=trigg&"AFTER INSERT AS "&vbCrLf&" DECLARE @cpt int;"&vbCrLf&" DECLARE @good int;"&vbCrLf&" DECLARE @tiers int;"
trigg=trigg&"SELECT @good=count(*) from stat_goods where code_good=(select code_good from inserted)"
trigg=trigg&" IF @good=0"
trigg=trigg&" begin"
......
So every time I concatenate, but it causes a problem that under SQL Server 2003 I cannot find the carriage return/new line symbol..
Configuration: Windows 2003 Firefox 2.0.0.14
trigg="IF OBJECT_ID('stat_temp_"&schema&"') IS NOT NULL EXECUTE 'CREATE TRIGGER [verif_"&schema&"] ON [dbo].[stat_temp_"&schema&"] "
trigg=trigg&"AFTER INSERT AS CHAR(13) & CHAR(10) DECLARE @cpt int;"&vbCrLf&" DECLARE @good int;"&vbCrLf&" DECLARE @tiers int;"&vbCrLf
trigg=trigg&"SELECT @good=count(*) from stat_goods where code_good=(select code_good from inserted)"
trigg=trigg&" IF @good=0"
to test this, it does not give me any line breaks.