Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6713961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:26:27+00:00 2026-05-26T08:26:27+00:00

R version: 2.12.2 / OS: Windows XP Data that I need to query and

  • 0

R version: 2.12.2 / OS: Windows XP

Data that I need to query and manipulate is stored in a SPSS .sav file (size ~ 112MB) and I have a very basic knowledge of SPSS syntax. I am much more comfortable with R (and generally prefer it for data manipulation and analysis), so I saved the SPSS file as a tab-delimited file (size ~ 85MB) and have attempted to query it using functionality from the RODBC package.

Using the ‘Data Sources (ODBC)’ application within the Administrative Tools group on Windows Control Panel, I setup a database (Windows folder) which has tables (tab-delimited files) with the Microsoft Text Driver.

The current table of interest has a ‘Date’ field (called ‘DateTime’) where dates are formatted ‘%Y/%m/%d’. When I first tried to query the database with conditions on this field, I was returned a result set with zero observations. So, I changed ‘DateTime’ to datatype ‘Character’ and tried my query again (to no avail).

I am able to successfully query the database, i.e.

sqlQuery(channel = cn, query = "SELECT * FROM large_table.txt", as.is = TRUE, stringsAsFactors = FALSE, max = 20)

returns results. The following queries return result sets with zero observations (I have verified that there is at least one record with the the value ‘2011/04/01’ in its ‘DateTime’ field).

sqlQuery(channel = cn, query = "SELECT DateTime FROM large_table.txt WHERE DateTime = {d '2011-04-01'}", as.is = TRUE, stringsAsFactors = FALSE)

sqlQuery(channel = cn, query = "SELECT DateTime FROM large_table.txt WHERE DateTime = '2011/04/01'", as.is = TRUE, stringsAsFactors = FALSE)

Can anyone tell me why the result set has no observations?

Any suggestions to improve my database connection or query are greatly appreciated. I prefer to use the RODBC package instead of another database-query package, but am willing to try something new if necessary.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T08:26:27+00:00Added an answer on May 26, 2026 at 8:26 am

    I’d use the ‘memisc’ package for this. set up spss.system.file() importers for your 3 SPSS files, subset using the memisc version to load in to R just the variables that are needed, including handling user-missing levels.

    There are some oddities around how SPSS files are set up – it is fairly frequent for SPSS files with numeric variables to have user-missings set, which may need sorting at the R end into an interval scaling with appropriate NAs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to find some strings that the current version of Windows is using.
I need to create a file that will be used to store confidential data;
I have a need to parse Bezier Path Strings, but apparently the System.Windows.Media.Geometry version
I have a long running query that returns a large data set. This query
I would like my application to look similar to that of the Windows version:
I'm looking for a very simple way of determining if the version of Windows
I'm using Delphi 7 and can't predict the target version of Windows. I need
Is there any way to extend the information in the Windows File Version dialog.
we have an APP, that uses many local resources, such as windows printing API,
We have built a .NET Windows Service that we install on client PCs to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.