This is a migrated thread and some comments may be shown as answers.

running query

1 Answer 25 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Zahra Mottaghi-Far
Top achievements
Rank 1
Zahra Mottaghi-Far asked on 14 Sep 2009, 06:46 PM

Hi,

i need to run the following query in order to be able to create a dataset and bind it to my parameter which
is supposed to be a drop down.

what i am trying to do is creating a temp table to create a dataset for Month and Year drop downs

my problem is that , the query builder does not support 'Declare' so i am basically not able to use my query.

What can i do to create a drop down param and bind it to a dataset which is not actually running on an existin table in my database.

Thanks very much
Zahra

 

declare

 

@months table(

 

 

 

 

monthName

varchar (50),

 

 

 

 

monthValue

int)

 

 

 

 

insert

 

into @months(monthName,monthValue)

 

 

 

 

select

 

'January',1 union

 

select

 

'Feburay',2 union

 

select

 

'March',3 union

 

select

 

'April',4 union

 

select

 

'May',5 union

 

select

 

'June',6 union

 

select

 

'July',7 union

 

select

 

'August',8 union

 

select

 

'September',9 union

 

select

 

'October',10 union

 

select

 

'November',11 union

 

select

 

'December',12

 

 

 

 

select

 

monthName, monthValue from @months order by monthvalue asc

 

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 15 Sep 2009, 03:33 PM
Hello Zahra Mottaghi-Far,

Please review the following forum thread for more information on the matter.

Sincerely yours,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
Zahra Mottaghi-Far
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or