More help needed for previous query

N

Nick

I want to sort by the "8027" part of the records. The data connected to the
Datestamp and date can be a string of entries or just one, with the "802*"
record in it.
This is an imported file and the way you see it is the way it comes.
Somewhere within the scanned items will be an 802* record.

Example: table name ALID0001
Datestamp 11:00 date 08/10/05 label_id 8027, 3333, 222, and 888
Datestamp 12:00 date 08/10/05 label_id 8029, 3030, and 202
Datestamp 12:01 date 08/10/05 label_id 1010, and 8027
Datestamp 1:00 date 08/10/05 label_id 1111, 8027, and 20
Datestamp 1:20 date 08/10/05 label_id 8027, 77777, and 15

In this example, the query should show a date of 08/10/05; 8027, with the
list of Items scanned; 3333,222,888,1010,1111,20,77777 and 15

Karl helped with this query but I have been unable to get it to work. When
I insert the “8027†in the query request [Enter your search item –8027] it
returns a blank query

SELECT [Enter date - 01/02/04] AS [DATE], [Enter your search item -8027] AS
label_id, Right([ALID0001].[label_id],Len([ALID0001].[label_id])-53) AS Item
FROM ALID0001
WHERE (((ALID0001.label_id) Like "*" & [Enter date - 01/02/04] & "*" And
(ALID0001.label_id) Like "*" & ([Enter your search item -8027]) & "*"));

Sorry to resubmit question,
Thanks!
 
O

Ofer

How do you know that the problem is with the item number and not with the date?
In your example you gave a filter for 01/02/04 and you want it to return
08/10/05 records.
Try and remove the date filter to see if the item number filter run OK buy
it self.
 
N

Nick

I did removed the date filter and it still returns a blank query.

Ofer said:
How do you know that the problem is with the item number and not with the date?
In your example you gave a filter for 01/02/04 and you want it to return
08/10/05 records.
Try and remove the date filter to see if the item number filter run OK buy
it self.


Nick said:
I want to sort by the "8027" part of the records. The data connected to the
Datestamp and date can be a string of entries or just one, with the "802*"
record in it.
This is an imported file and the way you see it is the way it comes.
Somewhere within the scanned items will be an 802* record.

Example: table name ALID0001
Datestamp 11:00 date 08/10/05 label_id 8027, 3333, 222, and 888
Datestamp 12:00 date 08/10/05 label_id 8029, 3030, and 202
Datestamp 12:01 date 08/10/05 label_id 1010, and 8027
Datestamp 1:00 date 08/10/05 label_id 1111, 8027, and 20
Datestamp 1:20 date 08/10/05 label_id 8027, 77777, and 15

In this example, the query should show a date of 08/10/05; 8027, with the
list of Items scanned; 3333,222,888,1010,1111,20,77777 and 15

Karl helped with this query but I have been unable to get it to work. When
I insert the “8027†in the query request [Enter your search item –8027] it
returns a blank query

SELECT [Enter date - 01/02/04] AS [DATE], [Enter your search item -8027] AS
label_id, Right([ALID0001].[label_id],Len([ALID0001].[label_id])-53) AS Item
FROM ALID0001
WHERE (((ALID0001.label_id) Like "*" & [Enter date - 01/02/04] & "*" And
(ALID0001.label_id) Like "*" & ([Enter your search item -8027]) & "*"));

Sorry to resubmit question,
Thanks!
 
O

Ofer

I just created the table, with the records you supplied, I copied the sql,
and it worked.
It happened to me few times, that a query returned no records, I created it
again from scratch and it worked, don't ask me why, but I think it worth a
try.

--
In God We Trust - Everything Else We Test


Nick said:
I did removed the date filter and it still returns a blank query.

Ofer said:
How do you know that the problem is with the item number and not with the date?
In your example you gave a filter for 01/02/04 and you want it to return
08/10/05 records.
Try and remove the date filter to see if the item number filter run OK buy
it self.


