We had a convention started already when we found that out. This is an old
one that I am updating.
I ended up doing it like you already posted.
EXECUTE(' into RestMicros_ccauthdtl
select A.* from ' + @dt_db + '.dbo.[1micros_cc_auth_dtl] A,
' + @dt_db + '.dbo.[1micros_trans_dtl] B
where A.trans_seq = B.trans_seq
and B.business_date = ' + @dt_date + ' ) ')
David
-----Original Message-----
From: Robertson-Ravo, Neil (RX)
[mailto:[EMAIL PROTECTED]
Sent: Thursday, June 23, 2005 11:43 AM
To: CF-Talk
Subject: RE: Anyone know to do this in a SQL SP?
You should also avoid naming your user stored procedures with "sp_" - this
will lead to increased lookup time when the system accesses the SP as it
will always look into the master DB for the sp first.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 23 June 2005 16:36
To: CF-Talk
Subject: Anyone know to do this in a SQL SP?
Anyone know to do this in a SQL SP?
I want to pass @dt_db which is the database. This code errors...
CREATE procedure sp_populate_micros_temp_tables
@dt_db varchar,
@dt_date datetime
as
select A.* from @dt_db.dbo.[1micros_cc_auth_dtl] A,
@dt_db.dbo.[1micros_trans_dtl] B
GO
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble
Ticket application
http://www.houseoffusion.com/banners/view.cfm?bannerid=48
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:210367
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54