you either need a new dataset or a static value for the default property. You can′t use the dataset as a expression to get the first value of the dataset.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
you either need a new dataset or a static value for the default property. You can′t use the dataset as a expression to get the first value of the dataset.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
I'm trying to create a parameter that draws its drop down box values from a query that is seperate from the result set.
Thanks
Yes, you can have multiple DataSets in reports. You can set up a DatsSet to be the source for valid parameter values like you describe.
-Chris
I have multiple columns in a Single Table and i want to search values in different columns. My table structure is
col1 (identity PK)
col2 (varchar(max))
col3 (varchar(max))
I have created a single FULLTEXT on col2 & col3.
suppose i want to search col2='engine' and col3='toyota' i write query as
SELECT
TBL.col2,TBL.col3
TBL
CONTAINSTABLE(TBL,col2,'engine') TBL1
TBL.col1=TBL1.[key]
CONTAINSTABLE(TBL,col3,'toyota') TBL2
TBL.col1=TBL2.[key]
Every thing works well if database is small. But now i have 20 million records in my database. Taking an exmaple there are 5million record with col2='engine' and only 1 record with col3='toyota', it take substantial time to find 1 record.I was thinking this i can address this issue if i merge both columns in a Single column, but i cannot figure out what format i save it in single column that i can use query to extract correct information.
for e.g.;
i was thinking to concatinate both fields like
col4= ABengineBA + ABBToyotaBBA
and in search i use
SELECT
TBL.col4
TBL
CONTAINSTABLE(TBL,col4,' "ABengineBA" AND "ABBToyotaBBA"') TBL1
TBL.col1=TBL1.[key]
But it don't work in following scenario
col4= ABengineBA + ABBCorola ToyotaBBA
SELECT
TBL.col4
TBL
CONTAINSTABLE(TBL,col4,' "ABengineBA" AND "ABB*ToyotaBBA"') TBL1
TBL.col1=TBL1.[key]
Before you merged the two columns could you not write your query something like this
select *
from TBL
where col2 = 'engine' and col3 = 'toyota'
You could put variables in place of the engine and toyota and create a stored procedure that passes in the values you want to search on.
I don't think there is a need to merge the columns matter of fact it will most likely run faster without being merged.
Or maybe I missed you rquestion.
I have multiple columns in a Single Table and i want to search values in different columns. My table structure is
col1 (identity PK)
col2 (varchar(max))
col3 (varchar(max))
I have created a single FULLTEXT on col2 & col3.
suppose i want to search col2='engine' and col3='toyota' i write query as
SELECT
TBL.col2,TBL.col3
TBL
CONTAINSTABLE(TBL,col2,'engine') TBL1
TBL.col1=TBL1.[key]
CONTAINSTABLE(TBL,col3,'toyota') TBL2
TBL.col1=TBL2.[key]
Every thing works well if database is small. But now i have 20 million records in my database. Taking an exmaple there are 5million record with col2='engine' and only 1 record with col3='toyota', it take substantial time to find 1 record.I was thinking this i can address this issue if i merge both columns in a Single column, but i cannot figure out what format i save it in single column that i can use query to extract correct information.
for e.g.;
i was thinking to concatinate both fields like
col4= ABengineBA + ABBToyotaBBA
and in search i use
SELECT
TBL.col4
TBL
CONTAINSTABLE(TBL,col4,' "ABengineBA" AND "ABBToyotaBBA"') TBL1
TBL.col1=TBL1.[key]
But it don't work in following scenario
col4= ABengineBA + ABBCorola ToyotaBBA
SELECT
TBL.col4
TBL
CONTAINSTABLE(TBL,col4,' "ABengineBA" AND "ABB*ToyotaBBA"') TBL1
TBL.col1=TBL1.[key]
Before you merged the two columns could you not write your query something like this
select *
from TBL
where col2 = 'engine' and col3 = 'toyota'
You could put variables in place of the engine and toyota and create a stored procedure that passes in the values you want to search on.
I don't think there is a need to merge the columns matter of fact it will most likely run faster without being merged.
Or maybe I missed you rquestion.
Hi all,
I met a problem when trying to pass values to a SQL statement through parameters. It's a data flow task. I used the OLE DB connection. My statement is like the statement below(the real statement is little complex):
Select * from myTable where mydate>? and mydate<?
I used the "set query parameter" dialogbox to bulid two parameters varStartTime and varEndTime, the values for the two parameters were set to "1/1/2005" and "12/30/2006" respectively. But when I click the "Parse query" button, I got errors
Parameter Information cannot be derived from SQL statements. Set parameter information before preparing command.
I have referred to the posts, but the problem still exists. Any help will be highly appreciated. Thanks a lot!
The "Parse Query" never works when you have ? in your SQL command. Just ignore the error.