Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
PeeJay2583
Starting Member
40 Posts |
Posted - 2011-05-18 : 08:56:41
|
| Hi,I want to make a query in sql from access.In access in where clause we have used DLOOKUP which doesn't work in sql.where clause is like , where table1.name = dlookup("[report name]","table2")How can I change this dlookup as sql doesn't support it. |
|
|
lionofdezert
Aged Yak Warrior
885 Posts |
Posted - 2011-05-18 : 09:03:15
|
| where table1.name = ( SELECT TOP 1 [report name] FROM table2 )--------------------------http://connectsql.blogspot.com/ |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
PeeJay2583
Starting Member
40 Posts |
Posted - 2011-05-18 : 09:22:04
|
| What's this TOP 1 for? |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
PeeJay2583
Starting Member
40 Posts |
Posted - 2011-05-18 : 10:09:39
|
| It works thanks. |
 |
|
|
|
|
|