Viewing 15 posts - 15,316 through 15,330 (of 15,376 total)
The problem lies in the where clause...
where delivery_date between @StartDate and @EndDate and
driver = e.emp_cd and
...
April 22, 2009 at 2:22 pm
hence my comment about select * (and yet another reason it should not be used)
April 22, 2009 at 2:13 pm
It shouldn't have any affect. In fact, if you try to insert or update a computed column sql throws an exception. The one potential issue is that if the formatting...
April 22, 2009 at 2:08 pm
I would have to agree with JacekO about the windows app. Can you tell I write web apps all day? It is not as critical in a Windows app but...
April 22, 2009 at 2:05 pm
BP is definitely to close the connection. Connection pooling will handle retrieving the connection should your application need it again. Leaving an unused connection open can cause the pool to...
April 22, 2009 at 1:40 pm
Look at the parameters for instantiating your SqlConnection. You either need to pass the connection string here or set it after you instantiate it.
April 21, 2009 at 10:38 am
Unless you are using windows authentication that is not possible. When you make a connection to sql you do not specify what machine and user is using it. It would...
April 20, 2009 at 2:16 pm
I thought this was an asp.net app? Would be more difficult to persist the dictionary across sessions unless you either compiled it or loaded it to each session. But if...
April 20, 2009 at 1:48 pm
check out BOL for sql 2000. Look at the entry for suser_name 😀
http://msdn.microsoft.com/en-us/library/aa299742(SQL.80).aspx
April 20, 2009 at 1:42 pm
Gotcha. 😉
I believe you will need something like this.
select * from table
where type in (@type) and
case type
when 'A' then table.A like 'abc%'
when 'B' then table.A like 'xyz%'
when 'C' then...
April 20, 2009 at 1:38 pm
Are you saying that you a combobox that allows multi select? What is the value of @type at run time?
April 20, 2009 at 1:25 pm
check out suser_name() function.
April 20, 2009 at 1:06 pm
That is roughly clear as mud however the where clause you posted sounds like it should work...
((@type = A and table.A like 'abc%') or (@type = C and table.A like...
April 20, 2009 at 1:00 pm
Assuming that @type is the value you want it is just type = @type
April 20, 2009 at 12:03 pm
I think you will find that it doesn't gain you any performance. int.parse() and .tostring() are very efficient. I would be more concerned that you now have a dictionary. (are...
April 20, 2009 at 8:38 am
Viewing 15 posts - 15,316 through 15,330 (of 15,376 total)