Nick said:
I want to sort by the "8027" part of the records. The data connected to the
Datestamp and date can be a string of entries or just one, with the "802*"
record in it.
This is an imported file and the way you see it is the way it comes.
Somewhere within the scanned items will be an 802* record.

Example: table name ALID0001
Datestamp 11:00 date 08/10/05 label_id 8027, 3333, 222, and 888
Datestamp 12:00 date 08/10/05 label_id 8029, 3030, and 202
Datestamp 12:01 date 08/10/05 label_id 1010, and 8027
Datestamp 1:00 date 08/10/05 label_id 1111, 8027, and 20
Datestamp 1:20 date 08/10/05 label_id 8027, 77777, and 15

In this example, the query should show a date of 08/10/05; 8027, with the
list of Items scanned; 3333,222,888,1010,1111,20,77777 and 15

Karl helped with this query but I have been unable to get it to work. When
I insert the “8027†in the query request [Enter your search item –8027] it
returns a blank query

SELECT [Enter date - 01/02/04] AS [DATE], [Enter your search item -8027] AS
label_id, Right([ALID0001].[label_id],Len([ALID0001].[label_id])-53) AS Item
FROM ALID0001
WHERE (((ALID0001.label_id) Like "*" & [Enter date - 01/02/04] & "*" And
(ALID0001.label_id) Like "*" & ([Enter your search item -8027]) & "*"));

Sorry to resubmit question,
Thanks!
 
N

Nick

There must be something I am missing. If I take the Where out of SQL I am
able to get [Enter your search item –8027] but the "Item" list error down the
whole page.

Ofer said:
I just created the table, with the records you supplied, I copied the sql,
and it worked.
It happened to me few times, that a query returned no records, I created it
again from scratch and it worked, don't ask me why, but I think it worth a
try.

--
In God We Trust - Everything Else We Test


Nick said:
I did removed the date filter and it still returns a blank query.

Ofer said:
How do you know that the problem is with the item number and not with the date?
In your example you gave a filter for 01/02/04 and you want it to return
08/10/05 records.
Try and remove the date filter to see if the item number filter run OK buy
it self.


:

I want to sort by the "8027" part of the records. The data connected to the
Datestamp and date can be a string of entries or just one, with the "802*"
record in it.
This is an imported file and the way you see it is the way it comes.
Somewhere within the scanned items will be an 802* record.

Example: table name ALID0001
Datestamp 11:00 date 08/10/05 label_id 8027, 3333, 222, and 888
Datestamp 12:00 date 08/10/05 label_id 8029, 3030, and 202
Datestamp 12:01 date 08/10/05 label_id 1010, and 8027
Datestamp 1:00 date 08/10/05 label_id 1111, 8027, and 20
Datestamp 1:20 date 08/10/05 label_id 8027, 77777, and 15

In this example, the query should show a date of 08/10/05; 8027, with the
list of Items scanned; 3333,222,888,1010,1111,20,77777 and 15

Karl helped with this query but I have been unable to get it to work. When
I insert the “8027†in the query request [Enter your search item –8027] it
returns a blank query

SELECT [Enter date - 01/02/04] AS [DATE], [Enter your search item -8027] AS
label_id, Right([ALID0001].[label_id],Len([ALID0001].[label_id])-53) AS Item
FROM ALID0001
WHERE (((ALID0001.label_id) Like "*" & [Enter date - 01/02/04] & "*" And
(ALID0001.label_id) Like "*" & ([Enter your search item -8027]) & "*"));

Sorry to resubmit question,
Thanks!
 
O

Ofer

Try and create a new query, without copying the prev one, and run it step by
step while adding another filer.

--
In God We Trust - Everything Else We Test


Nick said:
There must be something I am missing. If I take the Where out of SQL I am
able to get [Enter your search item –8027] but the "Item" list error down the
whole page.

Ofer said:
I just created the table, with the records you supplied, I copied the sql,
and it worked.
It happened to me few times, that a query returned no records, I created it
again from scratch and it worked, don't ask me why, but I think it worth a
try.

