Clustered or not clustered

Do you remember the Clustered Index bug of 4.0SP1 (see also http://www.mibuso.com/dlinfo.asp?FileID=594)?
In short: 4.0SP1 forgot to set the index-property “Clustered” on the primary key (the default is that the primary key is clustered). The result is that the tables were heap-tables and that is (generally) bad for performance.
The fix was to put the key-property Clustered […]

Happy birthday/retirement Windows 2000!

The title could also be “Windows 2000, XP SP2 and Vista End of Life Support”, but I found my title funnier.
The fact is that Windows 2000 is close to 10 years old and it is retiring (together with some younger versions).
What is this about : Microsoft stops supporting some windows versions. That means:no more free […]

Did you know table 36 has a BLOB field?

It is field 8725:”Signature” and it seems to be used in F8726:”Mobile Order Signature”.
 
Question: Why a post about this field?
 
Answer: Because it can (and sooner or later) will cause performance problems.
 
What happened?
A colleague calls me to tell a customer has performance problems open the sales order form. But not always.
I found out that when opening […]

Am I a detective?

Maybe you ask: what title did he invent now? It has nothing to do with NAV or SQL
Oh, yes! It is about both!
Here it comes.
The crime scene: NAV2009 classic client with NAV Jobqueus that launches a job in a Webservice and goes on with other jobs (thanks to ara3n for his blog that helped me […]

Customer with only Windows logins (and you are NOT in their domain)

Have you been at a customer where ONLY Windows logins are allowed?
 
So launching NAV (or SQL Server Management Studio) to connect to their database is impossible.
 
Can you connect to their database if you don’t have a remote terminal or citrix to some computer in their domain?
 
Yes, you can!
 
Microsoft has a little (sysinternals) tool (shellrunas.exe) that […]

NAV Date table in SQL-statement

And now that I am busy with recursion:
– recursive CTE to generate numbers like the NAV date table
DECLARE @from AS DATE;
DECLARE @to AS DATE;
SET @from = ‘2009-01-16′;
SET @to = ‘2009-03-20′;
WITH DateTable ([The Date]) AS
(SELECT @to
UNION ALL
SELECT DATEADD(DAY,-1,[The Date])
FROM DateTable
WHERE DATEADD(DAY,-1,[The Date]) >= @from
)
SELECT *
FROM DateTable
ORDER BY [The Date]
OPTION (MAXRECURSION 0)
See also the forum

NAV integer table in SQL-statement

If we want to loop on integers in NAV, we can use the integer table and put some filters on it.
The problem is that in SQL, we don’t have such a table.
It is possible to create the table with a recursive CTE (Common Table Expression).
If you want, you can also put the select into a […]

STRSUBSTNO bug or feature

I just got some strange error using STRSUBSTNO:
The text ‘…’ in STRSUBSTNO parameter no. 1 is too long.
Surprise : Is the string I give already longer than 1024 chars? But shouldn’t I have got an error when assigning that value to my variable that I sent into STRSUBSTNO?????
I was wondering if STRSUBSTNO was still limited […]

License file in SQL

A lot of times there are questions about the license in SQL. How to import it? At what scope serves the “Save license in database” toggle in Tab integration?
 
Here a short explanation:
 
*File=>Database=>Alter=>Tab Integration=>Save license in database.
A license can be cut to be used at server level (this means the same license and the same number […]

Set based thinking in NAV

As we all (should) know, SQL is based on sets and NAV works iterative with records.
Sometimes it is possible to do set based programming also in NAV.
I just found an example in which we can speed up something thinking in sets (1 record is also a set!) instead of iterative. The beautiful thing is: it […]

Create a new blog and join in the fun!