Viewing 11 posts - 16 through 26 (of 26 total)
Try this. You may need to deal with cleanup issues with the float column if the data is predictable.
SELECT
f.itemid,
f.attributename,
CASE WHEN (s.attributename IS NULL) OR (s.ValueColumnName <>...
August 30, 2004 at 8:40 am
The problem is indexes then. Either create or check the health of the indexes on "Calls.JOB_NUMBER", "VISITS.JOB_NUMBER", "VISITS.VISIT_NUMBER". Unless you are on a very slow box this should in 1-2...
August 27, 2004 at 7:48 am
SELECT
c.JOB_NUMBER,
c.LOG_DATE,
c.ETC,
ENGINEER = (SELECT
ENGINEER
FROM VISITS v
WHERE v.JOB_NUMBER = c.JOB_NUMBER AND v.VISIT_NUMBER = (SELECT MIN(VISIT_NUMBER) FROM VISITS))
FROM Calls c
August 27, 2004 at 7:16 am
SELECT c.*, v.ENGINEER
FROM Calls c
LEFT JOIN VISITS v ON v.JOB_NUMBER = c.JOB_NUMBER AND VISIT_NUMBER = 1
The Left Join will prevent eliminating Job_number's that no one has made a visit to....
August 27, 2004 at 6:55 am
Move the "commit transaction".
COMMIT TRAN
--* Misc. Stuff. Non destructive, no TRAN necessary.
EXEC("
PRINT 'Creating SystemSetting CipherConversion'
INSERT INTO SystemSettings (OptionName, OptionValue) VALUES ('CipherConversion', 'Yes')
PRINT Convert(varchar, @@RowCount) + ' Rows Inserted into...
August 26, 2004 at 8:57 pm
It just dawned on me where you are running into the 256 char limit. In you query analyzer select from the top bar menu "Tools" then "Options". Select the "Results"...
August 25, 2004 at 2:06 pm
If you need 1610 char's then:
CREATE TABLE New (
item INT NOT NULL,
desx VARCHAR(1610 - 8000) NOT NULL)
if 8000 char's is not big enough then make "desx" a text file...
August 25, 2004 at 1:53 pm
DECLARE @text VARCHAR(2000)
SELECT @text = @text + RTRIM(LTRIM(column_value)) + ','
FROM Sometable
August 25, 2004 at 10:52 am
This should do the trick. It uses looping but avoids using cursors
SET NOCOUNT ON
CREATE TABLE New (
item INT NOT NULL,
desx VARCHAR(100) NOT NULL)
DECLARE @items TABLE(
nid INT IDENTITY(1,1),
item INT)
INSERT INTO @items
SELECT DISTINCT...
August 25, 2004 at 10:42 am
Have you check the execution plan. My guess is that with Q2 it is not using an index. The same behavior can be found when the R value of an...
May 6, 2003 at 7:41 am
I think the answer to your question is directly related to the exclusivity of indexes that are, or can be, applied to the table. A covering index that will quickly...
March 13, 2003 at 4:18 pm
Viewing 11 posts - 16 through 26 (of 26 total)