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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by sampsonr

  1. sampsonr

    Wanted: way to force a null (not NULL) value into a column.

    SantaMufasa, Either solution would be satisfactory as long as it didn't require major application level changes to the existing SQL that could cause incompatibilities with other databases. The app (Cerious software's ThumbsPlus) uses a SQL script to create the initial database that it connects...
  2. sampsonr

    Wanted: way to force a null (not NULL) value into a column.

    I'm working (strictly as a knowledgable user) with an app vendor to extend their support to Oracle. To avoid major changes, they need a way to force a null value ('') into column since a lot of built-in SQL code uses expressions like "COLVAL = ''" rather than "COLVAL IS...
  3. sampsonr

    Strange command run

    The backticks don't protect the dollar sign inside the expression. The result is that the $5 evaluates as the 5th pattern match (probably null) is passed to the shell that way. You need to escape the dollar sign to make it work the way you expect. $size = `ls -l filename | awk '{print \$5}'`;
  4. sampsonr

    Convert Windows batch file into Perl script

    Even though batch language has no explicit test for whether a directory exists, you can take advantage of the fact that every directory always contains at least directory entries (. and ..) Try this comamnd before line 11: IF NOT EXISTS %GROUP_DIR%\. THEN MKDIR %GROUP_DIR%
  5. sampsonr

    SQL Query result not stable

    Dima nailed it (again). Try this to see what's happening: SELECT TO_CHAR(A.REG,'DD-MON-YYYY HH24:MI:SS'), TO_CHAR(TO_DATE(A.REG,'DD-MON-YYYY HH24:MI:SS'),'DD-MON-YYYY HH24:MI:SS') FROM PLAYERINFO_VIEW A WHERE A.REG IS NOT NULL
  6. sampsonr

    Unknown command beginning 'order by...' ??

    I've seen this kind of behavior in cases where there's a comment that has a semi-colon in it just before the ORDER BY. SQL*Plus doesn't seem to notice that it's commented out and then it thinks the ORDER BY on the next line is a new command.
  7. sampsonr

    Question from a beginner

    Your closing statement begs for a sarcastic remark, but I'll just wish you luck and move on. I don't participate here to help cheat at games.
  8. sampsonr

    Question from a beginner

    It's not very clear what you're asking here. Can you clarify? Since $a is a scalar variable, how can it have several values? Also, since the values you cite are numbers, rather than strings, you should be using ($a == $b), not ($a eq $b).
  9. sampsonr

    Any ideas on speeding up this simple script.

    Programmatically, this looks to be just about as tight as it can get. The only way I see to make it faster might be to rewrite it in C, and even that doesn't guarantee improvement since I/O is likely the cause of the slowdown. If it's practical, I'd consider a systemic solution, ensuring that...
  10. sampsonr

    ksh script help

    The question mark is a shell meta-character. It should not ordinarily be used in filenames and I suspect that's the problem here. Try using a different value in its place. If you absolutely must use "?", you'll need to quote the name in any context that uses it.
  11. sampsonr

    Missing ] in script

    The syntax you're using is appropriate for sh, not csh. Change the first line to #!/bin/sh. Also, the line: if [ $var -eq <integer> ]' then should should have a semi-colon before the &quot;then&quot;, not a single-quote.
  12. sampsonr

    Significance of * at the end of filenames?

    If the asterisk were part of the filename, the call in your job list shouldn't work, so it must be coming from somewhere else. It sounds like ls is aliased to always use the -F option. Try using &quot;\ls&quot; and see if the asterisk is still there.
  13. sampsonr

    Getting Last Access Time of files.

    I don't think there's a way to get *only* the names of files that have been accessed within a time frame. You need the name in order to call stat() to find the access time, so you have to get all the names first. $now = time(); opendir(D, dirname); @accessedfiles = (); foreach $f (readdir(D))...
  14. sampsonr

    displaying more than 132 columns with ps

    I was able so see an arglist a little over 200 characters using it. I did notice that /usr/ucb/ps seems to limit the string based on the size of the terminal window. Try making your terminal wider before doing the ps.
  15. sampsonr

    displaying more than 132 columns with ps

    Try using /usr/ucb/ps instead. The options are somewhat different but it gives a much longer part (all?) of the process args. Start with &quot;/usr/ucb/ps -aux&quot; to see just about everything.

Part and Inventory Search

Back
Top