Server assigned id as input for SQL Statement

The simplest way to populate your database with test data.

Moderators: JonathanWatts, David Atkinson, Anu Deshpande, Michelle Taylor, Lionel, Emma A, sherr

Server assigned id as input for SQL Statement

Postby dunski » Sat Jul 21, 2012 12:01 am

Is it possible to use a server assigned identity column in a SQL statement generator?

For example, I have an Account table with a primary key AccountId which is an autoassigned identity column. That same table has an AccountNumber column.

I want to use the following SQL statement generator to populate AccountNumber:
SELECT fn_GenerateAccountNumber(AccountId);

Thanks!
dunski
 
Posts: 2
Joined: Fri Jul 20, 2012 11:54 pm

Postby dunski » Sat Jul 21, 2012 12:06 am

Nevermind... Solved this with a simple trigger :)
dunski
 
Posts: 2
Joined: Fri Jul 20, 2012 11:54 pm


Return to SQL Data Generator 2

Who is online

Users browsing this forum: No registered users and 0 guests