Viewing 15 posts - 1,066 through 1,080 (of 3,544 total)
jcrawf02 (5/26/2011)
Actually, your English is better than most of the English-speaking folks, myself included. I should try responding in Italian...
Io non sarei schizzando senza senso
😀
Far away is close at hand in the images of elsewhere.
Anon.
May 26, 2011 at 9:11 am
btw this will only allow 99 occurrances
Far away is close at hand in the images of elsewhere.
Anon.
May 26, 2011 at 9:08 am
Use a trigger like this
CREATE TRIGGER trg_test ON [Test] FOR INSERT AS
UPDATE t
SET t.eng_ref=t.eng_ref+RIGHT('0'+CAST(t.test_id as varchar),2)
FROM [Test] t
JOIN inserted i ON i.test_id=t.test_id
Far away is close at hand in the images of elsewhere.
Anon.
May 26, 2011 at 9:07 am
Gopal Singh (5/26/2011)
I have create table Test table with primary key id test_Id and auto increment when inserting a record in a table, then i add another field with...
Far away is close at hand in the images of elsewhere.
Anon.
May 26, 2011 at 8:44 am
LEFT(RefNo,PATINDEX('%[0-9]%',RefNo)-1)+
CAST(CAST(SUBSTRING(RefNo,PATINDEX('%[0-9]%',RefNo),255) as int)+1 as varchar)
Far away is close at hand in the images of elsewhere.
Anon.
May 26, 2011 at 6:51 am
SELECT a.NUMBER, a.[TYPE], a.DATESTAMP, b.ASSIGNMENT
FROM (SELECT ROW_NUMBER() OVER (PARTITION BY act.NUMBER ORDER BY act.THENUMBER ASC) AS [RowNum],
act.THENUMBER, act.NUMBER, act.[TYPE], act.DATESTAMP
FROM #tbl_ACTIVITY act WHERE act.[TYPE] <> 'Notification') a
JOIN...
Far away is close at hand in the images of elsewhere.
Anon.
May 25, 2011 at 7:08 am
calvo (5/19/2011)
Here's what I came up with
declare @x varchar(50) = 'Jane Smith 05 18 2011 mamm.pdf'
select...
Far away is close at hand in the images of elsewhere.
Anon.
May 19, 2011 at 8:44 am
Providing that the month is the first 2 digits and the date is 10 chars long then this should work
ISDATE(REPLACE(SUBSTRING([column],PATINDEX('%[0-9][0-9]%',@x),10),' ','/'))
and
CAST(REPLACE(SUBSTRING([column],PATINDEX('%[0-9][0-9]%',@x),10),' ','/') as datetime)
Far away is close at hand in the images of elsewhere.
Anon.
May 19, 2011 at 6:56 am
WITH cte (PeriodID,StaffInitials)
AS (
SELECT p.PeriodID,s.StaffInitials
FROM (SELECT DISTINCT t.DayId,t.PeriodID FROM tTimeTable t WHERE t.DayID = 1) p
CROSS JOIN tStaffTimeTableInfo s
WHERE NOT EXISTS(SELECT * FROM tTimeTable t...
Far away is close at hand in the images of elsewhere.
Anon.
May 17, 2011 at 10:05 am
I think this will work but there must be a better way, just cannot think of it at the moment.
WITH p (DayId,PeriodID)
AS (SELECT DISTINCT t.DayId,t.PeriodID
FROM tTimeTable t
WHERE...
Far away is close at hand in the images of elsewhere.
Anon.
May 17, 2011 at 7:31 am
p.s. I normally run the SELECT without the INSERT and analyse the output for duplicates and start backwards from there.
Far away is close at hand in the images of elsewhere.
Anon.
May 17, 2011 at 6:42 am
Ninja's_RGR'us (5/17/2011)
Checked the inner join to make sure they don't double the keys somehow??
What Ninja's stated is most likely the cause.
Most of PK violations I come across are due to...
Far away is close at hand in the images of elsewhere.
Anon.
May 17, 2011 at 6:40 am
Ray K (5/13/2011)
Brandie Tarvin (5/13/2011)
WOTD:
:w00t: :hehe: :crazy:
Far away is close at hand in the images of elsewhere.
Anon.
May 13, 2011 at 8:00 am
Or without the cte
SELECT
CAST(LEFT([Data Team],2) as int)+CAST(LEFT([CRM],2) as int)+CAST(LEFT([IM Team],2) as int)
+(CAST(RIGHT([Data Team],2) as int)+CAST(RIGHT([CRM],2) as int)+CAST(RIGHT([IM Team],2) as int))/60 AS [HH],
(CAST(RIGHT([Data Team],2) as int)+CAST(RIGHT([CRM],2) as int)+CAST(RIGHT([IM...
Far away is close at hand in the images of elsewhere.
Anon.
May 12, 2011 at 1:55 am
pee - the dog last night and none on the roofs here. A lot in the grass.
Far away is close at hand in the images of elsewhere.
Anon.
May 11, 2011 at 10:03 am
Viewing 15 posts - 1,066 through 1,080 (of 3,544 total)