Merry Christmas and Happy New Year

I whish you all a merry christmas and a better New Year.

New Toolbar Feature

I was surfing around and i rediscover a free online toolbar for those who want just click on the image bellow or go to

Yes you can make your own !!!

Create trigger for a table After Inserted

These sp creates automatically a trigger when invoked by job in SQL Server, these is very usefull and handy.

Create procedure [dbo].[sp_creates_trigger]

declare @text nvarchar (800 ) -- Declares a variable called texto

set @text='CREATE TRIGGER [subset_trig] ON [dbo].[Subtable] AFTER INSERT AS BEGIN SET NOCOUNT ON; declare @tfield as varchar(8) set @tfiled = (select id_num from inserted)
update subtable set ufield = @tifield where customer<>''Web'' and id_num=@tfield
-- set the trigger in table subtable for an action After Inserted that updates the table
exec sp_executesql @texto -- executes sp_exceutesql with the text command

Google Analytics Blog: More Enterprise-Class Features Added To Google Analytics

Google Analytics Blog: More Enterprise-Class Features Added To Google Analytics

Still not available to all users but a huge step forward see the video

But we need to track an user and see what is the navigation of the content for example:

city ->New York -> Content visited
region ->California -> Content visited
Network location -> Tv Cabo Portugal-> Content visited
and so one with all the metrics including goal's, % exit's and Bounce Rate.

And with Advance segmentation it's huge step forward

Email Tracking with Google Analytics

Never was so simple to track your email such as Newsletter so i am going to explain you just how easy if you already don´t know, if i make a newsletter your links have to go like these

so after the your page link or your link you to add ?utm_source=Newsletter&utm_medium=email&utm_content=Newsletter&utm_campaign=Newsletter3

- Where is green you have to made changes to your

- utm_source=Newsletter (Which action)
- utm_medium=email (Which medium)
- utm_content=Newsletter (What kind of content)
- utm_campaign=Newsletter_561 ( Which campaign)

Then you can see the results in your Google Analytics account

Don´t forget to publish the html file in your site and include the script of Google Analytics to track your page


When you need to change the name of the server in the operating system and you need to change the name of the SQL Server

  1. First of all Backup your databases
  2. select @@SERVERNAME then it returns the the name of the SQL Server
  3. sp_dropserver 'jmc-pc' name of the server
  4. go
  5. sp_addserver 'ws-jmc', local
  6. go
  7. repeat step 2 after restarting SQL Server to check if the name of SQL Server is OK
  8. More Information in

My Holidays

I have been on holiday in Trás os Montes, Portugal and i share some photos
In Pinhão

Rio de Onor
Museum of Iberian Masc

Bragança seen from the Castel

Miranda Do Douro


How to Solve problems in SQL with Identity

I was working with identity and i had found an problem and a solution to solve these kind of problems.

To see which number is on the identity column:

-- See what is the Identity in the table Articles



Response is:
Checking identity information: current identity value '6', current column value '6'.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.

To setup with a new number on the identity column



articles,reseed ,6000


it returns

Checking identity information: current identity value '1000', current column value '6000'.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.

Don´t use truncate to delete table records it´s faster but it resets the identity column use instead the delete statement

Select Excel

I am going to show on select i use to read excel files XLS

Select *
'Data Source=D:\import\Excel_file.xls;Extended Properties=Excel 8.0')...Sheet1$

To do a proper use of these you must have your excel with headings and these heading must be unique and where you see Sheet1$ is the name of your sheet in your excel remember to keep these name simple and without spaces. The columns must be well formated or you don´t get the results you expect.

Help the world go to

Crystal Reports Tip While Printing Records

Crystal Reports

These tip is very useful when you need to evaluate on run time total's or if specify page footer only prints while the condition is true for example:

WhilePrintingRecords; Booleanvar myvar true

So you can do special calculations.

Crystal Reports SQL Expressions

Very nice explantion about SQL expressions in Crystal

