SQL Table Issue

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
pkl
Participant
Posts: 50
Joined: Wed Aug 11, 2004 11:45 am

SQL Table Issue

Post by pkl »

Hi,

I am populating the SQL table from a hash file. For one column if there is a value it gets populated else a '?' appears in that column. I tried checking for space, null and even just with '' it still appears. Do anyone have an idea why SQL does this.

In the hash file this field appears blank if there is no value in it but in SQL table it appears as '?'

Any help is greatly appreciated.

Thanks
chucksmith
Premium Member
Premium Member
Posts: 385
Joined: Wed Jun 16, 2004 12:43 pm
Location: Virginia, USA
Contact:

Post by chucksmith »

What is your database?

DB2, for example, allows default values for columns to be set at the database.

What tool are you using to see the "?" in the columns?
pkl
Participant
Posts: 50
Joined: Wed Aug 11, 2004 11:45 am

Post by pkl »

Its a SQL Server. I can view the '?' both in the database and in the ODBC stage in the DataStage.

Thanks
chucksmith
Premium Member
Premium Member
Posts: 385
Joined: Wed Jun 16, 2004 12:43 pm
Location: Virginia, USA
Contact:

Post by chucksmith »

When you look at the data in your hash file, what value is in the column?

What is its data type?
pkl
Participant
Posts: 50
Joined: Wed Aug 11, 2004 11:45 am

Post by pkl »

The Data type in Hash is Char. Actually it is a address field.

Thanks
chucksmith
Premium Member
Premium Member
Posts: 385
Joined: Wed Jun 16, 2004 12:43 pm
Location: Virginia, USA
Contact:

Post by chucksmith »

And when you view the data in the hash file, what do you see?
tonystark622
Premium Member
Premium Member
Posts: 483
Joined: Thu Jun 12, 2003 4:47 pm
Location: St. Louis, Missouri USA

Post by tonystark622 »

I had this problem once, where nulls in the hash file (I think the in one of the key fields) were "converted" to an odd character. I ended up testing for the value that was in the field and converting it to null on the output. I think it was Char(254) or Char(253), but I can't remember.

Good Luck,
Tony
pkl
Participant
Posts: 50
Joined: Wed Aug 11, 2004 11:45 am

Post by pkl »

In the HAsh file I just see a blank. I dont see anything.
tonystark622
Premium Member
Premium Member
Posts: 483
Joined: Thu Jun 12, 2003 4:47 pm
Location: St. Louis, Missouri USA

Post by tonystark622 »

NLS issue, then?
pkl
Participant
Posts: 50
Joined: Wed Aug 11, 2004 11:45 am

Post by pkl »

I don't know anything about it. What can I check that for?
tonystark622
Premium Member
Premium Member
Posts: 483
Joined: Thu Jun 12, 2003 4:47 pm
Location: St. Louis, Missouri USA

Post by tonystark622 »

I doubt if this is the issue, but...

If you login to Administrator, click on the project and click on the Properties button, you should see an NLS tab if you have NLS enabled on the server.

If NLS is enabled, the NLS tab should show the default character set for the project. It's possible that you have one character set and your database is using another....

Tony
pkl
Participant
Posts: 50
Joined: Wed Aug 11, 2004 11:45 am

Post by pkl »

Hey Tony,

Thanx a lot. I got it working now. I dont know exactly how but I recreated my hash file and now it doesnt show me ?

I hope it continues to be that way

I appreciate everyone for the help

Thanks
tonystark622
Premium Member
Premium Member
Posts: 483
Joined: Thu Jun 12, 2003 4:47 pm
Location: St. Louis, Missouri USA

Post by tonystark622 »

pkl,

Sometimes, if the metadata (especially key info) for a hash file has changed, you will get unexpected values out of the hash file. Usually, the value is in the data record, but not in the field where you're finding it.

Good luck,
Tony
Post Reply