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 strongm 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 PDreyer

  1. PDreyer

    Shellscript to send an email to group when a file is placed in unix directory: Help needed

    #!/usr/bin/ksh export PS4='$LINENO#' sleepsec=${2:-10} if [ "$1" = "" ] then echo "Err: Need filename as arg" exit 12 fi while [ 1 ] do fn="$1" xx=$(ls -l "$fn" 2>&1 ) xxo="$xx" while [ "$xx" = "$xxo" ] || [ ! -f "$fn" ] do sleep $sleepsec xx=$(ls -l "$fn" 2>&1 ) done...
  2. PDreyer

    Still getting Multiple records in query

    For thos interested: http://www.tek-tips.com/viewthread.cfm?qid=1749325 So now that the unlikely event happened how can you tell from your data which value is the last one inserted? Do you have a unique key on whtbSorterProductHistory? Do you perhaps have an identity column on table...
  3. PDreyer

    manipulate column string in a csv file

    sed 's/T\(.*\)+01:00,/,\1,/' subok.csv | sort -t- -k 1,1n -k2,2 -k3,3n
  4. PDreyer

    sybase backup server error after restat

    The logfile should be set in your RUN_srvr_back file (-e flag)
  5. PDreyer

    How to append a suffix

    sed 's/\([A-Z]\)\( \)/\1_v2/1' TheFile
  6. PDreyer

    How to append a suffix

    If _ is a space then LML is in column 9 and PRES in column 8 I assume the _ in 2ALMEJA_FN1+90_LML is not a space i.e. #---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+---10----+---11----+---12----+---13- 415068.737 2034568.082 2488.000255 0...
  7. PDreyer

    Can't get thousands seperator to work in SQL error

    CONVERT (VARCHAR(100),CAST(sum(ChargeAmt) as Money),1)
  8. PDreyer

    add signature after attachments in the body email

    I had this problem since MS outlook 2010. Seems they changed something in outlook Solved by moving the signature to the beginning i.e. (echo $sig; uuencode f1 f1.txt; uuencode f2 f2.txt) | mail...
  9. PDreyer

    Select "All Records"

    You are mixing char and int data types I don't know SQL Anywhere but maybe this code might push you in the right direction declare @i int select @i=5 select number from master..spt_values where type='P' and number=case when @i is null then number else @i end select @i=null select number from...
  10. PDreyer

    Date sort - 4 fields

    sort -k 4,4n -k 2,2M -k 3,3n
  11. PDreyer

    Arithmetic overflow error

    Or change the multiplication to division i.e. Count(*)/128
  12. PDreyer

    Need help with Group By in Query

    not tested select a.code_order, a.customer_id, a.company_cd from t2 a join (select customer_id , min_code_order=min(code_order) from t1 b group by customer_id ) b on a.customer_id = b.customer_id and a.code_order=b.min_code_order
  13. PDreyer

    Need script for finding out duplicate indexes on tables

    Have a look at the code for sp_helpindex
  14. PDreyer

    Update Question

    update t2 set term1=termdate from t1, t2 where t1.id=t2.id and t1.term='Y' update t2 set term2=termdate from t1, t2 where t1.id=t2.id and t1.term='N'
  15. PDreyer

    Immediate not found error when running this procedure. Please help!

    Replace execute immediate @select_query with execute (@select_query)

Part and Inventory Search

Back
Top