Author |
Message |
Esscuseme
Pilla Bewarse Username: Esscuseme
Post Number: 467 Registered: 03-2005 Posted From: 208.51.197.126
Rating:N/A Votes: 0(Vote!) | Posted on Wednesday, May 25, 2005 - 4:11 pm: | |
Buchi mama to make your scheduled job easy. here is what i suggest instead of using SQL server jobs. - Create a .vbs file and write your code there. it resembles much like visual basic code. - then schedule the job using windows schedular whatever time you want on daily basis. This works much better than working with SQL server jobs. |
Halcyon
Pilla Bewarse Username: Halcyon
Post Number: 130 Registered: 09-2004 Posted From: 68.213.245.195
Rating:N/A Votes: 0(Vote!) | Posted on Wednesday, May 25, 2005 - 4:04 pm: | |
I think all the Qs you have, are answered in the docs. A long while ago, I remember doing something using xp_cmdshell and using OS commands to write output to it to files and send via email. I guess you can do the same with ftp. You may need to use bcp like: bcp "SELECT au_fname, au_lname FROM pubs..authors ORDER BY au_lname" queryout Authors.txt -c -Sservername -Usa -Ppassword |
Avinash
Pilla Bewarse Username: Avinash
Post Number: 63 Registered: 03-2005 Posted From: 209.234.142.80
Rating:N/A Votes: 0(Vote!) | Posted on Wednesday, May 25, 2005 - 3:48 pm: | |
fixed length ante data in the file EMPLID(6) SSN(10) 000123437778899 ila I need options for the name of the extract file like: filename_yesterdays date |
Smart
Mudiripoyina Bewarse Username: Smart
Post Number: 3652 Registered: 03-2004 Posted From: 207.199.2.34
Rating:N/A Votes: 0(Vote!) | Posted on Wednesday, May 25, 2005 - 3:46 pm: | |
>>Text file ayite can we get fixed length file? are u talking about the name of the file? |
Smart
Mudiripoyina Bewarse Username: Smart
Post Number: 3650 Registered: 03-2004 Posted From: 207.199.2.34
Rating:N/A Votes: 0(Vote!) | Posted on Wednesday, May 25, 2005 - 3:43 pm: | |
Buchi mama, SQL jobs ani untayi choodu. Enterprise manager lo, select the database, right click -> new -> jobs. I guess you can define a recurring job there. |
Buchi
Kurra Bewarse Username: Buchi
Post Number: 231 Registered: 04-2004 Posted From: 209.234.142.80
Rating:N/A Votes: 0(Vote!) | Posted on Wednesday, May 25, 2005 - 3:42 pm: | |
In jobs can the results be posted to a Text file and FTP it to another server?? Text file ayite can we get fixed length file? |
Halcyon
Pilla Bewarse Username: Halcyon
Post Number: 129 Registered: 09-2004 Posted From: 68.213.245.195
Rating:N/A Votes: 0(Vote!) | Posted on Wednesday, May 25, 2005 - 3:41 pm: | |
You can run a job under SQL server agent and schedule it. Look in Enterprise Managaer, Management->SQL Agent->Jobs |
Buchi
Kurra Bewarse Username: Buchi
Post Number: 229 Registered: 04-2004 Posted From: 209.234.142.80
Rating:N/A Votes: 0(Vote!) | Posted on Wednesday, May 25, 2005 - 3:38 pm: | |
Halycon, smart, Esscuse me In SQL Server: 1. Can we automate to run a query every night and post a query results into a Text File 2.My DBA says he cannot give us a FIXED LENGTH file in SQL SERVER? what are the tools to run a query every night and post the results to a text file on sql server? |
Halcyon
Pilla Bewarse Username: Halcyon
Post Number: 128 Registered: 09-2004 Posted From: 68.213.245.195
Rating:N/A Votes: 0(Vote!) | Posted on Wednesday, May 25, 2005 - 3:37 pm: | |
select dateadd(d, -1, getdate()) |
Buchi
Kurra Bewarse Username: Buchi
Post Number: 228 Registered: 04-2004 Posted From: 209.234.142.80
Rating:N/A Votes: 0(Vote!) | Posted on Wednesday, May 25, 2005 - 3:37 pm: | |
Smart got it. Plz answer my other question |
Smart
Mudiripoyina Bewarse Username: Smart
Post Number: 3648 Registered: 03-2004 Posted From: 207.199.2.34
Rating:N/A Votes: 0(Vote!) | Posted on Wednesday, May 25, 2005 - 3:33 pm: | |
use GetDate() function http://msdn.microsoft.com/library/default.asp?url= /library/en-us/tsqlref/ts_ga-gz_4z51.asp |
Gkrish
Pilla Bewarse Username: Gkrish
Post Number: 42 Registered: 05-2004 Posted From: 66.207.137.50
Rating:N/A Votes: 0(Vote!) | Posted on Wednesday, May 25, 2005 - 3:31 pm: | |
use Datediff function |
Buchi
Kurra Bewarse Username: Buchi
Post Number: 227 Registered: 04-2004 Posted From: 209.234.142.80
Rating:N/A Votes: 0(Vote!) | Posted on Wednesday, May 25, 2005 - 3:29 pm: | |
In Sql Server what is the option to look for (SYSDATE - 1) I need to get yesterday's date on sql server |
Buchi
Kurra Bewarse Username: Buchi
Post Number: 226 Registered: 04-2004 Posted From: 209.234.142.80
Rating:N/A Votes: 0(Vote!) | Posted on Wednesday, May 25, 2005 - 3:27 pm: | |
In SQL Server: 1. Can we automate to run a query every night and post a query results into a Text File 2.My DBA says he cannot give us a FIXED LENGTH file in SQL SERVER? what are the tools to run a query every night and post the results to a text file on sql server? If yes answers plz!! |
Hero
Yavvanam Kaatesina Bewarse Username: Hero
Post Number: 1391 Registered: 04-2004 Posted From: 81.76.87.156
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 7:09 pm: | |
siranjeevi ni yeppudaina kalisava?? manalni kalavataaniki okadu raavaali gaani manam ellam maama.. |
Esscuseme
Pilla Bewarse Username: Esscuseme
Post Number: 461 Registered: 03-2005 Posted From: 208.51.197.126
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 7:08 pm: | |
Avinash mama bay area lo ekkada east bay? south bay? north bay? |
Hero
Yavvanam Kaatesina Bewarse Username: Hero
Post Number: 1390 Registered: 04-2004 Posted From: 81.76.87.156
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 7:07 pm: | |
nenu .NET meeda maama work mama back end ORACLE 10G & Sql 2000 |
Brad
Bewarse Legend Username: Brad
Post Number: 21595 Registered: 03-2004 Posted From: 204.99.118.9
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 7:07 pm: | |
nenu London mama siranjeevi ni yeppudaina kalisava?? |
Avinash
Pilla Bewarse Username: Avinash
Post Number: 62 Registered: 03-2005 Posted From: 209.234.142.80
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 7:06 pm: | |
Bayarea daggarlo mama!! |
Hero
Yavvanam Kaatesina Bewarse Username: Hero
Post Number: 1389 Registered: 04-2004 Posted From: 81.76.87.156
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 7:06 pm: | |
SQL server oka peddda boku database mama.Oracle very flexi.. kaani small, medium companies anta invest cheyyalevugaa.. nenu London mama.. |
Avinash
Pilla Bewarse Username: Avinash
Post Number: 61 Registered: 03-2005 Posted From: 209.234.142.80
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 7:05 pm: | |
Esscuse mama ee technologies meedha working?? hero mama nuvvu?? |
Esscuseme
Pilla Bewarse Username: Esscuseme
Post Number: 460 Registered: 03-2005 Posted From: 208.51.197.126
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 7:05 pm: | |
Avinash mama, microsoft anthe, microsoft anthe nuvvu ekkada untavu mama |
Avinash
Pilla Bewarse Username: Avinash
Post Number: 60 Registered: 03-2005 Posted From: 209.234.142.80
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 7:03 pm: | |
enti mama SQL Server meeda DATE manipulations intha chiraku gha undi Oracle picha kewl gha untundhi mama Hero mama, nuvvu ekkada untavu?? thanksee for the helpu |
Esscuseme
Pilla Bewarse Username: Esscuseme
Post Number: 459 Registered: 03-2005 Posted From: 208.51.197.126
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 6:59 pm: | |
Avinash, very good mama.... atlast we heard from you |
Avinash
Pilla Bewarse Username: Avinash
Post Number: 59 Registered: 03-2005 Posted From: 209.234.142.80
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 6:59 pm: | |
Esscuse mama and Hero mama, Thanks for the help!!... Interface run chestu anni close chesa.. It worked guys.... |
Brad
Bewarse Legend Username: Brad
Post Number: 21588 Registered: 03-2004 Posted From: 204.99.118.9
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 6:58 pm: | |
seppanu gaa meericchina salhalaki system crash.. so wait seyyandri... |
Hero
Yavvanam Kaatesina Bewarse Username: Hero
Post Number: 1386 Registered: 04-2004 Posted From: 81.76.87.156
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 6:58 pm: | |
vaddu daatangaane teppa tagalese rakam anukuntaa maama, naaku ikkada 1:00 am ayyindi ayina sare kasta padi edo help cheste ayipulekunda..dengsss |
Esscuseme
Pilla Bewarse Username: Esscuseme
Post Number: 457 Registered: 03-2005 Posted From: 208.51.197.126
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 6:52 pm: | |
Hero babai, avinash mama itla hand icchhadu ....
|
Hero
Yavvanam Kaatesina Bewarse Username: Hero
Post Number: 1381 Registered: 04-2004 Posted From: 81.76.87.156
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 6:45 pm: | |
.NET>London>Vijayawada |
Esscuseme
Pilla Bewarse Username: Esscuseme
Post Number: 456 Registered: 03-2005 Posted From: 208.51.197.126
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 6:44 pm: | |
Hero mama, software, Bay area, kurnool How about you mama |
Hero
Yavvanam Kaatesina Bewarse Username: Hero
Post Number: 1379 Registered: 04-2004 Posted From: 81.76.87.156
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 6:41 pm: | |
telegu raadaa.. sare select your_profession, your_work_place, your_birth_place from Esscuseme; |
Esscuseme
Pilla Bewarse Username: Esscuseme
Post Number: 453 Registered: 03-2005 Posted From: 208.51.197.126
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 6:38 pm: | |
Hero mama, |
Hero
Yavvanam Kaatesina Bewarse Username: Hero
Post Number: 1378 Registered: 04-2004 Posted From: 81.76.87.156
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 6:35 pm: | |
Esscuseme maaya nuvvu emi chestuntaav |
Brad
Bewarse Legend Username: Brad
Post Number: 21581 Registered: 03-2004 Posted From: 204.99.118.9
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 6:34 pm: | |
system crash anta.. mee andarini taruvatha iraga kummettadante. get ready... |
Esscuseme
Pilla Bewarse Username: Esscuseme
Post Number: 451 Registered: 03-2005 Posted From: 208.51.197.126
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 6:34 pm: | |
Avinash babai, what happend...did it work... |
Hero
Yavvanam Kaatesina Bewarse Username: Hero
Post Number: 1377 Registered: 04-2004 Posted From: 81.76.87.156
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 6:32 pm: | |
eti avinash maaya solve ayyinda leda ippudu conperm cheyyi |
Hero
Yavvanam Kaatesina Bewarse Username: Hero
Post Number: 1376 Registered: 04-2004 Posted From: 81.76.87.156
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 6:27 pm: | |
sorry dob badulu nee table lo column name pettu avinash maaya |
Hero
Yavvanam Kaatesina Bewarse Username: Hero
Post Number: 1375 Registered: 04-2004 Posted From: 81.76.87.156
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 6:26 pm: | |
yes mama Esscuseme cheppindi work avvuddi, lekapote idi try cheyyi select CAST(DATEPART(dd, dob) as nvarchar) + '-' + SUBSTRING(CAST(DATENAME(M, dob) as nvarchar), 1, 3) + '-' + CAST(DATEPART(yyyy, dob) as nvarchar) from person |
Esscuseme
Pilla Bewarse Username: Esscuseme
Post Number: 450 Registered: 03-2005 Posted From: 208.51.197.126
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 6:23 pm: | |
this will work SELECT DATENAME(dd, <fieldname>) + '-' + convert(char(3), DATENAME(month, <fieldname>)) + '-' + DATENAME(yyyy, <fieldname>) |
Avinash
Pilla Bewarse Username: Avinash
Post Number: 58 Registered: 03-2005 Posted From: 209.234.142.80
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 6:19 pm: | |
Esscuseme mama, MM does not work I am using sql server version 8.00 Any other ideas? |
Esscuseme
Pilla Bewarse Username: Esscuseme
Post Number: 449 Registered: 03-2005 Posted From: 208.51.197.126
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 6:16 pm: | |
avinash mama, try this SELECT DATENAME(dd, <fieldname>) + '-' + DATENAME(mm, <fieldname>) + '-' + DATENAME(yyyy, <fieldname>) note the change...instead month, i changed it to mm if this does'nt work, let me know which version sql server are you using becuase it works just fine for me using both sqls} |
Tifosi
Mudiripoyina Bewarse Username: Tifosi
Post Number: 3982 Registered: 03-2004 Posted From: 208.37.228.208
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 6:16 pm: | |
are u using sql loader to insert data into oracle...if not then dmp the data from the sql server into an excel file and using excel formulas concatenate the columns to create an insert statement. |
Tifosi
Mudiripoyina Bewarse Username: Tifosi
Post Number: 3981 Registered: 03-2004 Posted From: 208.37.228.208
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 6:13 pm: | |
use mon in the to_date function. im assuming you are storing it in a date field |
Avinash
Pilla Bewarse Username: Avinash
Post Number: 57 Registered: 03-2005 Posted From: 209.234.142.80
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 6:12 pm: | |
Tifosi mama, I extract the data on the sql server side into a text file. so I need in the oracle date format...when I extract from the SQL Server |
Avinash
Pilla Bewarse Username: Avinash
Post Number: 56 Registered: 03-2005 Posted From: 209.234.142.80
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 6:11 pm: | |
Hero and Esscuseme mamas ekkadaki vellaru?? come come !! |
Tifosi
Mudiripoyina Bewarse Username: Tifosi
Post Number: 3980 Registered: 03-2004 Posted From: 208.37.228.208
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 6:11 pm: | |
oracle should recognize it if you format the input correctly... |
Avinash
Pilla Bewarse Username: Avinash
Post Number: 55 Registered: 03-2005 Posted From: 209.234.142.80
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 6:08 pm: | |
Hero mama, See my earlier post. I need it like this 24-AUG-2005 instead of 24-AUGUST-2005 |
Avinash
Pilla Bewarse Username: Avinash
Post Number: 54 Registered: 03-2005 Posted From: 209.234.142.80
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 6:06 pm: | |
Esscuseme mama: Thanks it worked. But I need a small modification I am getting like this: 24-August-2005 I need to load into oracle so I need in this format 24-AUG-2005 All others thanks for your input!! |
Hero
Yavvanam Kaatesina Bewarse Username: Hero
Post Number: 1374 Registered: 04-2004 Posted From: 81.76.87.156
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 6:06 pm: | |
I got it avinash. here you go. select CAST(DATEPART(dd, column_name) as nvarchar) + '-' + CAST(DATENAME(mm, column_name) as nvarchar) + '-' + CAST(DATEPART(yyyy, column_name) as nvarchar) from table_name |
True_indian
Mudiripoyina Bewarse Username: True_indian
Post Number: 3541 Registered: 03-2004 Posted From: 24.74.112.215
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 6:00 pm: | |
rakapote user error anuko mama |
Tifosi
Mudiripoyina Bewarse Username: Tifosi
Post Number: 3979 Registered: 03-2004 Posted From: 208.37.228.208
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 5:57 pm: | |
pyd maayaaa..... |
Pandora_yokka_dabba
Pilla Bewarse Username: Pandora_yokka_dabba
Post Number: 22 Registered: 05-2005 Posted From: 67.62.108.106
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 5:53 pm: | |
format(date(required format)) |
Hero
Yavvanam Kaatesina Bewarse Username: Hero
Post Number: 1373 Registered: 04-2004 Posted From: 81.76.87.156
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 5:52 pm: | |
select CONVERT(char (11), column_name) from table_name it should work, other wise let me know. |
Smart
Mudiripoyina Bewarse Username: Smart
Post Number: 3624 Registered: 03-2004 Posted From: 207.199.2.34
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 5:50 pm: | |
Essume mama's code would solve your problem |
Tifosi
Mudiripoyina Bewarse Username: Tifosi
Post Number: 3978 Registered: 03-2004 Posted From: 208.37.228.208
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 5:49 pm: | |
oops oracle anukoni egeskunTu occha |
Esscuseme
Pilla Bewarse Username: Esscuseme
Post Number: 447 Registered: 03-2005 Posted From: 208.51.197.126
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 5:46 pm: | |
Tifosi mama, to_date is not a valid function name in SQL server i think. |
Esscuseme
Pilla Bewarse Username: Esscuseme
Post Number: 446 Registered: 03-2005 Posted From: 208.51.197.126
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 5:45 pm: | |
Avinash mama, this will work SELECT DATENAME(dd, <fieldname>) + '-' + DATENAME(month, <fieldname>) + '-' + DATENAME(yyyy, <fieldname>) |
Tifosi
Mudiripoyina Bewarse Username: Tifosi
Post Number: 3977 Registered: 03-2004 Posted From: 208.37.228.208
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 5:38 pm: | |
in your query use this your your date column to_date (<column_name>, 'yyyy/mm/dd') |
Avinash
Pilla Bewarse Username: Avinash
Post Number: 53 Registered: 03-2005 Posted From: 209.234.142.80
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 5:37 pm: | |
ehee end of the day burra panicheyyadam ledu oolluu leraa?? |
Brad
Bewarse Legend Username: Brad
Post Number: 21549 Registered: 03-2004 Posted From: 204.99.118.9
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 5:32 pm: | |
smart mama oka soopu soodu.. |
Avinash
Pilla Bewarse Username: Avinash
Post Number: 52 Registered: 03-2005 Posted From: 209.234.142.80
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 5:31 pm: | |
somebody call Rajahmundry and Halycon |
Avinash
Pilla Bewarse Username: Avinash
Post Number: 51 Registered: 03-2005 Posted From: 209.234.142.80
Rating:N/A Votes: 0(Vote!) | Posted on Tuesday, May 24, 2005 - 5:30 pm: | |
In my interface I need data from SQLSERVER I just need only the DATE from DATETIME Field Example: 05-MAY-2005 15:25:00.000 DATETIME When I write my query I just need DATE 05-MAY-2005 from this DATETIME Field Answer plz !! |