Viewing 15 posts - 946 through 960 (of 2,171 total)
The @return_value is actually the stored procedures return value
CREATE PROCEDURE usp_emailTicket_get_ABANDONED
(
@emailID UNIQUEIDENTIFIER,
@pdfPass VARCHAR(50)
)
AS
SET NOCOUNT...
N 56°04'39.16"
E 12°55'05.25"
May 12, 2008 at 9:35 am
No, the first part is only to mimic your environment.
We don't have access to your data.
This is the part you need.
SELECT DISTINCT LEFT(YourColHere,...
N 56°04'39.16"
E 12°55'05.25"
May 12, 2008 at 8:53 am
Where is the query and table definitions?
N 56°04'39.16"
E 12°55'05.25"
May 12, 2008 at 8:46 am
SELECTbg.bg_id AS BugID,
MIN(CASE WHEN BgStAd_New_st_id = 1 THEN bgAudit.bgstad_added_dt ELSE NULL END) AS [Open]
MAX(CASE WHEN BgStAd_New_st_id = 5 THEN bgAudit.bgstad_added_dt ELSE NULL END) AS [Close]
FROMBugs AS bg
INNER JOINBug_Status_Audit AS bgAudit...
N 56°04'39.16"
E 12°55'05.25"
May 12, 2008 at 8:45 am
DECLARE@Sample TABLE (Info VARCHAR(100))
INSERT@Sample
SELECT'DanceContest1' UNION ALL
SELECT'DanceContest2' UNION ALL
SELECT'DanceContest3' UNION ALL
SELECT'DanceContest4' UNION ALL
SELECT'SongContest1' UNION ALL
SELECT'SongContest2' UNION ALL
SELECT'ContestGuitar1' UNION ALL
SELECT'ContestGuitar2' UNION ALL
SELECT'ContestGuitar3'
SELECT DISTINCTLEFT(Info, PATINDEX('%[0-9]%', Info) - 1)
FROM@Sample
ORDER BY1
N 56°04'39.16"
E 12°55'05.25"
May 12, 2008 at 8:42 am
karthikeyan (5/12/2008)
SELECT MID,Status,SP,DateStart ,DateEnd ,CheckDate = DATEADD(dd,-(DATEPART(dd, DATEADD(mm,N,DateStart))), DATEADD(mm,N,DateStart))INTO #FinalResult
FROM #Result,Tally
WHERE N <= DATEDIFF(MONTH,DateStart,DATEADD(MM,1,DateEnd))
Use DATEADD(MONTH, DATEDIFF(MONTH, '19000101', GETDATE()), '18991231')
to get last day of previous month. easier to read...
N 56°04'39.16"
E 12°55'05.25"
May 12, 2008 at 8:35 am
karthikeyan (5/12/2008)
SET monthEnd = ( select MAX(dt)
FROM PMag A
WHERE #PfManager.SP = A.SP
AND A.sno IN ( SELECT MID FROM Mgr WHERE SP = #PfManager.SP)
AND A.Type <>'T' Group BY SP) ...
N 56°04'39.16"
E 12°55'05.25"
May 12, 2008 at 8:32 am
They were not using Windows, right?
I don't think : and ? are valid characters for a Windows filename.
HourCharASCII
--------------
0- 1048
1- 2159
2- 3250
3- 4351
4- 5452
5- 6553
...
N 56°04'39.16"
E 12°55'05.25"
May 12, 2008 at 7:53 am
For a sample set of 1000 date pairs, my suggestion runs in 59 seconds and needs 1,119,549 reads.
Michaels suggestion runs in 334 seconds and needs 572,852 reads.
The SQL Server 2005...
N 56°04'39.16"
E 12°55'05.25"
May 12, 2008 at 7:31 am
I'll pitch in too (even if it's late).
No function. This also separats different ProcessCell.
Damn editor!
I attached the source code instead.
N 56°04'39.16"
E 12°55'05.25"
May 12, 2008 at 7:11 am
Using CHARINDEX function prohibits you from using the index.
N 56°04'39.16"
E 12°55'05.25"
May 12, 2008 at 5:51 am
Try this
INSERTAD_Final
(
Address1,
Address2,
Address3
)
SELECTs.Addr1,
s.Addr2,
s.Addr3
FROMDatabase.dbo.AddressSource AS s
WHERE{Basic criteria used}
CROSS JOIN@Tbl AS f
WHEREs.Addr1 LIKE '%' + f.Area + '%'
OR s.Addr2 LIKE '%' + f.Area + '%'
OR s.Addr3 LIKE '%' + f.Area + '%'
N 56°04'39.16"
E 12°55'05.25"
May 12, 2008 at 5:50 am
Which are all possible characters in the column TimeCol?
N 56°04'39.16"
E 12°55'05.25"
May 12, 2008 at 4:20 am
Also see http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=88422
N 56°04'39.16"
E 12°55'05.25"
May 12, 2008 at 1:12 am
Are you pulling our legs? A 202 line query with 28 tables (LEFT JOIN, RIGHT JOIN, INNER JOIN and FULL JOIN). A group by for 85 records?
SELECTTOP (100) PERCENT
dbo.TvsRecords.TvsRecordID,
dbo.TvsRecords.TvsFormNo,
dbo.TvsRecords.SystemFormNo AS...
N 56°04'39.16"
E 12°55'05.25"
May 9, 2008 at 3:16 am
Viewing 15 posts - 946 through 960 (of 2,171 total)