...all client that where entered from the previosu month.
I was able to resolve it by entering the following command.
Alter view view_name
as
select * from table
Where
Active_client = 'Y'
And sales = 1
And
-- this is beginning of previous month
Entered_Date >= DateAdd(mm...
...accomplish a simple view sql select using WHERE Clause conditional based on End of Month date
This is my View sql
Alter view view_name
as
select * from table
Where
Active_client = 'Y'
And sales = 1
AND (if day(getdate()) = 1 -- Beginning of new month...
I was able to use the T-SQL in the job agent:
exec master..xp_cmdshell 'ftp -s:c:\Temp\FTP_Files.bat'
It worked flawless
The batch file is listed below.
Hope it will help.
Where FTP_Files.bat:
REM -- open the FTP site
open 216.234.107.155
userLogin REM Your Login
userpassword REM Your...
Thank you
yes the batch file worked perfectly fine.
Also an add on:
I was remotely logged in to the server.
C: was my local PC instead of my remote drive.
I realized I had to go to my remote and from there access the C: drive. (That was resulting my error of not finding the file)
regards :)
simian336:
Thank you for your response
Yes I should made it clear (becuase I copied in the root and the temp folder)
c:\Temp>ftp -s:ftp2site.scr
SQL:
master.dbo.xp_cmdshell 'ftp -s:c:\temp\ftp2site.scr'
Please advice
Thank you
I am trying to execute a command to transfer data file within SQL job agent using FTP
I have created a dos batch file called ftp2site.scr:
--ftp2site.scr:
REM -- BEGIN BATCH File
@echo off
open 216.22.1.333
mylogin
mypass
cd /user/download
put "CustDataFile.xls"
bye
REM -- End OF FIle
FTP works...
Ihave 2 files that are schedule to execute arouund mid day.
I need to find out how can I scheduleto FTP these 2 files within Sql jobs.
I have the following:
Set @FTP_Server = 'ftp://123.456.789.155'
Set @FTP_User = 'mylogin'
Set @FTP_PWD = 'mypass'
Set @FTP_Path = '/user/invoice_import/'
Set...
Using Crystal Report 9.
I am using Join(parameter,",") to display
user selection.
My question is it possible to display the parameter description as well.
Thnak you
Using: SQL 2005 on the server
login: sa (administrator)
I am trying to schedule an export to excel.
It works fine when executed manually but when I tried to schedule a job it Fails.
I know that the problem is between our server SQl (which is 64 Bits) and Excel using 32 bits.
How can I resolve...
Thank you for your reply.
I tried on the same server login as sa but still no success.
I tried to have a password encrypted as well on the package still No success
I even tried serverstorage protection still not working.
Please advice
Thank you
dre
Problem Or BUG in SSIS package scheduling a JOB using SQL 2005:
I have been trying to create SSIS package in SQL 2005 but it seems extremely
difficult to deploy a new job schedule.
I tried all security features, read about every forum still not successfull.
even Microsoft admit that scheduling...
This should be quite simple. I have spent 4 hours trying to figure it out.
I am trying to export sql view to an excel file and it is failing because of the login sa.
These are the steps to export.
Using Sql Server 2005
1 - Used Import Export wizard in sql
2 - logged in as sa + pasword
3 - Saved...
I was able to figure it out.
Defining alias fields turnout to be quite a challenge.
I had about 210 fields to export to excel. And everytime I was exporting via Import/Export Wizards it will fail.
I found out that fields cannot have '?' as well as 'DOB' and one strange Field that you cannot have...
SSIS:
I am using SSIS package to get sql to an excel file output.
The operation failed due to the character string between sql and excel.
However I was able to use the import export utility to execute sql to flat file which works beautiful.
So I am trying to get Ascii to excel.
SSIS: SQl -->...
I am using CR9
I was wondering and it is very helpfull to have a function to print window username in the report.
*******************************************
Is there a function in CR9 to print Window user name login
**************************
Please advice
Thnk you
D
...works ok
therefore
create table #TempTable (Item char(30), desc char(30),fDate date,fDate date,Qty int,Location int)
insert into #TempTable execute stProc 1010,'04-01-2010','04-30-2010',100002
select * from #TempTable
drop table #TempTable
works ok
Thank you for your help
Dre
I am using sql 2000:
I need to select some fields from an already defined complex stored procedure.
and then calculate some var based on returns fields from the stored procedure.
i have :
p1=pass parameter1...
stproc(p1,p2,p3) which returns table with field1,field2,field3
I need to create a...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.