Click here to Skip to main content
15,889,877 members
Home / Discussions / Database
   

Database

 
QuestionDefining stored procedure parameters Pin
Steven J Jowett19-Aug-07 23:35
Steven J Jowett19-Aug-07 23:35 
AnswerRe: Defining stored procedure parameters Pin
Rami Said Abd Alhalim19-Aug-07 23:48
Rami Said Abd Alhalim19-Aug-07 23:48 
GeneralRe: Defining stored procedure parameters Pin
Steven J Jowett19-Aug-07 23:51
Steven J Jowett19-Aug-07 23:51 
Questionsorting fixed length file in sql server Pin
S Palip19-Aug-07 23:35
S Palip19-Aug-07 23:35 
AnswerRe: sorting fixed length file in sql server Pin
Steven J Jowett19-Aug-07 23:41
Steven J Jowett19-Aug-07 23:41 
AnswerRe: sorting fixed length file in sql server Pin
Rami Said Abd Alhalim19-Aug-07 23:50
Rami Said Abd Alhalim19-Aug-07 23:50 
GeneralRe: sorting fixed length file in sql server Pin
S Palip19-Aug-07 23:55
S Palip19-Aug-07 23:55 
AnswerRe: sorting fixed length file in sql server Pin
TomGarth21-Aug-07 13:47
TomGarth21-Aug-07 13:47 
There are better methods for diong this, but maybe this will help some.

***********************

declare @cmd varchar(300), @file varchar(255)
set @file = 'C:\temp.txt'
set @cmd = 'type ' + @file

create table #temp (f_All varchar(255))
create table #temp2 (f1 varchar(10), f2 varchar(50), f3 varchar(10), f4 datetime, f5 varchar (10) )

insert into #temp
EXEC master..xp_cmdshell @cmd

insert into #temp2
select
substring(f_all, 1, 3),
substring(f_all, 5, 12),
substring(f_all, 18, 7),
substring(f_all, 26, 10),
substring(f_all, 37, 3)
from #temp
where f_all is not null

select * from #temp2
-- GROUP, SORT, SUMMARIZE, AND USE IT HOWEVER YOU NEED IT.

drop table #temp
drop table #temp2

**********************

Tom Garth
Developer
R. L. Nelson and Associates, Inc., Virginia

QuestionAuto increment Pin
mimimimilaw19-Aug-07 21:15
mimimimilaw19-Aug-07 21:15 
AnswerRe: Auto increment Pin
Rami Said Abd Alhalim19-Aug-07 21:53
Rami Said Abd Alhalim19-Aug-07 21:53 
GeneralRe: Auto increment Pin
mimimimilaw19-Aug-07 22:12
mimimimilaw19-Aug-07 22:12 
GeneralRe: Auto increment Pin
Rami Said Abd Alhalim19-Aug-07 22:37
Rami Said Abd Alhalim19-Aug-07 22:37 
AnswerRe: Auto increment Pin
Senu Gandhi19-Aug-07 22:30
Senu Gandhi19-Aug-07 22:30 
AnswerRe: Auto increment Pin
Rami Said Abd Alhalim19-Aug-07 22:39
Rami Said Abd Alhalim19-Aug-07 22:39 
GeneralRe: Auto increment Pin
mimimimilaw20-Aug-07 21:19
mimimimilaw20-Aug-07 21:19 
QuestionError in SQL Server 2005 Pin
ksaw12319-Aug-07 20:24
ksaw12319-Aug-07 20:24 
AnswerRe: Error in SQL Server 2005 [modified] Pin
Blue_Boy19-Aug-07 20:47
Blue_Boy19-Aug-07 20:47 
GeneralRe: Error in SQL Server 2005 Pin
ksaw12319-Aug-07 21:33
ksaw12319-Aug-07 21:33 
GeneralRe: Error in SQL Server 2005 Pin
Rami Said Abd Alhalim19-Aug-07 22:05
Rami Said Abd Alhalim19-Aug-07 22:05 
GeneralRe: Error in SQL Server 2005 Pin
ksaw12319-Aug-07 22:12
ksaw12319-Aug-07 22:12 
QuestionHelp me about DTS in SQL server2005! Pin
Kumar!19-Aug-07 19:27
Kumar!19-Aug-07 19:27 
AnswerRe: Help me about DTS in SQL server2005! Pin
originSH19-Aug-07 22:27
originSH19-Aug-07 22:27 
AnswerRe: Help me about DTS in SQL server2005! Pin
Panchal Hardik23-Aug-07 1:22
Panchal Hardik23-Aug-07 1:22 
QuestionJOB in sqlserver Pin
Imran Khan Pathan19-Aug-07 18:41
Imran Khan Pathan19-Aug-07 18:41 
AnswerRe: JOB in sqlserver Pin
John-ph19-Aug-07 21:20
John-ph19-Aug-07 21:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.