Hi All
Iam new to sql, Iam using sql 2000....I have a view which is returning 5 million records. I want to limit this down, I have 2 fields I want to limit this down by date and database type.
The date field is datatype: varchar
and the database type is datatype: varchar
The problem starts when I restrict the date and database type together. I only want to see certain dates and the database type within that daterange but my syntax returning all records that match the database type criteria.
select *
from vw_global
WHERE date >= '2006-09-30%' and
datebase_type like '%sale%' or datebase_type like
'%employee%'
or datebase_type like '%target%'
I hope I have made sense.
I look forward to your response.
Iam new to sql, Iam using sql 2000....I have a view which is returning 5 million records. I want to limit this down, I have 2 fields I want to limit this down by date and database type.
The date field is datatype: varchar
and the database type is datatype: varchar
The problem starts when I restrict the date and database type together. I only want to see certain dates and the database type within that daterange but my syntax returning all records that match the database type criteria.
select *
from vw_global
WHERE date >= '2006-09-30%' and
datebase_type like '%sale%' or datebase_type like
'%employee%'
or datebase_type like '%target%'
I hope I have made sense.
I look forward to your response.