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 nra

  1. nra

    parsing string values

    As far as the cust_nbr is concerned, here is the statement. SELECT CASE PATINDEX('%-%',Loan_nbr) WHEN 0 THEN '' ELSE SUBSTRING(Loan_nbr, PATINDEX('%-%',Loan_nbr)+1, LEN(Loan_nbr)) + CASE WHEN Cust_nbr IS NULL THEN '' ELSE Cust_nbr...
  2. nra

    parsing string values

    As I understand from your message, I think you need the number before "-" for the loan number. Here is how you pull it out. In this example, c1 is the loan_nbr column and table1 is the table name. SELECT CASE PATINDEX('%-%',c1) WHEN 0 THEN c1 ELSE...
  3. nra

    Repeated results (how to distinguish them)?

    I don't think this is possible. When you say '*' in the select statement, that will fetch all the records in the table. So, the 'distinct' reserved word has no significance.

Part and Inventory Search

Back
Top