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 Mike Lewis 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: *

  1. jimineep

    word wrap with more / less

    is there a way of using less to open a file with no word wrap, ie with horizontal scrolling? Im sure there is but 'man less > grep "wrap"' doesnt seem to bring up anything. Apologies if this is the wrong forum! Many thanks Jim
  2. jimineep

    split

    cunning, I can turn the \s into \n... But it still doesnt seem to be working, is it standard error instead of standard out? In which case how do I pipe standard error?
  3. jimineep

    split

    is there a way of splitting standard out/ standard error from a script that falls over, so far I've got: % ./scratch.pl | split if you imagine the error was like: asdf asdf werqwer asdfasf asdasdf I want a way to split this up by whitespace to become: asdf asdf werqwer asdfasf asdasdf I...
  4. jimineep

    DISTINCT on some things, not on others

    Still doesnt like it, think its an oracle thing SELECT DISTINCT col1,col2, MIN(col3) * ERROR at line 1: ORA-00937: not a single-group group function
  5. jimineep

    DISTINCT on some things, not on others

    Is it possible to use SELECT DISTINCT to use distinct on certain columns, but not on others, for example "SELECT DISTINCT columna, columnb, columnc FROM table" would bring back all the results where columna, columnb and columnc were not all the same, and if they were it would bring back only...
  6. jimineep

    Creating 2 tables from one on the fly - mind draws a blank

    Hmm not working, its throwing back: from TABLE_NAME as one * ERROR at line 5: ORA-00933: SQL command not properly ended Might be an oracle thing...?
  7. jimineep

    Creating 2 tables from one on the fly - mind draws a blank

    Hi guys, I am currently writing a complicated script (perl) to do something I feel I could do with one SQL command: I have a table - EXP_NAME ID CHANGE A AX 234.23 A AB -23.23 A AC 22.23 B AX -43.25 B...
  8. jimineep

    DBI fetchrow array/ general Perl oo question - quickie

    Hi guys I'm trying to work out if a table exists in my database, using an object which inherits from DBI. my $TableExists = $dbh->fetchrow_array; if ( $TableExists = "NO") { warn "No table";} Now my question is...surely there is a way of combining the $dbh->fetchrow_arraty into the...
  9. jimineep

    Multiple expressions in a SWITCH STATEMENT

    Ahh bugga. Cheers!
  10. jimineep

    Multiple expressions in a SWITCH STATEMENT

    I am trying to do a switch statement which analyses multiple expression: int main(){ char str1[] = "H"; char str2[] = "B"; switch ( * str1, * str2 ){ case 'H''B': printf("%s","YUP"); break; case 'B''B'...
  11. jimineep

    substituting repeated regions in a long string

    gracias ishnid. What does the ?: in (?:AT) mean?
  12. jimineep

    substituting repeated regions in a long string

    I think u misunderstand me. I only want to replace AT with NN when AT is repeated 9 or more times(hence {9,}) ie in this string ATGCACAACAATATACGAATATATATATATATATATCGTATCGC will become this ATGCACAACAATATACGANNNNNNNNNNNNNNNNNNCGTATCGC do u see the difference? I only want to replace repeat...
  13. jimineep

    substituting repeated regions in a long string

    Hi I have a long string in which I want to substitute repeated AT regions with N, ie ATATATATATATATATATAT NNNNNNNNNNNNNNNNNNNN I am having a problem doing this i have tried with tr/// which seems to mask all AT no matter how many repeats there are, and also with the s/// which behaves oddly...
  14. jimineep

    Insert date into MySQL database with DBI

    HAHA I got fed up so had a brief look at some mysql and found out i can just add now() mysql funtion and do away with trying to work out the date!!!! cheers for ure help though, I've noted the sprintf vs printf though i expect thats prob quite basic stuff :$
  15. jimineep

    Insert date into MySQL database with DBI

    ok its printing fine to screen now but for some reason it still wont go into the database which remains 0000-00-00 oh and also the date has become 1900-01-00 :S my $dateImported=(sprintf "%d-%02d-%02d",$year+1900,$mon+1,$day); #COOL CODE, BUT NOT WORKING (SHOULD RETURN INTEGER NOT STRING...
  16. jimineep

    Insert date into MySQL database with DBI

    I heard that too about the security! But really I'm doing it because i had many characters to escape I expect it is more efficient than substition commands to escape the special characters but i still cant get it to work!!!
  17. jimineep

    Insert date into MySQL database with DBI

    Hmm i tried sprintf and dropping the \n ie my ($day,$mon,$year) = (localtime)[3..5]; my $dateImported=(sprintf "%d-%02d-%02d",$year+1900,$mon+1,$day); but unfortunately still no dice I might look for some different code that returns current date to the variable instead of printing it to screen
  18. jimineep

    Insert date into MySQL database with DBI

    I dont think the printf vs sprintf is the problem, as i say the print $dateImported will print 2006-05-16 to screen no problem............
  19. jimineep

    Insert date into MySQL database with DBI

    I bind them because I am dumping large XML files with ' and "s in, so they need to be binded or DBI messes up (this got me for a while!) I will try getting rid of the \n, i just found the code to get the time in this format on a random forum
  20. jimineep

    Insert date into MySQL database with DBI

    Hey I'm using DBI to put a date entered value into a mysql database. However I'm having problems. My date column in NOTNULL but when i enter the date (as a string) from my perl script, whilst all other columns are filled, the date entered column remains 0000-00-00. I know it is calculating the...

Part and Inventory Search

Back
Top