Viewing 15 posts - 5,431 through 5,445 (of 14,953 total)
Domain access for the direct access, and SQL accounts used only for linked servers, gives a pretty good security model that's easy to administer. You can audit what you...
January 6, 2011 at 8:04 am
GilaMonster (1/5/2011)
You lot are nuts.
To misquote Obelix: These DBAs are crazy! 😀
January 6, 2011 at 7:58 am
Run a trace to capture every command it issues to the database. From that, you'll be able to work out what tables, procs, etc., it is accessing. Then...
January 6, 2011 at 7:57 am
Replace "Union" with "Union All", and you should have a decent query there. Not sure what you mean about replacing Union with Case statements.
January 6, 2011 at 7:46 am
Go with one view per store, even if two stores are identical in their columns. That's not a good general database practice, but it sounds like the only practical...
January 6, 2011 at 7:29 am
This is how I'd build something for that in T-SQL:
-- Gets prior three months
SELECT
DATEADD(MONTH, -1, GETDATE()),
DATEADD(MONTH, -2, GETDATE()),
DATEADD(MONTH,...
January 5, 2011 at 2:48 pm
Honestly, as complex as your solution and environment sound, I doubt anyone can give specific suggestions on this.
I generally solve authentication double-hop issues by using SQL Server logins instead of...
January 5, 2011 at 2:40 pm
GilaMonster (1/5/2011)
parm_singla (1/5/2011)
In general checking for nullablilty for parameter would be better than checking for nullablilty for the column.
Errr... Depends completely on what you're trying to do. If you need...
January 5, 2011 at 2:38 pm
Test Driven Development suggests running it and collecting the error messages, then fixing those.
Otherwise, figure out what the tool will be doing, and where it will be doing it, and...
January 5, 2011 at 2:34 pm
You can also add columns with an Alter Table command for temp tables.
January 5, 2011 at 2:31 pm
Turn that query into a string in a variable. Replace "MyTable" with the value from the cursor. Execute it as dynamic SQL.
declare @TableName varchar(255), @CMD varchar(1000);
declare Tabless cursor...
January 5, 2011 at 2:30 pm
Views are tricky to index. Lots of rules on that.
The better bet is to write out the query you really need in this, instead of using views.
January 5, 2011 at 12:39 pm
I'm assuming that different stores have different columns. If that's the case, you won't be able to have one view with all stores. Unless you include ALL columns...
January 5, 2011 at 12:35 pm
I can't see the image. Can you post code for the table?
January 5, 2011 at 11:52 am
Create a temp table. Insert the table name (from the variable) into it, if no rows exist that fit the criteria. You can test for that with a...
January 5, 2011 at 11:51 am
Viewing 15 posts - 5,431 through 5,445 (of 14,953 total)