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 TouchToneTommy 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: devon59
  • Content: Threads
  • Order by date
  1. devon59

    Counting number of times the customer has been contacted: Count restart with 1 after each order

    Hi,I would appreciate your help. Here's what I am trying to do. I have a dataset that tells me customerID, contact date, order date. I want to find out how many times on average customers have been contacted before they place order. Right now, I have my code as data contact1; set contact...
  2. devon59

    Import fixed format data into SAS dataset - with error

    Hi, I am encounter the problem while trying to read this fixed format data into SAS dataset. The raw data is large about 85 million records total and the layout I was given was Field Length ID 8 date 9 amount 12 Source 14 The code I am...
  3. devon59

    Import raw data from fixed format .txt file - SAS 9.0

    Hi, I am having a problem importing the data from a fixed format text file. The total width of the records is 2309 characters. The owner of the text file said the data is one row per record ID. However, when I open the data to look in Notepad, it seems that the data is 3 rows per ID. I am...
  4. devon59

    SQL language that act the same as "&" in Excel or || in SAS

    Hi there, I am trying to create a new variable base on a combination of the characters in an existing value. For example, Var1 has a value "ABCDEFG" and I would like to create a Var2 which should look like "ABC__F". I tried substring(ltrim(rtrim(Var1,1,3))) to get "ABC" part. However, I don't...
  5. devon59

    Random select 5000 records

    Hi there, What is the syntax to do random select 5000 records? Could any one please help. Thank you very much.
  6. devon59

    Select only Null records from query

    Hi there, I was trying to select Not NULL record from below query but it did not return anything. Could anyone please help? Basically, I want to get only records the people that did not order. Thank you so much. SELECT result1.* FROM (SELECT tbl1.Mail, tbl2.Order FROM tbl1 left outer...
  7. devon59

    Create Record Layout

    Hi there, Is there any easy way that I could get all columns data type for my output instead of me having to go through each variable and look at them one by one? I'm looking for something similar to Proc contents in SAS. Thank you
  8. devon59

    Case-When to convert VarChar to Numeric variable

    I'm trying to create a new variable base on existing variable, BuyerID, using case-when statement. However, the query I have doesn't work. Could anyone please help? Part of the query and error message are below. ************************* case when BuyerID='Null' then 1 else 0 end as...
  9. devon59

    How to GROUP BY var created from Case-when statement

    Can anyone help? I would like to group the records by the variable I created from case when statement but I got an error saying that that new variable is not part of the table. For example, this is what I have. Select A, B, C, case when A=1 then 'Y' else 'N' end as Flag from Client_table...
  10. devon59

    SQL syntax that equals to Trim in excel

    Could anyone tell me what is the sql syntax that gives me a similar result as Trim in excel? Basically, I have the data that has space in the middle and I want to get rid of that space. e.g. 111 111 111 and I want to get rid of spaces between the ones. Thank you

Part and Inventory Search

Back
Top