Viewing 15 posts - 1,366 through 1,380 (of 1,539 total)
deepak.spiral (12/23/2008)
my Derived column is in the Integer format ,,
so will this expression will be enough to get the current date in YYYMMDD format ..
or this exprression will give...
December 23, 2008 at 11:45 pm
You can definately test that in ur query window.
YEAR(), MONTH() and DAY() functions return integer, so if u're adding them u'll definately get a sum of these three integers.
I'm not...
December 23, 2008 at 11:41 pm
If that was a plain insert as requested by santosh.lamane, i'd write something like this in the trigger.
=================================
create trigger trg_test on t1
after insert as
insert into t2(col1,col2) select col1,col2 from...
December 23, 2008 at 11:02 pm
declare @dt as varchar(11)
set @dt=left(convert(varchar,getdate()),11)
print @dt
there is no convert option to display mon dd yyyy
December 23, 2008 at 9:56 am
I've never implemented it. Wont be able to say much than what's written in BOL. :hehe:
December 23, 2008 at 5:19 am
in SSMS, expand ur database->Programmability->Stored Procedures
You'll find ur SP there.
December 23, 2008 at 5:17 am
BOL=Books ONLINE. Thats an online reference to SQL Server that u can have on ur machine.
download it from http://www.microsoft.com/downloads/details.aspx?FamilyID=be6a2c5d-00df-4220-b133-29c1e0b6585f&displaylang=en
December 23, 2008 at 5:14 am
i tried this.
select convert(varchar,getdate(),112)+ replace (convert(varchar,getdate(),108),':','')
December 23, 2008 at 5:11 am
Hmmm. in that case SP will be fired only for first row. if firing an sp is absolutely required for each inserted row, cursor will be needed. Any alternative to...
December 23, 2008 at 5:07 am
I think in active/passive u dont need to pay for license on the passive server. 😉 but thats only the cost part of it..
December 23, 2008 at 4:56 am
Modify this query as per your need.
create trigger trg_MyTrigger on myTable
After Insert
AS
Declare @cardType as varchar(100)
Declare @devid-2 as varchar(100)
select @cardType=column1, @devid-2=column2 from inserted
exec HeadCountDetail @cardType, @devid-2
December 23, 2008 at 4:47 am
can u post the error that you're getting during restore.
December 23, 2008 at 4:38 am
for triggers, refer bol at
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/edeced03-decd-44c3-8c74-2c02f801d3e7.htm
contains complete syntax with examples.
for Procs, refer bol at
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/afe3d86d-c9ab-44e4-b74d-4e3dbd9cc58c.htm
this page also has good basic examples.
You can start writing your solution based on the understanding...
December 23, 2008 at 1:56 am
All the best. Be careful!! test that dll from an application multiple times with varied inputs and then attach the DLL(s) to the master database on a test server preferably...
December 22, 2008 at 11:09 pm
within the body of the loop write something like this..
IF(condition to be checked)
begin
BREAK -- this will take u out of loop
end
December 22, 2008 at 11:39 am
Viewing 15 posts - 1,366 through 1,380 (of 1,539 total)