![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I need to import an excel file every month. The excel file should be imported into a table named 'NewInforec', and the existing table should be |
|
At this time I have this code: DECLARE @month INT; SET @month = DATEPART(mm, GETDATE()); DROP TABLE NewInforec_old EXEC sp_rename 'NewInforec', 'NewInforec_' <---Here the month variable should appear ! CREATE TABLE [NewInforec] ( .........) My question is now: How do I put @month variable at the end of 'NewInfore_' ??? I am sure this is simple for guys like you to explain this to me. TIA /Gulkings |
#3
| |||
| |||
|
|
Hi I need to import an excel file every month. The excel file should b imported into a table named 'NewInforec', and the existing table should b |
|
At this time I have this code DECLARE @month INT SET @month = DATEPART(mm, GETDATE()) DROP TABLE NewInforec_ol EXEC sp_rename 'NewInforec', 'NewInforec_' <---Here the month variabl should appear CREATE TABLE [NewInforec] ( ......... My question is now: How do I put @month variable at the end o 'NewInfore_' ?? I am sure this is simple for guys like you to explain this to me TI /Gulking |
![]() |
| Thread Tools | |
| Display Modes | |
| |