Viewing 15 posts - 1,051 through 1,065 (of 2,171 total)
This might not be that fast, but there is no need for clustered index
--Prepare sample data
DECLARE@Sample TABLE
(
Widget TINYINT,
DT SMALLDATETIME
)
INSERT@Sample
SELECT1, 'Jan 16 2008 12:29AM' UNION ALL
SELECT1, 'Jan 17 2008 12:02AM'...
March 4, 2008 at 7:06 am
You can't have dynamic SQL in a function.
February 27, 2008 at 1:22 am
Drop the hyphens.
WHERE SomeCol >= '20080225' AND SomeCol < '20080226'
to get all records dated february 25, 2008.
February 27, 2008 at 1:21 am
Just in case there are more than piece of information of same type.
I suspect we haven't been told the full picture.
February 27, 2008 at 1:19 am
DECLARE@Sample TABLE (Data VARCHAR(100))
INSERT@Sample
SELECT'str001dt020208reg005trn0001'
SELECTs.Data,
t.*
FROM@Sample AS s
CROSS APPLY(
SELECTSUBSTRING(Data, 1, 6) AS Store,
SUBSTRING(Data, 7, 8) AS Date,
SUBSTRING(Data, 15, 6) AS RegisterNum,
SUBSTRING(Data, 21, 7) AS TransactionNum
) AS t
February 26, 2008 at 2:04 pm
Begin with posting the connection string here.
Maybe there is something unusual in there?
February 25, 2008 at 2:19 pm
This?
http://www.sqlservercentral.com/articles/Visual+Basic+6/trythesqlparserobjecttocolorizeyoursql!/422/
February 25, 2008 at 1:10 pm
If the text file already exists, OPENROWSET.
Or you could give DTS a try.
February 19, 2008 at 3:51 am
This is off-topic but does anyone have time to test the use of CROSS APPLY for SQL Server 2005?
-- 2000
SELECTy.DocNo,
t.Number
FROM(
SELECTDocNo,
COUNT(*) AS N
FROM@YourTable
GROUP BYDocNo
) AS y
INNER JOINMaster.dbo.spt_Values AS t ON t.Type...
February 17, 2008 at 2:40 pm
Msg 208, Level 16, State 1, Line 1
Invalid object name 'New.AddAnnex'.
February 17, 2008 at 3:06 am
UPDATEts
SETts.Current_Status = '1'
FROMTransaction_Status AS ts
WHEREts.Current_Status = '0'
AND EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_NAME = 'ADDANNEX' AND TABLE_SCHEMA = 'NEW')
February 16, 2008 at 2:45 pm
Add APPLICATIONNAME column to your profiler.
Then you will know which application is running every 5 seconds.
February 16, 2008 at 12:58 am
Already asked and answered here
February 14, 2008 at 4:25 am
You can't do this in SQL Server 2000. It is with SQL Server 2005 you can use CROSS APPLY.
February 13, 2008 at 5:29 am
SELECT DISTINCT DATENAME(MONTH, SeqDate)
FROM dbo.fnSeqDates('20070901', '20080201')
http://www.sqlservercentral.com/articles/Advanced+Querying/howmanymoremondaysuntiliretire/2475/%5B/url%5D
February 13, 2008 at 5:13 am
Viewing 15 posts - 1,051 through 1,065 (of 2,171 total)