Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

I'm stumped - Why does this happen?

 
   Database Help (Home) -> MSEQ RSS
Next:  IBM X336 server with RAID1 configuration formats ..  
Author Message
JJBaxter

External


Since: Nov 06, 2008
Posts: 2



(Msg. 1) Posted: Thu Nov 06, 2008 5:14 pm
Post subject: I'm stumped - Why does this happen?
Archived from groups: microsoft>public>sqlserver>mseq (more info?)

This query : select * from fitt_user_norm_31860_1
Returns the 10 records as expected

id comp status evidence_date verifier
1 ICTTC137B T 20/06/2008 Jim Campbell (ID:25432)
2 ICTTC010C M 8/10/2008 Leslie Bailey (MIL030555)
3 ICTTC009C M 8/10/2008 Leslie Bailey (MIL030555)
4 ICTTC013C M 8/10/2008 Leslie Bailey (MIL030555)
5 ICTTC137B M 8/10/2008 Leslie Bailey (MIL030555)
6 ICTTC136B M 8/10/2008 Leslie Bailey (MIL030555)
7 ICTTC010C T 26/06/2008 Hans-Dieter Kwasny (ID:30047)
8 ICTTC009C T 24/06/2008 Hans-Dieter Kwasny (ID:30047)
9 ICTTC011C T 8/10/2008 Leslie Bailey (MIL030555)
10 ICTTC013C T 24/06/2008 Hans-Dieter Kwasny (ID:30047)

but this query : SELECT * FROM fitt_user_norm_31860_1 WHERE comp like 'I%'
only returns 5 records even though field comp in every row starts with 'I'

id comp status evidence_date verifier
1 ICTTC137B T 20/06/2008 Jim Campbell (ID:25432)
7 ICTTC010C T 26/06/2008 Hans-Dieter Kwasny (ID:30047)
8 ICTTC009C T 24/06/2008 Hans-Dieter Kwasny (ID:30047)
9 ICTTC011C T 8/10/2008 Leslie Bailey (MIL030555)
10 ICTTC013C T 24/06/2008 Hans-Dieter Kwasny (ID:30047)

I've tried 'i%' as well as N'i%' and [comp] but I dont know what else to try.

Fields types are
id Long(4)
comp VarChar(30)
status VarChar(1)
evidence_date DateTime(16)
verifier VarChar(50)

Any pointers appeaciated.

 >> Stay informed about: I'm stumped - Why does this happen? 
Back to top
Login to vote
JJBaxter

External


Since: Nov 06, 2008
Posts: 2



(Msg. 2) Posted: Thu Nov 06, 2008 6:52 pm
Post subject: RE: I'm stumped - Why does this happen? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Ok, I know what the problem is now. Somewhere along the line some fields have
obtained a space at the start. Garbage in, garbage out. Next time we wont
outsource our data entry.

Thanks for reading.

"JJBaxter" wrote:

> This query : select * from fitt_user_norm_31860_1
> Returns the 10 records as expected
>
> id comp status evidence_date verifier
> 1 ICTTC137B T 20/06/2008 Jim Campbell (ID:25432)
> 2 ICTTC010C M 8/10/2008 Leslie Bailey (MIL030555)
> 3 ICTTC009C M 8/10/2008 Leslie Bailey (MIL030555)
> 4 ICTTC013C M 8/10/2008 Leslie Bailey (MIL030555)
> 5 ICTTC137B M 8/10/2008 Leslie Bailey (MIL030555)
> 6 ICTTC136B M 8/10/2008 Leslie Bailey (MIL030555)
> 7 ICTTC010C T 26/06/2008 Hans-Dieter Kwasny (ID:30047)
> 8 ICTTC009C T 24/06/2008 Hans-Dieter Kwasny (ID:30047)
> 9 ICTTC011C T 8/10/2008 Leslie Bailey (MIL030555)
> 10 ICTTC013C T 24/06/2008 Hans-Dieter Kwasny (ID:30047)
>
> but this query : SELECT * FROM fitt_user_norm_31860_1 WHERE comp like 'I%'
> only returns 5 records even though field comp in every row starts with 'I'
>
> id comp status evidence_date verifier
> 1 ICTTC137B T 20/06/2008 Jim Campbell (ID:25432)
> 7 ICTTC010C T 26/06/2008 Hans-Dieter Kwasny (ID:30047)
> 8 ICTTC009C T 24/06/2008 Hans-Dieter Kwasny (ID:30047)
> 9 ICTTC011C T 8/10/2008 Leslie Bailey (MIL030555)
> 10 ICTTC013C T 24/06/2008 Hans-Dieter Kwasny (ID:30047)
>
> I've tried 'i%' as well as N'i%' and [comp] but I dont know what else to try.
>
> Fields types are
> id Long(4)
> comp VarChar(30)
> status VarChar(1)
> evidence_date DateTime(16)
> verifier VarChar(50)
>
> Any pointers appeaciated.
>

 >> Stay informed about: I'm stumped - Why does this happen? 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
index on a view - Hello, I have a table (TAB) and A View with alias (VIEW) Table cod varchar 3 descr carchar 60 my view cod alias COd1 descr alias DES Now i need a index on view with key COD1 I can't create it. Can..

Creating an alias - I have an alias that can get very long because it maintains a information of where it came from. Is there a way to alias an alias? My first thought was: Declare @T1 varchar(128) Set T1 = 'MyAlias' .... Inner Join Table1 as @T1 This of course does no...

Formatting numeric fields in select-clause - This is propably a very simple question, but I can“t seem to find the answer to it in the documentation. I want to format a numeric field so the result is right justified and zero-filled. ex select 1 will give the result 01 How do I manage this..

Simple Query problem - Sample table as follows Order ID Stock Code Status --------- ------- ------- 203 STK1 3 203 STK2 2 203 STK4 3 204 STK1 3 204 STK5 3 205 ..

query assistance -return most recent date - I have a table that has two fields, pkg_num, which is a number, and del_date_time, which is a date-time. The table can contain duplicate pkg_num values, as long as the del_date_time values are different for any given number. I need a query that will...
   Database Help (Home) -> MSEQ All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]