Viewing 15 posts - 2,041 through 2,055 (of 2,171 total)
Something like this?
-- prepare test data
DECLARE @test-2 TABLE (SNO TINYINT, NAME VARCHAR, MARKS TINYINT)
INSERT @test-2
SELECT 1, 'A', 56 UNION ALL
SELECT 2, 'B', 35 UNION ALL
SELECT 3,...
June 27, 2006 at 2:17 pm
Something like this?
DECLARE @test-2 TABLE (TimeSlot VARCHAR(10), C1 VARCHAR(10), C2 TINYINT)
INSERT @Test
SELECT 'Period1', 'Part 1', 2 UNION ALL
SELECT 'Period2', 'Part 1', 4
SELECT * FROM @test-2
SELECT C1,
MAX(CASE...
June 27, 2006 at 10:00 am
Doesn't matter, since the date picked is the latest date to the date given.
How to select in the past (including today)
DECLARE @WantedDate DATETIME
SELECT @WantedDate = 'June 19,...
June 27, 2006 at 7:15 am
How to select in the past (including today)
SELECT HiD
FROM TheTable
WHERE HDate = (
SELECT MAX(HDate)
FROM TheTable
WHERE HDate < GETDATE()
)
How...
June 27, 2006 at 2:22 am
SELECT B.DESCR,
SUM(CASE WHEN TO_CHAR(A.REQ_DT, 'YYYY') = TO_CHAR(SYSDATE, 'YYYY') THEN 1 ELSE 0 END) Reqs, SUM(CASE WHEN TO_CHAR(A.REQ_DT, 'YYYY') = TO_CHAR(SYSDATE, 'YYYY') THEN
(CASE WHEN A.REQ_STATUS IN ('A', 'O') THEN...
June 26, 2006 at 10:40 pm
Nice! Let's only hope that the first sequence of spaces does not equal 8000 spaces. Because that will produce the result of -1.
June 26, 2006 at 11:29 am
Have you read the license agreement? There is a $20,000 license fee (last time I checked, could be changed now) for using SQL server as backend to a public web...
June 25, 2006 at 6:18 am
Create a table variable or temporary table and store the result for each store procedure. Then when done, UNION them together.
June 23, 2006 at 6:26 am
CREATE PROCEDURE spSearch_For_Software @sTitle as VarChar(200),@sField as varchar(200)
AS
set nocount on
declare @sSQL as varchar(200)
set @sSQL = 'select * from [Club CDs] where [' + '' + @sField + '' +...
June 22, 2006 at 12:21 pm
What error do you get? "Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the...
June 22, 2006 at 7:50 am
Try this one for fun!
SELECT @WorkingString = ISNULL(@WorkingString + ', ', '') + CtrlCode
FROM #TempControls
WHERE CtrlCode LIKE 'T%'
ORDER BY 1
June 22, 2006 at 6:48 am
Can be a number of sources for the error you experience.
June 22, 2006 at 6:36 am
The IServiceProvider COM did not register correct.
Merge your registry with this text (found on internet search).
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Interface\{6D5140C1-7436-11CE-8034-00AA006009FA}]
@="IServiceProvider"
[HKEY_CLASSES_ROOT\Interface\{6D5140C1-7436-11CE-8034-00AA006009FA}\NumMethods]
@="4"
[HKEY_CLASSES_ROOT\Interface\{6D5140C1-7436-11CE-8034-00AA006009FA}\ProxyStubClsid32]
@="{B8DA6310-E19B-11D0-933C-00A0C90DCAA9}"
[HKEY_CURRENT_USER\Software\Classes\Interface\{6D5140C1-7436-11CE-8034-00AA006009FA}]
@="IServiceProvider"
[HKEY_CURRENT_USER\Software\Classes\Interface\{6D5140C1-7436-11CE-8034-00AA006009FA}\NumMethods]
@="4"
[HKEY_CURRENT_USER\Software\Classes\Interface\{6D5140C1-7436-11CE-8034-00AA006009FA}\ProxyStubClsid32]
@="{B8DA6310-E19B-11D0-933C-00A0C90DCAA9}"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{6D5140C1-7436-11CE-8034-00AA006009FA}]
@="IServiceProvider"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{6D5140C1-7436-11CE-8034-00AA006009FA}\NumMethods]
@="4"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{6D5140C1-7436-11CE-8034-00AA006009FA}\ProxyStubClsid32]
@="{B8DA6310-E19B-11D0-933C-00A0C90DCAA9}"
If that doesn't work, try to re-register actxprxy.dll file in...
June 22, 2006 at 2:36 am
If you must use your original logic, rewrite as
SELECT @WorkingString = isnull(@WorkingString + ', ', '') + CtrlCode
FROM (select top 100 percent ctrlcode from #tempcontrols ORDER...
June 22, 2006 at 12:34 am
Why is LEN even considered? Here is a safer approach.
-- Prepare test data
DECLARE @Temp TABLE
(
CtrlCode VARCHAR(8)
)
INSERT @Temp
SELECT 'TT4' UNION ALL
SELECT 'T1' UNION ALL
SELECT...
June 21, 2006 at 11:05 pm
Viewing 15 posts - 2,041 through 2,055 (of 2,171 total)