Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IIF Function into SQL Server

Status
Not open for further replies.

kingz2000

Programmer
Joined
May 28, 2002
Messages
304
Location
DE

Hi,

I have a query which works in access and contains the IIF function. Is there a way around this function in SQL-Server??

Could I, theretically, create a function IIF which works in the same way??

Thanks in advance ofr your help
 
SQL Server supports the CASE WHEN... expressions. Check books on line for specifics or come back with your IIf() for someone to convert for you.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 

I am able to make the 'select' work...it takes 90 seconds..but when I try to create the view it gives me 'timeout expired'...

what now?
 
You either provide more information so someone can help or you live with your existing condition.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
To elaborate,
I have a group by sql-statement which takes 90 secs to produce my results, since the tabels are very large. when I create a view with it, I get an error message when I try to get the results. The error message reads 'Timeout expired'!

Is there anyway i can get the view not to give up so easily..Similarly to the select execution I would wait 90 secs.

I don't really know what info you require. The sql statement is simply select x from y group by ...

Thanks in advance
 
If this is a SQL Server query than it would be best to ask questions in a different forum. If this is an Access question, you should provide some information about your query such as the SQL view, ODBC Timeout value, which fields are indexed,...

Duane MS Access MVP
Now help me support United Cerebral Palsy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top