Click here to Skip to main content
15,887,337 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I have one table like 'customer' with have 10 records. i want to archive in 5 records.
Finally i want to execute that table like 'select * from customer, then it will display 10 records(5 records are in customer and 5 records are in arching location).
is it possible to get all records..?

can you please help me.
thanks in advance
Posted

1 solution

v3 - based on comment

You will need to a union query along the lings of

SQL
Select fields from Customer

UNION

Select line from
 Dbo.uftReadfileAsTable('MyPath','MyFileName')



See
uftReadFileAsTable.txt[^]

http://www.simple-talk.com/sql/t-sql-programming/reading-and-writing-files-in-sql-server-using-t-sql/[^] for more details
 
Share this answer
 
v3
Comments
K N R 13-Oct-11 9:36am    
hi reiss,
thans for reply, but the tables are not in same database it is in some flat files like notepad..
K N R 13-Oct-11 10:18am    
hey Reiss,

i did not understood what u are explaining, But i want only sql query can you please help me.
Reiss 13-Oct-11 10:26am    
Just to clarify
1) You have production data in a database (Database_Prod) in table Customer
2) You have archived data in a database (Database_Archive) in table Customer
K N R 13-Oct-11 10:29am    
I have production data but 5 records in production data table and 5 records in archived like 'notepad'
Reiss 13-Oct-11 10:33am    
Is 'notepad' a flat file?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900