dbTalk Databases Forums  

Syntax for Table with Get Date?

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Syntax for Table with Get Date? in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Steve
 
Posts: n/a

Default Syntax for Table with Get Date? - 10-16-2004 , 12:39 AM






Hi,
Can someone please help me with the following
I have to create a table & it should have get date() with it. For example
Table Nmae: CustomersOct16.
I am building a DTS package. Due to large volume of data I am partitoning
the Table on weekly basis. Data load comes in each week therefore when I run
the package automatically
a partitioned table should be created with get date. Can any one please
show me with example/ Syntax how to create such table. Or is there any other
way to create automated partitoned tables. An example with syntax will be
very helpful

Thanks

Steve


Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Syntax for Table with Get Date? - 10-16-2004 , 03:10 AM






What about something like

declare @tblStmt varchar(255)
set @tblStmt = 'CREATE TABLE partition' + CONVERT(CHAR(8),getdate(),112) +
'(col1 int,........)'
print @tblStmt

--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.Konesans.com


"Steve" <Steve (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hi,
Can someone please help me with the following
I have to create a table & it should have get date() with it. For example
Table Nmae: CustomersOct16.
I am building a DTS package. Due to large volume of data I am partitoning
the Table on weekly basis. Data load comes in each week therefore when I
run
the package automatically
a partitioned table should be created with get date. Can any one please
show me with example/ Syntax how to create such table. Or is there any
other
way to create automated partitoned tables. An example with syntax will be
very helpful

Thanks

Steve




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.