Showing posts with label displayed. Show all posts
Showing posts with label displayed. Show all posts
Thursday, March 29, 2012
Do not display the result of my long text string, approx about 400 characters
I have the following problem. My SQL Query that i wrote works but the result that is displayed in Query analyzer cuts most of my long text that I want in my result. The long text string is approx about 400 characters and the type is varchar of the field. Any ideas??
SELECT '510', PRODCLASSID
, '1', COMPONENTID,'ENG'+SPACE(2),'#'+SPACE(254),'#'+SPAC E(254),'#'+SPACE(254),'#'+SPACE(99),externalid,
'Desc1' = CASE
WHEN SUBSTRING(externalid,1,2) = 'MF'
THEN 'Full machine warranty : parts, labour, mileage and others covered at warranty rates applicable at the time of repair. '
WHEN SUBSTRING(externalid,1,2) = 'MP'
THEN 'Full machine warranty, parts only : parts covered at warranty rates applicable at the time of repair. '
WHEN SUBSTRING(externalid,1,2) = 'PF'
THEN 'Power line warranty : parts, labour, mileage and others covered at warranty rates applicable at the time of repair. '
WHEN SUBSTRING(externalid,1,2) = 'PP'
THEN 'Power line warranty, parts only : parts are covered at warranty rates applicable at the time of repair. '
END
+
CASE
WHEN SUBSTRING(externalid,LEN(externalid)- 3,4) = '2018'
THEN 'Flexible warranty starts after the standard warranty period has expired and is covered up to 18 month or 2000 HRS, whichever comes first. '
WHEN SUBSTRING(externalid,LEN(externalid)-3,4) = '3024'
THEN 'Flexible warranty starts after the standard warranty period has expired and is covered up to 24 month or 3000 HRS, whichever comes first. '
WHEN SUBSTRING(externalid,LEN(externalid)-3,4) = '4030'
THEN 'Flexible warranty starts after the standard warranty period has expired and is covered up to 30 month or 4000 HRS, whichever comes first. '
WHEN SUBSTRING(externalid,LEN(externalid)-3,4) = '5036'
THEN 'Flexible warranty starts after the standard warranty period has expired and is covered up to 36 month or 5000 HRS, whichever comes first. '
WHEN SUBSTRING(externalid,LEN(externalid)-3,4) = '6042'
THEN 'Flexible warranty starts after the standard warranty period has expired and is covered up to 42 month or 6000 HRS, whichever comes first. '
WHEN SUBSTRING(externalid,LEN(externalid)-3,4) = '8054'
THEN 'Flexible warranty starts after the standard warranty period has expired and is covered up to 54 month or 8000 HRS, whichever comes first. '
WHEN SUBSTRING(externalid,LEN(externalid)-3,4) = '1074'
THEN 'Flexible warranty starts after the standard warranty period has expired and is covered up to 74 month or 10000 HRS, whichever comes first. '
END
+ 'Flexible warranty is handled according to the procedures described in ESPPM 3-10.'
+
CASE
WHEN prodclassid IN ('P1','P11','P8','P9')
THEN ' (mileage limited to 300 km)'
WHEN prodclassid IN ('P7')
THEN ' (mileage limited to 200 km)'
ELSE NULL
END
+
SPACE(5000 - LEN('Desc1'))
......If you are using the MS Query Analyzer from the SQL 2000 Client Tools, you can set the maximum column length. Select Tools | Options | Results and the length control is near the middle of the sheet.
-PatPsql
SELECT '510', PRODCLASSID
, '1', COMPONENTID,'ENG'+SPACE(2),'#'+SPACE(254),'#'+SPAC E(254),'#'+SPACE(254),'#'+SPACE(99),externalid,
'Desc1' = CASE
WHEN SUBSTRING(externalid,1,2) = 'MF'
THEN 'Full machine warranty : parts, labour, mileage and others covered at warranty rates applicable at the time of repair. '
WHEN SUBSTRING(externalid,1,2) = 'MP'
THEN 'Full machine warranty, parts only : parts covered at warranty rates applicable at the time of repair. '
WHEN SUBSTRING(externalid,1,2) = 'PF'
THEN 'Power line warranty : parts, labour, mileage and others covered at warranty rates applicable at the time of repair. '
WHEN SUBSTRING(externalid,1,2) = 'PP'
THEN 'Power line warranty, parts only : parts are covered at warranty rates applicable at the time of repair. '
END
+
CASE
WHEN SUBSTRING(externalid,LEN(externalid)- 3,4) = '2018'
THEN 'Flexible warranty starts after the standard warranty period has expired and is covered up to 18 month or 2000 HRS, whichever comes first. '
WHEN SUBSTRING(externalid,LEN(externalid)-3,4) = '3024'
THEN 'Flexible warranty starts after the standard warranty period has expired and is covered up to 24 month or 3000 HRS, whichever comes first. '
WHEN SUBSTRING(externalid,LEN(externalid)-3,4) = '4030'
THEN 'Flexible warranty starts after the standard warranty period has expired and is covered up to 30 month or 4000 HRS, whichever comes first. '
WHEN SUBSTRING(externalid,LEN(externalid)-3,4) = '5036'
THEN 'Flexible warranty starts after the standard warranty period has expired and is covered up to 36 month or 5000 HRS, whichever comes first. '
WHEN SUBSTRING(externalid,LEN(externalid)-3,4) = '6042'
THEN 'Flexible warranty starts after the standard warranty period has expired and is covered up to 42 month or 6000 HRS, whichever comes first. '
WHEN SUBSTRING(externalid,LEN(externalid)-3,4) = '8054'
THEN 'Flexible warranty starts after the standard warranty period has expired and is covered up to 54 month or 8000 HRS, whichever comes first. '
WHEN SUBSTRING(externalid,LEN(externalid)-3,4) = '1074'
THEN 'Flexible warranty starts after the standard warranty period has expired and is covered up to 74 month or 10000 HRS, whichever comes first. '
END
+ 'Flexible warranty is handled according to the procedures described in ESPPM 3-10.'
+
CASE
WHEN prodclassid IN ('P1','P11','P8','P9')
THEN ' (mileage limited to 300 km)'
WHEN prodclassid IN ('P7')
THEN ' (mileage limited to 200 km)'
ELSE NULL
END
+
SPACE(5000 - LEN('Desc1'))
......If you are using the MS Query Analyzer from the SQL 2000 Client Tools, you can set the maximum column length. Select Tools | Options | Results and the length control is near the middle of the sheet.
-PatPsql
Sunday, March 11, 2012
DM Graphs
I'm having the same issue. It's different depending on the algorithm. For example, in Mining Model Viewer, if I have a tree displayed and I right click on the tree, I get the options to "Copy Graph View," and "Copy Entire Graph." Those options will allow me to paste the tree graph into a Word doc. But if I'm in Cluster Analysis, I only get "Copy" when I right click on the chart. If I select it, and try to paste it into a Word doc, I get a table instead. I just assumed that the software wasn't finished yet and you couldn't copy those charts. But maybe it's a bug? I'm using SQL server standard edition on my desktop, single CPU.
That's the design of the copy functionality.
The graphical views copy as bitmaps and the tabular views copy as tables. There's a fine distinction between what's "graphical" and what's a "table" - essentially anything that looks "table-like" is a table, otherwise it's graphical.
The intention is that the graphics can easily be created from the table data. For example, if you download the Office 2007 beta and paste in what you copy from the Cluster Characteristics view, you can use the databars feature in Excel 2007 to easily create a facsimile of the Cluster Characteristics view.
For some views, notably the Cluster Overview view, the format of the table isn't very useful. This is fixed in SP2, which will release later this year.
|||Can we use the tabular data, say from Cluster, in Excel 2003 to recreate the "graphic" from Cluster analysis?DLL files for crystal reports
Dear Friends,
Which DLL (i.e. *.dll) files are important inorder the crystal reports v10 to be displayed in the vb.net 2003 program?
Can I have the names of these dll files please?Visit http://support.businessobjects.com
Which DLL (i.e. *.dll) files are important inorder the crystal reports v10 to be displayed in the vb.net 2003 program?
Can I have the names of these dll files please?Visit http://support.businessobjects.com
Friday, March 9, 2012
Divide by zero display "0"
Hello,
how would I write an if statement to ensure that a "0" is displayed if a
divide 0/0?
Thanksiif(<field.total>=0,0,<field.numerator>/(<field.total>)
U. Tokklas
"Fab" wrote:
> Hello,
> how would I write an if statement to ensure that a "0" is displayed if a
> divide 0/0?
> Thanks
>
>|||Note: IIF is a function call. All arguments get evaluated before invoking
the function. Therefore, a DivisionByZero can still happen.
Use the following pattern:
=iif( Fields!Total.Value = 0, 0, Fields!X.Value / iif(Fields!Total.Value=0,
1, Fields!X.Value))
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Tokklas" <Tokklas@.discussions.microsoft.com> wrote in message
news:7381410F-FE63-4DAA-9D8D-3F426D24CCD8@.microsoft.com...
> iif(<field.total>=0,0,<field.numerator>/(<field.total>)
> U. Tokklas
>
> "Fab" wrote:
>> Hello,
>> how would I write an if statement to ensure that a "0" is displayed if a
>> divide 0/0?
>> Thanks
>>
>>
how would I write an if statement to ensure that a "0" is displayed if a
divide 0/0?
Thanksiif(<field.total>=0,0,<field.numerator>/(<field.total>)
U. Tokklas
"Fab" wrote:
> Hello,
> how would I write an if statement to ensure that a "0" is displayed if a
> divide 0/0?
> Thanks
>
>|||Note: IIF is a function call. All arguments get evaluated before invoking
the function. Therefore, a DivisionByZero can still happen.
Use the following pattern:
=iif( Fields!Total.Value = 0, 0, Fields!X.Value / iif(Fields!Total.Value=0,
1, Fields!X.Value))
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Tokklas" <Tokklas@.discussions.microsoft.com> wrote in message
news:7381410F-FE63-4DAA-9D8D-3F426D24CCD8@.microsoft.com...
> iif(<field.total>=0,0,<field.numerator>/(<field.total>)
> U. Tokklas
>
> "Fab" wrote:
>> Hello,
>> how would I write an if statement to ensure that a "0" is displayed if a
>> divide 0/0?
>> Thanks
>>
>>
Subscribe to:
Posts (Atom)