Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: bcdixit
  • Content: Threads
  • Order by date
  1. bcdixit

    copy paste contents of a excel worksheet into outlook email body

    Hi, I am new to vbscript. I wanted to copy contents of a excel sheet into the body of any email. Is there a way to do it. I know how to attach the excel file but wanted to copy some contents inside the excel worksheet directly into the email body. the reason being, very few people open the...
  2. bcdixit

    regex question : ignoring first match in pattern search

    I have the following piece of code, #!/usr/bin/perl $txt = "xxx yys"; $txt =~ s/\b/\!/g; print "$txt\n"; basically I want to substitute at a word boundary a '!' character but not on the first word of the string or line. the output that I am currently getting is !xxx! !yys! I want it to...
  3. bcdixit

    getting distinct values of a column in a partition query

    I have a data set that looks something like this in a table storeID DealerCD DealerName DealerPermit ------- -------- ---------- ---------- 1111 980038 John PAC 1111 980041 Bill NAC 1111 980041...
  4. bcdixit

    finding distinct values in a partition query

    I have a data set that looks something like this in a table storeID DealerCD DealerName DealerPermit ------- -------- ---------- ---------- 1111 980038 John PAC 1111 980041 Bill NAC 1111 980041...
  5. bcdixit

    Informatica power center: import control file

    Hi, I want to write a script to import mappings and session automatically. I understand that this can be done using pmrep and the ObjectImport Method. What i am missing is the import control file. can someone please let me know if I can find a sample of it somewhere? thanks
  6. bcdixit

    listening to a process in Perl.

    Hello, I have a perl script in which i need run some other perl script. The way I am doing this is through the system command i.e. something like this. while(<read script names from a file>) { system("$script"); } now, what I want to do is on the screen (STDOUT), I want to display something...
  7. bcdixit

    read a line from a file and writing to the same line in the file

    How do I write to the same line in a file after reading from the that line. #!/usr/contrib/bin/perl $i = "c.txt"; $flag = 0; if (-e $i ) { open(RW,"+<", $i); } else { open(RW,"+>", $i); print RW "0"; $flag = 1; } if($flag == 0) { while(<RW>) { $tmp = $_; } $tmp=$tmp+1...
  8. bcdixit

    running one perl script from another

    Hello, I am trying to write a perl wrapper script that runs multiple other perl scripts. I want to get status of those perl scripts and status of those scripts on stdout. Here is a brief explanation of what I want to do. i have a script perl_wrapper.pl and three scripts perl_1.pl, perl_2.pl and...
  9. bcdixit

    help in update select statement.

    I am running this query and basically I want to insert the row count values from diff_x and diff_y into tl_compare table. this query bombs on me. UPDATE bi_stg_1.TL_COMPARE from diff_x x, diff_y y SET count1 = ( select count(*) from x), count2 = ( select count(*) from y) WHERE...
  10. bcdixit

    comparing two array's in perl

    Hi, I have two arrays, for example, @array = ("john","larry","kevin","peter","mike") @exclude = ("john","kevin") i want to delete from @array , values that exist in @exclude. i.e. i want my @array to look like @array("","larry","","peter","mike") i have written this code but it doesnot seem...
  11. bcdixit

    perl - parse across one or more lines in a text file

    i have a file with the following sample text 1 create table xyz 2 no before journal, 3 no after journal 4 ( 5 col1 integer, 6 col2 integer, 7 ... 8 coln varchar(10) 9 ) 10; i want to use perl regex to search and replace text from the line that starts with 'create' word till the first opening...
  12. bcdixit

    find a word in a line and replace with blank line

    i want to replace a line in a word document with a blank line. I want to replace all the lines in the document that start with a particular word with a blank line. for example. if the document has a line that starts with the following drop xxx drop yyy then I want these two line to be...
  13. bcdixit

    korn shell script - using wildcard in file search

    I have a file that is generated in the following format fb.d.v6.fbp.200606131452.gz i.e. the current TIME is also attached to YYYYMMDD my question is how do i build a IF condition in my ksh script so that I can get something like this below if [[ -s $IN_DIR_Frd/fb.d.v6.fbp.${DT}*.gz ]] the...
  14. bcdixit

    how do I get a sum over month in SQL server ?

    Currently I am running this query to get a sum for each day. select Activity, act_a = sum(case tintactivitytype when 3 then 1 else 0 end), act_b = sum(case tintactivitytype when 4 then 1 else 0 end) from dbo.tblpostpaid group by activity order by activity the column activity is a 'datetime'...
  15. bcdixit

    finding a string in a text file in perl

    I want to search for a particular string in a text file. I was trying to open the file for read and use a while loop to search for the string line by line. I want to stop at the first match but I dont know how to exit from the while loop after the match. could anybody help? any other...
  16. bcdixit

    running one perl file .WITH PARAMETERS. from another perl file

    Hello, i want to run one perl file from another and also want to pass parameters to it. how do it do that? e.g. lets say I have a file called parent.pl in main.pl, i have two variables $x = 'test1'; $y = 'test2'; i want to run a file , lets say child.pl, from main.pl i did the following...
  17. bcdixit

    running a perl file from another perl file

    I want to run a perl file2 from a main perl file1. what function do I use?.. do .. require.. ??? Also, I want to check if the file2 ran successully or not and exit from the main perl file1 and report the error to a log if the execution of the file2 failed? How do I capture that error message...
  18. bcdixit

    need sql to creating a view/ temp table

    I have a table that looks like this. orderid | orderdetailid | desc 0000 1 razr 0001 1 razr 0002 1 v3 0003 1 nokia 0004 1 motorola .. .. .. 1234 1 nokia 1234 2...
  19. bcdixit

    finding only whole word in grep

    How do I find only specific word in a file using grep. for eg. I want to find the word 'PRODUCT' (case insenstive) I used the -i switch to ignore case and -w to match the whole word 'product'. But I find matches that are product PRODUCT PRODUCT_.. I think the '_'(underscore character) is...
  20. bcdixit

    removing unwanted characters from a file

    suppose I have a file called sample.sql which I open in a .pl file the file is something like this when opened in VI (unix editor) šæselect * from a where tablename = 'x';<some white space characters> šæselect * from b where tablename = 'x';<some white space characters> šæselect * from c where...

Part and Inventory Search

Back
Top