Viewing 15 posts - 9,811 through 9,825 (of 10,144 total)
San (7/16/2008)
San, do you have any more information regarding this puzzle? For instance, are you aiming to change an existing table to meet your criteria, or to return a satisfactory...
July 16, 2008 at 10:22 am
San (7/15/2008)
I am sorry if someone has already posted this question and am asking again.
This problem is eating my head, I have a table
Table 1 -
1br
1er
2rt
3yh
2uj
3iu
3ol
Now I want only...
July 16, 2008 at 8:57 am
karthikeyan (7/15/2008)
use distinct keyword
Interesting solution - care to elaborate?
July 16, 2008 at 8:46 am
vasaharshit (7/11/2008)
hi all,Please help me out to design the database for online examination system.
You will need to provide much more...
July 11, 2008 at 8:02 am
Something like this?
CREATE TABLE #ContactDetails (ContactID INT, ContactMethod VARCHAR(5), ContactDetail VARCHAR(30))
INSERT INTO #ContactDetails (ContactID, ContactMethod, ContactDetail)
SELECT 1, 'Phone', '+1 413 2220144' UNION ALL
SELECT 1, 'Fax', '+1 413 2221144'...
July 10, 2008 at 4:40 am
harshil (7/8/2008)
What the purpose of this query is to remove all duplicate records except one...
July 8, 2008 at 7:52 am
harshil (7/8/2008)
Although I have intentionally mentioned it for SQL SERVER...
July 8, 2008 at 5:29 am
DECLARE @t nvarchar(16)
SET @t = 'T5e3st003'
SELECT RIGHT(@t, MIN(number)-1)
FROM Numbers
WHERE SUBSTRING(REVERSE(@t), number, 1) NOT IN ('1','2','3','4','5','6','7','8','9','0')
AND number < 10
DROP TABLE #test
CREATE TABLE #test (t nvarchar(16))
INSERT INTO #test (t)
SELECT 'T5e3st003'...
July 8, 2008 at 4:56 am
A single statement?
SET @T = '03' 😉
Or perhaps
SET @T = REVERSE(LEFT(REVERSE(@T),2))
Or even
SET @T = substring(@T, 6, 2)
All of these (and Gail's solution) will give the result "03". Is...
July 7, 2008 at 8:00 am
Two hours & three trains each way: Reading -> Virginia Water -> Weybridge -> Surbiton (Reading -> Basingstoke -> Surbiton as backup route). WFH two days a week so it...
July 7, 2008 at 4:56 am
pop (7/1/2008)
Interesting, def a little shorter code-wise....no performance increase though...
How many rows are returned by this...
SELECT a.casenum, a.at_id
FROM #audit_trail a
INNER JOIN (SELECT MAX(at_id) AS at_id, casenum FROM...
July 2, 2008 at 9:05 am
d_sysuk (7/2/2008)
Think you may have made the first initial mistake that I did, (whilst was determining what the poster required - as was not the clearest)..
Background
Table: Has dup rows
Requirement:
Delete...
July 2, 2008 at 3:57 am
saritha (7/2/2008)
set rowcount 1
select 1
while @@rowcount > 0
delete Emp1 where 1 < (select count(*) from Emp1 a2
where Emp1.Eno = a2.Eno
...
July 2, 2008 at 3:48 am
karthikeyan (7/2/2008)
Jeff,Heh... this all reminds me of another of my favorite 4 letter acronyms... RTFS!!!!!
what do you mean by RTFS ?
Read the friggin' spec 😛
July 2, 2008 at 2:58 am
rbarryyoung (7/1/2008)
Though don't forget that you need a covering Clustered Index to make this work.
Thanks for pointing that out Barry. This solution will only work if the data is ordered...
July 2, 2008 at 2:35 am
Viewing 15 posts - 9,811 through 9,825 (of 10,144 total)