Viewing 15 posts - 2,896 through 2,910 (of 3,543 total)
SELECT a.class, a.account, a.cust, a.doc_type
FROM documents a
LEFT OUTER JOIN documents b
ON b.class = a.class
AND b.account = a.account
AND b.cust = a.cust
AND...
December 5, 2003 at 6:35 am
Following on from Fank's suggestion, use ping instead
declare @ip varchar(255),@cmd varchar(100)
set @cmd = 'ping ' + HOST_NAME()
create table #temptb (grabfield varchar(255))
insert into...
December 4, 2003 at 6:50 am
Store value as both varchar and decimal, use the varchar to show original input and use decimal value for calculations.
December 3, 2003 at 7:00 am
John,
You might want to check your answer. There is a WHERE missing and you will not be use
a.StudentID in the sub query as it does not appear in the GROUP...
December 3, 2003 at 2:36 am
SELECT a.Year,a.CourseId, COUNT(distinct b.StudentId)
FROM TCourseTaken a
LEFT OUTER JOIN TCourseTaken b
ON b.CourseId = a.CourseId
AND b.StudentId = a.StudentId
AND b.Year < a.Year
GROUP BY...
December 1, 2003 at 7:27 am
quote:
envisaged it to be done without cursors
One way would be to create a...
December 1, 2003 at 7:14 am
AFIK it is set during install and relates to the unicode settings. I can't remember if you can select it, MS reckons you can. The normal id is 1033, is...
November 28, 2003 at 6:36 am
quote:
pick up multiple occurrences of the string in the same row
You could put...
November 27, 2003 at 5:36 am
What I was alluding to was to create the cursor like this
DECLARE db_curs CURSOR
FOR SELECT au_id FROM authors
WHERE Address LIKE '%'+@SearchStr+'%'
to do the scan...
November 27, 2003 at 4:55 am
Another possibility is to insert the PKs into a temp table (also with PK) and then loop thru that table using 'TOP 1', select, updatetext, delete until all rows processed.
...
November 27, 2003 at 4:17 am
quote:
can't use cursor because can't declare variable as text
If the table has a PK...
November 27, 2003 at 4:13 am
Jonathan, nice answer.
Just a question though. Whilst it may not be important but if, for example, there were 100 rows to be updated then the select between BEGIN/END would read...
November 26, 2003 at 6:12 am
One way is to use CASE but there may be performance issues.
WHERE (CASE
WHEN T_DocumentType.[Id] = '{8511C9BA-8D2E-4D8C-A58E-B1016F4A9977}') THEN
(CASE WHEN CAST(UD3 AS Integer) = 123456...
November 26, 2003 at 5:51 am
quote:
...if you placed a GO between the Alter and the Select...
True in this contrived example...
November 26, 2003 at 2:25 am
quote:
How long it takes to transfer 7GB. Are you deleting before import data, if so what happens if the job failed after...
November 25, 2003 at 8:22 am
Viewing 15 posts - 2,896 through 2,910 (of 3,543 total)