SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 criteria in a seperate file
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

AskSQLTeam
Ask SQLTeam Question

USA
0 Posts

Posted - 06/15/2005 :  07:58:56  Show Profile  Visit AskSQLTeam's Homepage  Reply with Quote
Gary writes "I am consistantly given a .txt file with thousands of numbers. I use these numbers in a query, and have to go through each line inserting a comma after each number. As you can imagine, I don't necessarily 'dig' this process, and would like to refer to the txt file from within the query without having to modify the information. I've had some friends tell me how to do this through writing a seperate application, but can't this be done through using just a query?


Gary Vickery"

JimL
SQL Slinging Yak Ranger

USA
1535 Posts

Posted - 06/15/2005 :  08:11:56  Show Profile  Visit JimL's Homepage  Reply with Quote
How do you know where one number starts and another ends so you can put in the comma?

Jim
Users <> Logic

Edited by - JimL on 06/15/2005 08:12:11
Go to Top of Page

JimL
SQL Slinging Yak Ranger

USA
1535 Posts

Posted - 06/15/2005 :  08:40:37  Show Profile  Visit JimL's Homepage  Reply with Quote
My Guess is these these are tab seperated.
Use bulk insert to drop the .txt into a SQL table then query that table.

Jim
Users <> Logic
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000