--
In God We Trust - Everything Else We Test


Nick said:
I did removed the date filter and it still returns a blank query.

:

How do you know that the problem is with the item number and not with the date?
In your example you gave a filter for 01/02/04 and you want it to return
08/10/05 records.
Try and remove the date filter to see if the item number filter run OK buy
it self.


:

I want to sort by the "8027" part of the records. The data connected to the
Datestamp and date can be a string of entries or just one, with the "802*"
record in it.
This is an imported file and the way you see it is the way it comes.
Somewhere within the scanned items will be an 802* record.

Example: table name ALID0001
Datestamp 11:00 date 08/10/05 label_id 8027, 3333, 222, and 888
Datestamp 12:00 date 08/10/05 label_id 8029, 3030, and 202
Datestamp 12:01 date 08/10/05 label_id 1010, and 8027
Datestamp 1:00 date 08/10/05 label_id 1111, 8027, and 20
Datestamp 1:20 date 08/10/05 label_id 8027, 77777, and 15

In this example, the query should show a date of 08/10/05; 8027, with the
list of Items scanned; 3333,222,888,1010,1111,20,77777 and 15

Karl helped with this query but I have been unable to get it to work. When
I insert the “8027†in the query request [Enter your search item –8027] it
returns a blank query

SELECT [Enter date - 01/02/04] AS [DATE], [Enter your search item -8027] AS
label_id, Right([ALID0001].[label_id],Len([ALID0001].[label_id])-53) AS Item
FROM ALID0001
WHERE (((ALID0001.label_id) Like "*" & [Enter date - 01/02/04] & "*" And
(ALID0001.label_id) Like "*" & ([Enter your search item -8027]) & "*"));

Sorry to resubmit question,
Thanks!
 
O

Ofer

You should try creating the query again from scratch, don't copy the sql,
create it step by step, and try it in every step.

--
In God We Trust - Everything Else We Test


Nick said:
There must be something I am missing. If I take the Where out of SQL I am
able to get [Enter your search item –8027] but the "Item" list error down the
whole page.

Ofer said:
I just created the table, with the records you supplied, I copied the sql,
and it worked.
It happened to me few times, that a query returned no records, I created it
again from scratch and it worked, don't ask me why, but I think it worth a
try.

--
In God We Trust - Everything Else We Test


Nick said:
I did removed the date filter and it still returns a blank query.

:

How do you know that the problem is with the item number and not with the date?
In your example you gave a filter for 01/02/04 and you want it to return
08/10/05 records.
Try and remove the date filter to see if the item number filter run OK buy
it self.


:

I want to sort by the "8027" part of the records. The data connected to the
Datestamp and date can be a string of entries or just one, with the "802*"
record in it.
This is an imported file and the way you see it is the way it comes.
Somewhere within the scanned items will be an 802* record.

Example: table name ALID0001
Datestamp 11:00 date 08/10/05 label_id 8027, 3333, 222, and 888
Datestamp 12:00 date 08/10/05 label_id 8029, 3030, and 202
Datestamp 12:01 date 08/10/05 label_id 1010, and 8027
Datestamp 1:00 date 08/10/05 label_id 1111, 8027, and 20
Datestamp 1:20 date 08/10/05 label_id 8027, 77777, and 15

In this example, the query should show a date of 08/10/05; 8027, with the
list of Items scanned; 3333,222,888,1010,1111,20,77777 and 15

Karl helped with this query but I have been unable to get it to work. When
I insert the “8027†in the query request [Enter your search item –8027] it
returns a blank query

SELECT [Enter date - 01/02/04] AS [DATE], [Enter your search item -8027] AS
label_id, Right([ALID0001].[label_id],Len([ALID0001].[label_id])-53) AS Item
FROM ALID0001
WHERE (((ALID0001.label_id) Like "*" & [Enter date - 01/02/04] & "*" And
(ALID0001.label_id) Like "*" & ([Enter your search item -8027]) & "*"));

Sorry to resubmit question,
Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top