Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Combine two datasets

    Hi,
    '
    Would you kindly assist? I want to combine two datasets in a single dataset and have used the command 'append'. Each of the datasets has a variable 'Uniquenr' with the first dataset's last Uniquenr as '0229' and the 2nd dataset that I want to combine starting at '0233'.This is the error message:
    Uniquenr is str4 in using data

    Kindly advise what I need to do.
    Thanks

  • #2
    You will need to convert the variable "Uniquenr" to numeric in using dataset

    Code:
    destring Uniquenr, generate(n_Uniquenr) replace
    The append should work after this.

    Comment


    • #3
      Thanks for your response, Tarun. However, this is the error message:

      Command: destring Uniquenr, generate (n_ Uniquenr) replace
      Error message: options generate and replace are mutually exclusive

      Comment


      • #4
        Apologies for the error in #2. The correct syntax will be
        Code:
        destring Uniquenr, replace

        Comment

        Working...
        X