Different results between tsql and vortex <SQL>

foosh101
Posts: 61
Joined: Tue Oct 22, 2002 2:13 pm

Different results between tsql and vortex <SQL>

Post by foosh101 »

I am experiencing something I just can't figure out. I do a query using tql "select * from mkt3000001 where LocationState='NY' and Status IN ('Part-Time','Full-Time')", and I get a certain number of results. I then do the same query in my vortex script, and get a different number of results. Is there anything you can think of that would be causing this to happen. Its like they aren't even going against the same table.

One thing to note is that every night I re-import/index everything on one computer, and then physically copy over the tables and indexes to my actuall search servers. I don't know if that might have any bearing ont it. Anyway, any help anyone could offer would be greatly appreciated.

-Josh
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Different results between tsql and vortex <SQL>

Post by mark »

Make sure you're accessing the same database in both cases and that the table hasn't changed between tsql and vortex tries.
How are you counting the results in both cases?
Are tsql and vortex(texis) the same version? (tsql -? and texis -version)
foosh101
Posts: 61
Joined: Tue Oct 22, 2002 2:13 pm

Different results between tsql and vortex <SQL>

Post by foosh101 »

oops, sorry for the double post. I only have 1 database, and I am hitting it in all cases. I have also already checked to make sure I have the same version of both tsql and texis.
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Different results between tsql and vortex <SQL>

Post by mark »

How are you counting the results in both cases?
foosh101
Posts: 61
Joined: Tue Oct 22, 2002 2:13 pm

Different results between tsql and vortex <SQL>

Post by foosh101 »

in vortex I get the results like so:

<$sSQL = "SELECT count(ListingID)AS TotalJobCount FROM mkt3000001 where LocationState='NY' and Status IN ('Part-Time','Full-Time')">

<SQL "set ignorecase=1"></SQL>
<SQL ROW $sSQL>
<$ItemsFound = $TotalJobCount>
</SQL>


as far as how I get the count when using tsql, it is just the value of TotalJobCount when I run that same query.
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Different results between tsql and vortex <SQL>

Post by mark »

Were the indices created with ignorecase=1 and are you setting ignorecase=1 when doing the query in tsql?
foosh101
Posts: 61
Joined: Tue Oct 22, 2002 2:13 pm

Different results between tsql and vortex <SQL>

Post by foosh101 »

The answere to both those questions is No. Unfortunately, it behaves the same when I remove the set ignorecase=1 from my vortex script, because all data is the proper case in regards to my query (ie. there are not values of 'ny' for state or 'part-time' for status)
foosh101
Posts: 61
Joined: Tue Oct 22, 2002 2:13 pm

Different results between tsql and vortex <SQL>

Post by foosh101 »

ok, I disregard that last statement. I removed the set ignorecase=1 from my vortex script, and it gives me the listings I am expecting. However, I don't understand this, because what I said about my data is true - all data is the proper case in regards to my query (ie. there are not values of 'ny' for state or 'part-time' for status). I need to ignorecase when I do a search. There are many other attributes that a user of our system can search for that need to ignore case. It's only in this case, when a user searches by a state, that this seems to be a problem. Am I not setting the ignorecase properly. Is there something else I should be doing. I saw above you mentioned that the indices could be created with ignore case. Is that something I should consider, and if so, how do I go about doing that?
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Different results between tsql and vortex <SQL>

Post by mark »

The setting for ignorecase must always be the same for index creation, database insertion, deletion, updating, and searching.

Drop the index and set ignorecase=1 before recreating it, and in the same session. Either in the same vortex script or same tsql command line or interactive session.
foosh101
Posts: 61
Joined: Tue Oct 22, 2002 2:13 pm

Different results between tsql and vortex <SQL>

Post by foosh101 »

How do I do that. I do not index my tables using vortex, rather I have .cmd files that use tsql. How do I create the index ignoring case using tsql?
Post Reply