Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 DECLARE VARIABLES while inserting into table

Author  Topic 

Blessed1978
Yak Posting Veteran

97 Posts

Posted - 2015-01-24 : 12:11:44
how would I go about inserting into a table


where I am using this format

insert into TABLE1

DECLARE @date datetime
select @date = max(date) from sometable



SELECT DISTINCT col1

from tbl2
inner join ....






gbritton
Master Smack Fu Yak Hacker

2780 Posts

Posted - 2015-01-25 : 09:21:18
What do you want to do with @date ?
Go to Top of Page
   

- Advertisement -