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 |
|
quicksilver2006
Starting Member
1 Post |
Posted - 2007-07-18 : 07:16:28
|
| Hi,I am trying to create a report in Microsoft Visual Studio, the database is coming from an ODBC database and at the min it works fine.The problem im having is that i am using an SQL Query to pull the data from the ODBC database.The query i am using atm is:SELECT ORDER_NUMBER, REFERENCE, INVOICE_NET, ACCOUNT_REFFROM PURCHASE_ORDERWHERE REFERENCE Like '?'order by Reference descThe '?' allows me to read the entire database but in the field i cant enter a blank field, if i change the Like '?' to '%' it will then load up the whole database and doesnt sort the request i had.Is there any way i can get it so that when i request the reference number if i enter a blank field it will load them all up if not then it will load the request. |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-07-18 : 11:34:04
|
| Is it sql server db? If not, t-sql may not get what you want. |
 |
|
|
|
|
|