all groups > sql server connect > december 2004 >
You're in the

sql server connect

group:

USE PUBS gives me partial data


USE PUBS gives me partial data Duffaukid
12/23/2004 1:16:38 PM
sql server connect:
In the past, I needed to add the 'use pubs' prior to my select * from
employee statement when accessing the pubs database on my sql server.

Now, when I add it to my sql statements in my programs, I get only a
few of the fields instead of all of them.

The odbc connection does NOT specify the Pubs database, so I wrongly
assumed that the 'use pubs' was necessary to make it work. Not so.

But why do I only get the job_id, job_lvl and job_hire columns when I
"select * from employee" ?

Duffaukid


Re: USE PUBS gives me partial data Foo Man Chew
12/23/2004 6:32:10 PM
[quoted text, click to view]

What happens when you actually NAME the columns you want, which you should
be doing anyway? Have you tried using an OLEDB connection, which you should
be using anyway?

Re: USE PUBS gives me partial data Duffaukid
12/24/2004 7:15:38 AM
On Thu, 23 Dec 2004 18:32:10 -0500, "Foo Man Chew" <foo@man.chew>
[quoted text, click to view]

If I name a column that doesn't show then I get a blank column.

Re: USE PUBS gives me partial data Steve Kass
12/25/2004 11:28:29 PM
Something is wrong either with your pubs database or with your description
of the problem. There is no job_hire column in the pubs..employee table,
and "I get a blank column" is not a very helpful description of what should
cause an error if a column is missing from a table.

You might consider re-installing the pubs database by running instpubs.sql
(found in the SQL Server install directory). Perhaps you ran some sample
scripts that changed the pubs database from its install version.

If this doesn't work, please give a precise explanation of exactly what
query you are issuing from what kind of connection or application, and
exactly what you see as your results.

Steve Kass
Drew University

[quoted text, click to view]

AddThis Social Bookmark Button