Viewing 15 posts - 1,321 through 1,335 (of 1,346 total)
Cursor over information_schema.columns for both tables, build the column list into a varchar and exec dynamix SQL with the resulting query.
January 26, 2005 at 9:35 am
When you use a WHERE clause on an outer-joined table you essentially convert the join type back to Inner.
select *
from account
full outer join balances
on balances.company = account.company...
January 26, 2005 at 9:21 am
Use replication and maintain an exact copy of the table in the same database as the dependant table.
Or use triggers instead of DRI to enforce integrity, becasue you can use...
January 25, 2005 at 5:57 pm
Select
Email,
Case
When 1stDate > 2ndDate Then 1stDate
Else 2ndDate
End As MostCurrentDate
From Orders
January 25, 2005 at 4:59 pm
Add 3 lines before the Select to prepend and append the Like wildcard operators around the user-entered values.:
Select @name = '%' + @name + '%'
Select @facility = '%' + @facility...
January 25, 2005 at 3:00 pm
Your Group By is wrong - it contains the same column you're taking the Max() of, therefore you'll get 1 record for each date instead of just the most recent.
January 25, 2005 at 2:44 pm
How about this ?
http://www.sqlservercentral.com/scripts/contributions/1294.asp
Just aggregate out of the final temp table instead of reporting by individual table.
January 25, 2005 at 2:33 pm
Disadvantages of #temp tables:
Logged in tempdb log
Cannot be created inside UDFs, therefore only @Table varaibles can be used to return non-scalar values from UDFs
Intermixing of DDL and DML statements in...
January 25, 2005 at 2:08 pm
Can you pull the connection string from the web.config file of the web service ?
Is it by chance using an IP address instead of a name ?
http://support.microsoft.com/default.aspx?scid=kb;en-us;300420
January 25, 2005 at 10:08 am
It is generally useful to include the actual text of the error message.
January 25, 2005 at 9:25 am
Exactly. And neither of our solutions are technically correct because neither of us have seen the requirements. Maybe a Null 2nd choice represents an incomplete, or in-progress state and shouldn't...
January 25, 2005 at 9:19 am
No, the problem is that Exists is testing for existence of at least 1 record, but when you use an aggregate like SUM(), without a Having clause, you always get a...
January 25, 2005 at 9:16 am
Missing a semi-colon between server and database.
January 25, 2005 at 8:45 am
What is the connection method ? ADO, ADO.Net ?
Maybe post 2 examples of connection strings, 1 that is slow, 1 that is responsive.
January 25, 2005 at 8:29 am
The following MS KB article has a useful comparison of table variables versus temp tables:
http://support.microsoft.com/default.aspx?scid=kb;en-us;305977
January 25, 2005 at 8:11 am
Viewing 15 posts - 1,321 through 1,335 (of 1,346 total)