How can we help you today? How can we help you today?
informatika

Activity overview

Latest activity by informatika

FROM NULL TO NOT NULL, BUT WITH DEFAULT
I have a suggestion for a new option. Sometimes it happens, that we create a table like this:CREATE TABLE Test ( ID INT IDENTITY ( 1, 1 ), Field1 INT NOT NULL, Field2 INT NULL ) IN...
2 followers 2 comments 0 votes
Options."DoNotUseALTERASSEMBLYToChangeCLRTypes"?
Hello, how do I set the option "Do not use ALTER ASSEMBLY to change CLR types" in my code:Differences diffs = m_ReferenceDatabase.CompareWith(m_DatabaseToUpdate, Options.ForceColumnOrder );...
1 follower 1 comment 0 votes
Wrong order in synchronization script
Hello, with new SQL Server 2005 it's not possible to update our databases in one step anymore, because SQL Compare creates some functions in wrong order. I have made a script for you to test. It cr...
2 followers 2 comments 0 votes
No, SP1 doesn't help. Now I put my problem into SQL Compare 5. I also have an example for you, to try out. Thanks, ;-), Mike / comments
No, SP1 doesn't help. Now I put my problem into SQL Compare 5. I also have an example for you, to try out. Thanks, ;-), Mike
0 votes
API, integrate into own editor
Is there any possibility to integrate SQL Prompt into a self-written editor (with .net 2005)? Are there any APIs for that or something else? Thank you, Michael Kriegner
1 follower 1 comment 0 votes
Hello Brian, thanks for reply. I use 'include dependencies' that's not the problem. Following your answer, I tried to disable transactions, but the problem remains. I looked into the skript. It's not because of transactions. The functions are really in the wrong order ... Here are the parts of the skript: The function KsBaum needs the Function KsBerechtigung. But KsBerechtigung is created at the end of the skript. ..... GO @TRANCOUNT&gt;0 ROLLBACK TRANSACTION GO @TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END GO PRINT N'Creating [dbo].[KsBaum]' GO CREATE FUNCTION [dbo].[KsBaum] ( @Start_Kostenstelle_ID INT, @Anwender_ID INT = NULL, @Berechtigung INT = 0 ) RETURNS TABLE AS RETURN ( WITH KostenstelleBaum( Kostenstelle_ID ) AS ( SELECT Kostenstelle_ID FROM Kostenstelle WHERE Kostenstelle_ID = @Start_Kostenstelle_ID OR ( Gehoert_Zu_Kostenstelle_ID IS NULL AND @Start_Kostenstelle_ID IS NULL ) OR Gehoert_Zu_Kostenstelle_ID = Kostenstelle_ID UNION ALL SELECT Kostenstelle.Kostenstelle_ID FROM Kostenstelle INNER JOIN KostenstelleBaum ON KostenstelleBaum.Kostenstelle_ID = Kostenstelle.Gehoert_Zu_Kostenstelle_ID WHERE Kostenstelle.Kostenstelle_ID <> Kostenstelle.Gehoert_Zu_Kostenstelle_ID ) SELECT Kostenstelle.* FROM Kostenstelle INNER JOIN KostenstelleBaum ON KostenstelleBaum.Kostenstelle_ID = Kostenstelle.Kostenstelle_ID INNER JOIN dbo.KsBerechtigung( @Anwender_ID, @Berechtigung ) KostenstelleBerechtigung ON KostenstelleBerechtigung.Kostenstelle_ID = Kostenstelle.Kostenstelle_ID ) GO @TRANCOUNT&gt;0 ROLLBACK TRANSACTION GO @TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END GO PRINT N'Creating [dbo].[KsSort]' GO ..... @TRANCOUNT&gt;0 ROLLBACK TRANSACTION GO @TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END GO PRINT N'Creating [dbo].[KsBerechtigung]' GO CREATE FUNCTION [dbo].[KsBerechtigung] ( @Anwender_ID INT, @Berechtigung INT ) RETURNS TABLE AS RETURN ( WITH KostenstelleBerechtigung( Kostenstelle_ID ) AS ( SELECT Kostenstelle.Kostenstelle_ID FROM Kostenstelle LEFT JOIN ZU_Anwender_Kostenstelle ON Kostenstelle.Kostenstelle_ID = ZU_Anwender_Kostenstelle.Kostenstelle_ID WHERE ZU_Anwender_Kostenstelle.Anwender_ID = @Anwender_ID OR @Berechtigung <= 20 UNION ALL SELECT Kostenstelle.Kostenstelle_ID FROM Kostenstelle INNER JOIN KostenstelleBerechtigung ON Kostenstelle.Gehoert_Zu_Kostenstelle_ID = KostenstelleBerechtigung.Kostenstelle_ID WHERE @Berechtigung > 20 ) SELECT DISTINCT Kostenstelle_ID FROM KostenstelleBerechtigung ) GO @TRANCOUNT&gt;0 ROLLBACK TRANSACTION GO @TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END GO By the way, in SQL Compare 5.0 I have the same problem. The only hint I have are the CTEs. Everything else is working fine. I had never problems. Any idea? Thank you for helping, ;-), Mike / comments
Hello Brian, thanks for reply. I use 'include dependencies' that's not the problem. Following your answer, I tried to disable transactions, but the problem remains. I looked into the skript. It's n...
0 votes
Comparison Key not set
I have two identical Databases (because of SQL Compare) and want to synchronise with SQL Data Compare. But in some tables the comparison key is not set. Why? What's the problem? Thank you for any h...
2 followers 2 comments 0 votes
Problem with CTE
When I synchronize a new, empty Database I get following error, because of a wrong executing order and I think, it's because of the CTE: The following error message was returned from the SQL Server...
3 followers 7 comments 0 votes