By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,363 Members | 2,358 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,363 IT Pros & Developers. It's quick & easy.

help,a regular text file how to sql 2000 table code ?

P: n/a
help,a regular text file how to sql 2000 table code ?

i have a text file as follow, line with ¡°|¡±and {LF},

8|-000000186075919.|+000000000387820.|2008-03-31|20010423|
9|-000000000003919.|-000000000123620.|2008-03-31|20010123|
8|-000000018623419.|+000000000381230.|2008-05-30|20010423|


i want to sign char(1)£¬year decimal(18,3) , month decimal(18,3), trandate
smalldatetime£¬update smalldatetime£¬after to sql table is as follow,
sign year month trandate update
8 -186075919.000 387820.000 3/31/2008 4/23/2001
9 -3919.000 -123620.000 3/31/2008 1/1/2001
8 -18623419.000 387820.000 5/30/2008 4/23/2001

could you help me how write the sql code ?

Apr 5 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
agiler (su******@tom.com) writes:
help,a regular text file how to sql 2000 table code ?

i have a text file as follow, line with ¡°|¡±and {LF},

8|-000000186075919.|+000000000387820.|2008-03-31|20010423|
9|-000000000003919.|-000000000123620.|2008-03-31|20010123|
8|-000000018623419.|+000000000381230.|2008-05-30|20010423|


i want to sign char(1)£¬year decimal(18,3) , month decimal(18,3), trandate
smalldatetime£¬update smalldatetime£¬after to sql table is as follow,
sign year month trandate update
8 -186075919.000 387820.000 3/31/2008 4/23/2001
9 -3919.000 -123620.000 3/31/2008 1/1/2001
8 -18623419.000 387820.000 5/30/2008 4/23/2001

could you help me how write the sql code ?
You have already posted this question to
microsoft.public.sqlserver.programming and I have answered the question
there. Please do not move the thread to other groups. Also:
Date: Sat, 5 Apr 2008 21:58:14 -0700
This date is the future. Please check your computer clock and your
time-zone settings.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Apr 5 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.