Viewing 15 posts - 3,721 through 3,735 (of 14,953 total)
select (columns needed)
from Table
where DateColumn >= cast(dateadd(day, -10, getdate()) as Date)
and DateColumn < cast(dateadd(day, -9, getdate()) as Date);
July 19, 2011 at 3:03 pm
Have you tried the create database options that rebuild the log file?
Create Database For Attach_Rebuild_Log
(Check MSDN or BOL for the full syntax.)
July 19, 2011 at 2:54 pm
select distinct boxID
from TableB
where not exists
(select *
from TableB as TB2
inner join TableC
on TB2.FileID=TableC.FileID
where TB2.BoxID = TableB.BoxID);
If you have...
July 19, 2011 at 2:44 pm
Per your original post, FileID is the primary key in TableB. You CAN'T have multiple entries in a table for the primary key value.
So what are you actually looking...
July 19, 2011 at 2:24 pm
You can use full text indexing on BLOBs stored in SQL Server. MSDN has instructions on setting it up. You have to include the file extension as a...
July 19, 2011 at 2:19 pm
You don't need a foreign key to do a query.
How about something like:
select *
from TableB
where FileID not in (select FileID from TableC);
July 19, 2011 at 2:08 pm
Might have an impact on the execution plan, but not on the syntax of the command. Would have the same impact on separate commands.
July 19, 2011 at 2:06 pm
Can you get what you want via a T-SQL query using XQuery?
July 19, 2011 at 1:39 pm
opc.three (7/19/2011)
GSquared (7/19/2011)
If the DB Admin will be doing the actual query tuning himself, that's a different question entirely. But that's not DB Admin. That's "Lead Database Developer"...
July 19, 2011 at 12:04 pm
Yes, Merge will do what you need. Yes, it has, in my tests, performed at least as well as separate statements, if not better.
There should be no need to...
July 19, 2011 at 12:01 pm
Same table vs different table makes no real security difference.
Naming the column something other than "Password" just makes the database that much harder to maintain and develop against.
So long as...
July 19, 2011 at 11:58 am
TravisDBA (7/17/2011)
opc.three (7/17/2011)
TravisDBA (7/17/2011)
I agree that being able to write decent queries and to read others' code is #2 on the list of talent for System DBA's... it's just a...
July 19, 2011 at 11:56 am
I'm pretty sure you can't have a database server exist in two AD domains. Could be wrong about that, since I'm not an AD expert, but I don't think...
July 19, 2011 at 11:48 am
I'm not sure what the name of a column in a table has to do with preventing SQL injection. That's about access methods in your data access layer.
July 19, 2011 at 11:41 am
Do you mean something like this?
DECLARE
@VB VARBINARY(100) = CAST('This Is My String' AS VARBINARY(100)),
@Sub VARBINARY(100) = CAST('Is' AS VARBINARY(100));
SELECT CHARINDEX(@Sub, @VB);
July 19, 2011 at 11:39 am
Viewing 15 posts - 3,721 through 3,735 (of 14,953 total)