Viewing 15 posts - 136 through 150 (of 168 total)
works perfect Liliana ... thanks again for everything
February 14, 2006 at 12:29 pm
I'm a little slow at SQL, but usually can "get it" after looking at it a while. I'm having a hard time getting Liliana's code into a table.
Jesper I wasn't...
February 14, 2006 at 9:11 am
That works great. I'm embarrassed to ask this, but how can I get it into a table, LOL.
Lets assume I want the results I see on the screen added to...
February 13, 2006 at 1:30 pm
Thanks I'm on my way to visit the school now but will try this when I return.
February 13, 2006 at 11:28 am
I'm thinking something like this. I used 2000 for testing, changed table name to _fixdate.
SELECT
Seq as Seq,
UserName as UserName,
Operation as Operation,
DateIn as DateIn
INTO ##TempDupStop
FROM _FixDate
WHERE Processed <> 0
AND DATEDIFF(ss,DateIn,GETDATE()) <...
January 28, 2006 at 6:14 am
"why you are using a temporary table rather than a variable to hold the maximum sequence value"
I'm a hack. Will look at your code. Never used a variable. Thanks!
January 22, 2006 at 5:56 pm
I was close, figured it out.
EXEC master..xp_cmdshell 'osql -U______ -P______ -Q"SET NOCOUNT ON select * from MyTable" -dAutoMail -h-1 -oc:\output.txt', no_output
December 23, 2005 at 9:31 pm
I'm using it to compare the data of two rows in five large tables. The first row of data I'm pulling is data in the system from where the user...
May 6, 2005 at 3:55 am
SELECT * returns the data in the table. What I'd like is the data and the column headers as data.
So in query analyzer, the results normally would look like this:
SampleField...
May 5, 2005 at 9:03 pm
Yes that works well. Thanks.
May 2, 2005 at 9:02 pm
The single command works like this:
EXEC master..xp_cmdshell 'MOVE C:\ImportData\ImportData.txt C:\ImportData\Finished\ImportDataChanged.txt'
When I add the + @NewFileName it does not work
EXEC master..xp_cmdshell 'MOVE C:\ImportData\ImportData.txt C:\ImportData\Finished\' + @NewFileName
May 2, 2005 at 9:06 am
The last line of this does not work ... any ideas?
DECLARE
@TodayDate as varchar(40),
@TodayHour as varchar(40),
@TodayMinu as varchar(40),
@NewFileName as varchar(100)
SELECT @TodayDate = CONVERT(varchar(10), GETDATE(), 112)
SELECT @TodayHour = DATEPART(hh,GETDATE())
SELECT @TodayMinu = DATEPART(mi,GETDATE())
SELECT...
May 1, 2005 at 12:47 pm
I'm getting closer:
EXEC master..xp_cmdshell 'REN C:\ImportData\ImportData.txt ImportData1.txt'
EXEC master..xp_cmdshell 'MOVE C:\ImportData\ImportData1.txt C:\ImportData\Finished\ImportData1.txt'
May 1, 2005 at 12:36 pm
This will work for naming the file. Now all I need to do is figure out how to move and rename the file.
DECLARE
@TodayDate as varchar(40),
@TodayHour as varchar(40),
@TodayMinu as varchar(40)
SELECT @TodayDate...
May 1, 2005 at 12:17 pm
Viewing 15 posts - 136 through 150 (of 168 total)