Viewing 15 posts - 166 through 180 (of 484 total)
Geesh; that's an obscure one. Good question!
November 20, 2006 at 9:36 am
If I may offer a suggestion to Loner's query and Lynn's correction:
DECLARE @dtCheck datetime SET @dtCheck = DATEADD(hour, -24, GetDate())
SELECT t.pk_ticket, t.company, t.createdate FROM hd_ticket t INNER JOIN (SELECT fk.ticket, MIN...
November 3, 2006 at 2:57 pm
CSDunn; I beleive you describe a good case for use the correlated sub-query instead of the join, as I described in my previous post. I think you will see that...
October 13, 2006 at 4:01 pm
BOL defines the SQL Server Error log as "logs certain system events and user-defined events". What it does is log events (errors and informational) based on the messages severity level. ...
October 13, 2006 at 3:53 pm
Depending on your data and query, it will likely be much more efficient to use a computed column to store the time difference in the table itself.
ALTER TABLE Mytable ADD ElapsedTime...
October 13, 2006 at 3:44 pm
And, showing there is more than one way to skn a cat, you can also use OPENROWSET or OPENDATASOURCE.
Look in BOL at Importing and Exporting Bulk Data
Hope this helps
October 13, 2006 at 3:16 pm
To simply answer your question, you do not have any wildcard character in your Like pattern. You probably just need to make your query:
SELECT * FROM users where USERNAME LIKE...
October 13, 2006 at 3:12 pm
You COULD declare your sproc parms to be varchar(max size) (which is 8096 in SQL 2000, or varchar(MAX) in SQL 2005), then retrieve the size from the INFORMATION_SCHEMA.COLUMNS view and enforce...
October 13, 2006 at 3:07 pm
To describe it a little further, your statement "retrieving all of a customer's orders, even with an index on customerID, could result in a table scan " is not likely. ...
October 13, 2006 at 2:54 pm
Without the rest of your query or more explanation of what you are trying to provide, it is a little difficult to help. But let me provide a few thoughts...
October 13, 2006 at 2:33 pm
I believe that the SQL Query optimizer is smart enough to build and cache a single plan when the queries are the same or similar, even with an IF statement. ...
October 13, 2006 at 5:56 am
DECLARE @SpreadSelect as int
SELECT @SpreadSelect = 0
IF @SpreadSelect = 0
SELECT AcctNo
FROM _FinalFlat
WHERE
(SpreadFile IN (1, 9) )
ELSE
SELECT AcctNo
FROM _FinalFlat
WHERE
(SpreadFile IN (0, 2) )
October 12, 2006 at 11:52 am
Same in VB and VBScript.
Set is used for assigning objects. And actually, it is LET that is used for assigning native datatypes (like date, integer, string, etc). But Let...
October 12, 2006 at 6:16 am
Viewing 15 posts - 166 through 180 (of 484 total)