The Crystal Reports Underground News: "Doing a SELECT in a SQL Expression field:

When teaching SQL expression fields I have always tried to stress that SQL Expressions are different from SQL Statements. A SQL Expression is a column in the report, where a SQL statement is a full query. My short version of this was to say 'a SQL Expression can't do a 'SELECT'. Well I recently learned that this is not precisely true. Under certain situations, a SQL Expression CAN do a completely separate select from the main report.

The main limitation is that it can only return a single value. So you probably will need a summary function. The following example comes from the Xtreme Sample Database:
(SELECT Max ( Orders.`Order ID`)
FROM `Orders` Orders)

Normally a CR SQL Expression would error on the SELECT, but if you put this expression in parentheses, Crystal will pass it to the database as a separate query. Amazingly, the column being queried does not even have to come from one of the tables in the report, but can be from another table in the database. In the past I would have recommended doing this via subreport. The advantage of a SQL Expression is that the value returned can be used to control things like Selecting, Sorting and Grouping in the report. To learn more about using complex SQL Expressions see my Experts Guide to SQL Expressions, Options and Commands."

Vista Status

Nowadays Vista has become more stable, in my
experience with Vista in English and in Portuguese I think that company's now can put in to dos list an adoption on Vista but we to consider some details first:

- Hardware
Hardware requirements to a smooth the PC's need at least 2 Gb of Ram and processor Duo core or smilar. You have to check if the hardware is Vista Compliant and check if you the drivers. You can follow these link
To do an inventory in your network such as hardware inventory, compatibility list and reporting.
For those who want to do on single XP PC you can follow these link for microsoft

- Software

In these area you to make an inventory and see if any software that you have isn't compatible with Vista and you must have a special concern regarding legacy applications.
The next step is to do pilot critical application to your business to make these transition smooth like river with no obstacles

If your site PC's are for the major Vendors you should consider to go to the vendor website.

the version of Vista that i recommend is Vista Business
of course in English, because is the most tested and native for the OS


Friend Connect, Open Social, and Ning

Good post relating social Networking

read more | digg story

Google Custom Search and my work

I have been very busy in my work so today i am only speak about Google Co-op and how they contribute to do a better job as you could see in the images below

If you can contribute with a better search option please tell me about i can improve


The open ID it's the possibility of making sign in id to multiple sites, today i done some research and see that in web 2.0 sites is becoming more and more use of these single sign on system.
Major companies already done that the first that i know was Microsoft with passport but these product was not adopted. Nowadays is being carry on with Open Id foundation for some time, these technology is not proprietary it's open to the world.
These technology permits that you can log on the web sites without have to put again and again your login information.

more information on

Now you can do Surveys

Avinash presents in these video a solution to do surveys completely free and you can customize it.
Again Avinash presents simple solution that you can try it a see your customer or visitor answering
to your What and Why question's.

VISTA and Black Screen

To all that already know some updates may cause some black screen on vista . The windows vista when you shutdown the machine always do a restore point, which i agree that is very good.
Remember if your PC with VISTA does not start properly use Safety mode and do a restore point, if you didn´t put some new hardware or else you have to go a see if it´s compatible with VISTA.

It Tech Guys Goes Mobile

New face into to the blog with mobile face like in the picture above with the help with mofuse. Nowdays i don´t have the time to post but i will go ahead with more content

Google Gphone

The Gphone a video from CrunchGears in a Test. When it Goes Live? it seams very fast.

Vista SP1

Microsoft release several documentation that leave here some links.

Let's see if the Vista will improve his reliability and quality let's hope ....

Bill Gates Last Day Video

Very comic video from the CES and the Last Day of Bill Gates. A Visionar person dedicated to good causes like Africa .

SQL Tips

How to identify your version of your Microsoft SQL Server, these handy query to do open a query in SQL Management Studio works on SQL2000 and 2005 ... to identify if your service packs are correctly applied

use Master

SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')

More information in: