Hi all,
Could anyone see where the error is in this IF statement?
I have three records in Shipment_history table with that work_ord_num and w/i those three records one record has a value in cust_part_num field.
I want the query return the cust_part_num value but it returns the record w/o cust_part_num.
Thanks much!
spSomething
:
Declare popu_tbl Cursor
For
SELECT TOP 100 PERCENT dbo.tblShipping_sched.work_ord_num, ...
FROM tbl
WHERE..
Open popu_tbl
Fetch Next From
While ...
Begin
--***
IF @.cust_part_num is null
SELECT @.cust_part_num = cust_part_num FROM dbo.Shipment_history
WHERE work_ord_num like (left(@.work_ord_num, 6) + '%') AND work_ord_line_num = @.work_ord_line_num
AND cust_part_num <> "";
--** the line above doesn't workUse:
IF @.cust_part_num is NOT null
...but why are you doing this in a cursor?
I'd almost guarantee that there are other issues with the code you have ommitted.
Showing posts with label empty. Show all posts
Showing posts with label empty. Show all posts
Tuesday, March 20, 2012
Monday, February 20, 2012
Rather empty gatherer logs
I noticed that we were getting no results in our search this morning.
The records were in the DB, search terms matched when using "LIKE" but
not CONTAINS. Once I did a repopulation (incremental) all worked fine.
What I don't understand is that the repopulation is actually scheduled
to run each day at 00:00 and according to the gatherer logs, it did
run.
15/02/2006 00:00:06 Add Started Incremental crawl
15/02/2006 00:03:16 Add Completed Incremental crawl
15/02/2006 16:17:02 Add Started Full crawl
15/02/2006 16:23:30 Add Completed Full crawl
It is also puzzling that the manual repopulation (I started) says
"Started Full".
We had no errors or warnings in the application log.
Why are the gatherer logs so small/empty - its that because there were
no errors? If so, why did we get no results - I know the records were
there at 00:00.
Perhaps you made a schema change at 4:17 and this triggered a full
population. I can find no record of incremental populations being kicked off
at midnight either.
Are you certain there is no incremental population scheduled at midnight? I
take it this is SQL 2000.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Jack" <cawoodm@.gmail.com> wrote in message
news:1140019316.201183.231620@.g43g2000cwa.googlegr oups.com...
>I noticed that we were getting no results in our search this morning.
> The records were in the DB, search terms matched when using "LIKE" but
> not CONTAINS. Once I did a repopulation (incremental) all worked fine.
> What I don't understand is that the repopulation is actually scheduled
> to run each day at 00:00 and according to the gatherer logs, it did
> run.
> 15/02/2006 00:00:06 Add Started Incremental crawl
> 15/02/2006 00:03:16 Add Completed Incremental crawl
> 15/02/2006 16:17:02 Add Started Full crawl
> 15/02/2006 16:23:30 Add Completed Full crawl
> It is also puzzling that the manual repopulation (I started) says
> "Started Full".
> We had no errors or warnings in the application log.
> Why are the gatherer logs so small/empty - its that because there were
> no errors? If so, why did we get no results - I know the records were
> there at 00:00.
>
|||> I can find no record of incremental populations being kicked off at midnight either.
What's this then?
15/02/2006 00:00:06 Add Started Incremental crawl
15/02/2006 00:03:16 Add Completed Incremental crawl
I assumed this was the scheduled midnight incremental?
You may be right about the schema change but then I am still missing my
manual incremental in the log files around this time (16:20)
|||I meant to say, I can find no record of incremental crawls being kicked off
by default on any of my machines
Sorry for the confusion.
It certainly looks like you somehow have an incremental crawl schededuled
for midnight. I notice that if I schedule an incremental population, by
default it is scheduled for 1 minute before midnight. Check in the
management folder to see if you have it scheduled there. It will be
categorized as Full-Text.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Jack" <cawoodm@.gmail.com> wrote in message
news:1140034764.911389.60000@.g44g2000cwa.googlegro ups.com...
> What's this then?
> 15/02/2006 00:00:06 Add Started Incremental crawl
> 15/02/2006 00:03:16 Add Completed Incremental crawl
> I assumed this was the scheduled midnight incremental?
> You may be right about the schema change but then I am still missing my
> manual incremental in the log files around this time (16:20)
>
|||I think the orginal problem (no results) must be due to a schema
change. Apparently the FT Catalog gets cleared when this happens. I
still think the "Started Full crawl" is a mystery but sometimes this
happens.
Thanks
Jack
The records were in the DB, search terms matched when using "LIKE" but
not CONTAINS. Once I did a repopulation (incremental) all worked fine.
What I don't understand is that the repopulation is actually scheduled
to run each day at 00:00 and according to the gatherer logs, it did
run.
15/02/2006 00:00:06 Add Started Incremental crawl
15/02/2006 00:03:16 Add Completed Incremental crawl
15/02/2006 16:17:02 Add Started Full crawl
15/02/2006 16:23:30 Add Completed Full crawl
It is also puzzling that the manual repopulation (I started) says
"Started Full".
We had no errors or warnings in the application log.
Why are the gatherer logs so small/empty - its that because there were
no errors? If so, why did we get no results - I know the records were
there at 00:00.
Perhaps you made a schema change at 4:17 and this triggered a full
population. I can find no record of incremental populations being kicked off
at midnight either.
Are you certain there is no incremental population scheduled at midnight? I
take it this is SQL 2000.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Jack" <cawoodm@.gmail.com> wrote in message
news:1140019316.201183.231620@.g43g2000cwa.googlegr oups.com...
>I noticed that we were getting no results in our search this morning.
> The records were in the DB, search terms matched when using "LIKE" but
> not CONTAINS. Once I did a repopulation (incremental) all worked fine.
> What I don't understand is that the repopulation is actually scheduled
> to run each day at 00:00 and according to the gatherer logs, it did
> run.
> 15/02/2006 00:00:06 Add Started Incremental crawl
> 15/02/2006 00:03:16 Add Completed Incremental crawl
> 15/02/2006 16:17:02 Add Started Full crawl
> 15/02/2006 16:23:30 Add Completed Full crawl
> It is also puzzling that the manual repopulation (I started) says
> "Started Full".
> We had no errors or warnings in the application log.
> Why are the gatherer logs so small/empty - its that because there were
> no errors? If so, why did we get no results - I know the records were
> there at 00:00.
>
|||> I can find no record of incremental populations being kicked off at midnight either.
What's this then?
15/02/2006 00:00:06 Add Started Incremental crawl
15/02/2006 00:03:16 Add Completed Incremental crawl
I assumed this was the scheduled midnight incremental?
You may be right about the schema change but then I am still missing my
manual incremental in the log files around this time (16:20)
|||I meant to say, I can find no record of incremental crawls being kicked off
by default on any of my machines
It certainly looks like you somehow have an incremental crawl schededuled
for midnight. I notice that if I schedule an incremental population, by
default it is scheduled for 1 minute before midnight. Check in the
management folder to see if you have it scheduled there. It will be
categorized as Full-Text.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Jack" <cawoodm@.gmail.com> wrote in message
news:1140034764.911389.60000@.g44g2000cwa.googlegro ups.com...
> What's this then?
> 15/02/2006 00:00:06 Add Started Incremental crawl
> 15/02/2006 00:03:16 Add Completed Incremental crawl
> I assumed this was the scheduled midnight incremental?
> You may be right about the schema change but then I am still missing my
> manual incremental in the log files around this time (16:20)
>
|||I think the orginal problem (no results) must be due to a schema
change. Apparently the FT Catalog gets cleared when this happens. I
still think the "Started Full crawl" is a mystery but sometimes this
happens.
Thanks
Jack
Subscribe to:
Posts (Atom)