Showing posts with label select. Show all posts
Showing posts with label select. Show all posts

Wednesday, March 28, 2012

Microsoft SQL 6.5

I need to refresh data from a SQL 6.5 environment for QA purposes (hopefully generic solution should work for 7 & 2K). I need to select blocks of data in demand or in an automated fashion.
I would like to know the experiences of anyone who has done this.The SQL commands DUMP and RESTORE work well.

-PatP|||I don't think you can RESTORE on 7.0/2K from a dump device created on 6.5

Use a combination of BCP...OUT/BULK INSERT preceeded by either DELETE or TRUNCATE on the target.|||Minor brain fart there... In 6.5 it ought to be DUMP and LOAD. The use of BACKUP and RESTORE didn't start until 7.0.

rdjabarov raises a good point though, in that BCP could be used with all three platforms (assuming you are using the BCP that ships with SQL-2000). A bit of script for OSQL and some BCP action, and you could be in business!

-PatP

Friday, March 23, 2012

Microsoft OLE DB Provider for ODBC Drivers

I am using an system ODBC created to access data on an AS/400.
I can access the data fine, using the following query.
SELECT F0101.* FROM CRPDTA.PILGRIM.CRPDTA.F0101 as F0101
where the first CRPDTA is the DSN name, PILGRIM is the AS/400 catalog,
the second CRPDTA is the SCHEMA, and F0101 is the file name.
When I try to save this query as a view, I receive the following error.
The operation could not be performed because the OLE DB provider
'MSDASQL' was unable to begin a distributed transaction.
[OLE/DB provider returned message: [IBM][Client Access Express ODBC
Driver (32-bit)]Option type out of range.]
OLE DB error trace [OLE/DB Provider 'MSDASQL'
ITransactionJoin::JoinTransaction returned 0x8004d00a]
Can anyone help?
PMGBoy
On several occasion a bug in the ODBC driver causes all sorts of problem
in the client. Try using any third party software, such as WinSQL
(http://synametrics.com/winsql) and see if you get the same behavior.
This would eliminate the possibility of a buggy driver.
jeff.jones@.papermagic.com wrote:
> I am using an system ODBC created to access data on an AS/400.
> I can access the data fine, using the following query.
> SELECT F0101.* FROM CRPDTA.PILGRIM.CRPDTA.F0101 as F0101
> where the first CRPDTA is the DSN name, PILGRIM is the AS/400 catalog,
> the second CRPDTA is the SCHEMA, and F0101 is the file name.
> When I try to save this query as a view, I receive the following error.
> The operation could not be performed because the OLE DB provider
> 'MSDASQL' was unable to begin a distributed transaction.
> [OLE/DB provider returned message: [IBM][Client Access Express ODBC
> Driver (32-bit)]Option type out of range.]
> OLE DB error trace [OLE/DB Provider 'MSDASQL'
> ITransactionJoin::JoinTransaction returned 0x8004d00a]
> Can anyone help?
> PMGBoy
>

Microsoft OLE DB Provider for ODBC Drivers

I am using an system ODBC created to access data on an AS/400.
I can access the data fine, using the following query.
SELECT F0101.* FROM CRPDTA.PILGRIM.CRPDTA.F0101 as F0101
where the first CRPDTA is the DSN name, PILGRIM is the AS/400 catalog,
the second CRPDTA is the SCHEMA, and F0101 is the file name.
When I try to save this query as a view, I receive the following error.
The operation could not be performed because the OLE DB provider
'MSDASQL' was unable to begin a distributed transaction.
[OLE/DB provider returned message: [IBM][Client Access Express O
DBC
Driver (32-bit)]Option type out of range.]
OLE DB error trace [OLE/DB Provider 'MSDASQL'
ITransactionJoin::JoinTransaction returned 0x8004d00a]
Can anyone help?
PMGBoyOn several occasion a bug in the ODBC driver causes all sorts of problem
in the client. Try using any third party software, such as WinSQL
(http://synametrics.com/winsql) and see if you get the same behavior.
This would eliminate the possibility of a buggy driver.
jeff.jones@.papermagic.com wrote:
> I am using an system ODBC created to access data on an AS/400.
> I can access the data fine, using the following query.
> SELECT F0101.* FROM CRPDTA.PILGRIM.CRPDTA.F0101 as F0101
> where the first CRPDTA is the DSN name, PILGRIM is the AS/400 catalog,
> the second CRPDTA is the SCHEMA, and F0101 is the file name.
> When I try to save this query as a view, I receive the following error.
> The operation could not be performed because the OLE DB provider
> 'MSDASQL' was unable to begin a distributed transaction.
> [OLE/DB provider returned message: [IBM][Client Access Express
ODBC
> Driver (32-bit)]Option type out of range.]
> OLE DB error trace [OLE/DB Provider 'MSDASQL'
> ITransactionJoin::JoinTransaction returned 0x8004d00a]
> Can anyone help?
> PMGBoy
>sql

Monday, March 19, 2012

Microsoft .NET Framework: Unhandled Exception

Hi,
I built a very simple report that uses a shared data source to access
an SQL server. I wanted to select all columns from a table on a linked
server. My query is simply "select * from SERVER.DATABASE.USER.table"
and it works fine in Query Analyzer. However, when I enter this query
into the Report Designer (running SP1) and try to run it, I get the
error below.
Thanks in advance for any help you wonderful MSFT guys can give,
especially if there's a workaround!
--Adam Bliss
--TEXT OF ERROR MESSAGE--
Microsoft .NET Framework
An unhandled exception has occured in a component in your appliaction.
Click continue and application [sic] will ignore this error and attempt
to
continue.
Object reference not set to an instance of an object.
Details:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance
of an object.
at Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget.Exec(Guid&
pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, Object[] pvaIn,
IntPtr pvaOut)
at
Microsoft.ReportDesigner.Design.VDTToolBar.SQLToolBar_ButtonClick(Object
sender, ToolBarButtonClickEventArgs e)
at
System.Windows.Forms.ToolBar.OnButtonClick(ToolBarButtonClickEventArgs
e)
at System.Windows.Forms.ToolBar.WmReflectCommand(Message& m)
at System.Windows.Forms.ToolBar.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32
msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
---
Microsoft.ReportingServices.Designer
Assembly Version: 8.0.242.0
Win32 Version: 8.00.878.00
CodeBase:
file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.ReportingServices.Designer.dll
---
Microsoft.VisualStudio.Shell.Interop
Assembly Version: 7.0.3500.0
Win32 Version: 8.0.30310 (lab21.030309-2105)
CodeBase:
file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.VisualStudio.Shell.Interop.DLL
---
Microsoft.VisualStudio.OLE.Interop
Assembly Version: 7.0.3500.0
Win32 Version: 8.0.30310 (lab21.030309-2105)
CodeBase:
file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.VisualStudio.OLE.Interop.DLL
---
Microsoft.VisualStudio
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///C:/Program%20Files/Microsoft%20Visual%20Studio%20.NET%202003/Common7/IDE/Microsoft.VisualStudio.DLL
---
Microsoft.DataWarehouse.Interfaces
Assembly Version: 8.0.242.0
Win32 Version: 8.00.878.00
CodeBase:
file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.DataWarehouse.Interfaces.DLL
---
Microsoft.DataWarehouse.VsIntegration
Assembly Version: 8.0.242.0
Win32 Version: 8.00.878.00
CodeBase:
file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.DataWarehouse.VsIntegration.DLL
---
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
---
System.Xml
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
---
System.Web
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.web/1.0.5000.0__b03f5f7f11d50a3a/system.web.dll
---
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
---
Microsoft.DataWarehouse
Assembly Version: 8.0.242.0
Win32 Version: 8.00.878.00
CodeBase:
file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.DataWarehouse.DLL
---
EnvDTE
Assembly Version: 7.0.3300.0
Win32 Version: 7.00.9466
CodeBase:
file:///c:/windows/assembly/gac/envdte/7.0.3300.0__b03f5f7f11d50a3a/envdte.dll
---
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
---
Microsoft.VSDesigner
Assembly Version: 7.0.5000.0
Win32 Version: 7.10.3077
CodeBase:
file:///C:/Program%20Files/Microsoft%20Visual%20Studio%20.NET%202003/Common7/IDE/Microsoft.VSDesigner.DLL
---
Microsoft.VisualStudio.Designer.Interfaces
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///C:/Program%20Files/Microsoft%20Visual%20Studio%20.NET%202003/Common7/IDE/Microsoft.VisualStudio.Designer.Interfaces.DLL
---
RegexAssembly1_0
Assembly Version: 0.0.0.0
Win32 Version: n/a
CodeBase:
---
Microsoft.VisualStudio.TextManager.Interop
Assembly Version: 7.0.3500.0
Win32 Version: 8.0.30310 (lab21.030309-2105)
CodeBase:
file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.VisualStudio.TextManager.Interop.DLL
---
Microsoft.ReportingServices.ReportPreview
Assembly Version: 8.0.242.0
Win32 Version: 8.00.878.00
CodeBase:
file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.ReportingServices.ReportPreview.DLL
---
Microsoft.ReportingServices.Processing
Assembly Version: 8.0.242.0
Win32 Version: 8.00.878.00
CodeBase:
file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.ReportingServices.Processing.DLL
---
Microsoft.ReportingServices.Interfaces
Assembly Version: 8.0.242.0
Win32 Version: 8.00.878.00
CodeBase:
file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.ReportingServices.Interfaces.DLL
---
Microsoft.ReportingServices.Diagnostics
Assembly Version: 8.0.242.0
Win32 Version: 8.00.878.00
CodeBase:
file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.ReportingServices.Diagnostics.DLL
---
qcafn_1e
Assembly Version: 0.0.0.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
---
bz_nfjwh
Assembly Version: 0.0.0.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
---
yl9hu7fj
Assembly Version: 0.0.0.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
---
ilerz4wa
Assembly Version: 0.0.0.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
---
5jocxjac
Assembly Version: 0.0.0.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
---
jrfgwn5w
Assembly Version: 0.0.0.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
---
fxnv6itt
Assembly Version: 0.0.0.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
---
zg4sz4ni
Assembly Version: 0.0.0.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
---
ny4juciw
Assembly Version: 0.0.0.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
---
xlnic1xx
Assembly Version: 0.0.0.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
---
atmntgbj
Assembly Version: 0.0.0.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
---
imdmrqdn
Assembly Version: 0.0.0.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
---
-t4ubrdd
Assembly Version: 0.0.0.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
---
ogl20pjz
Assembly Version: 0.0.0.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
---
uzelzqkt
Assembly Version: 0.0.0.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
---
7gxa3lt5
Assembly Version: 0.0.0.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
---
zafsetv2
Assembly Version: 0.0.0.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
---
ttnoe-eu
Assembly Version: 0.0.0.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
---
zzdw1h6p
Assembly Version: 0.0.0.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
---
r9dhpvbw
Assembly Version: 0.0.0.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
---
qexy1od1
Assembly Version: 0.0.0.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
---
x5cdllnv
Assembly Version: 0.0.0.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
---
System.Design
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.design/1.0.5000.0__b03f5f7f11d50a3a/system.design.dll
---
Accessibility
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/accessibility/1.0.5000.0__b03f5f7f11d50a3a/accessibility.dll
---
Microsoft.SqlServer.WizardFramework
Assembly Version: 8.0.242.0
Win32 Version: 8.00.878.00
CodeBase:
file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.SqlServer.WizardFramework.dll
---
Microsoft.ReportingServices.Designer.Wizards
Assembly Version: 8.0.242.0
Win32 Version: 8.00.878.00
CodeBase:
file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.ReportingServices.Designer.Wizards.DLL
---
Microsoft.SqlServer.CustomControls
Assembly Version: 8.0.242.0
Win32 Version: 8.00.878.00
CodeBase:
file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.SqlServer.CustomControls.DLL
---
Microsoft.NetEnterpriseServers.ExceptionMessageBox
Assembly Version: 8.0.242.0
Win32 Version: 8.00.878.00
CodeBase:
file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.NetEnterpriseServers.ExceptionMessageBox.DLL
---
Microsoft.ReportingServices.DataExtensions
Assembly Version: 8.0.242.0
Win32 Version: 8.00.878.00
CodeBase:
file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.ReportingServices.DataExtensions.DLL
---
System.Data
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.data/1.0.5000.0__b77a5c561934e089/system.data.dll
---
System.Data.OracleClient
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.data.oracleclient/1.0.5000.0__b77a5c561934e089/system.data.oracleclient.dll
---
System.EnterpriseServices
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.enterpriseservices/1.0.5000.0__b03f5f7f11d50a3a/system.enterpriseservices.dll
---
Interop.Vdt70
Assembly Version: 8.0.242.0
Win32 Version: 8.0.242.0
CodeBase:
file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Interop.Vdt70.DLL
---
ReportingServicesLibrary
Assembly Version: 8.0.242.0
Win32 Version: 8.00.878.00
CodeBase:
file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/ReportingServicesLibrary.DLL
---
Microsoft.ReportingServices.XmlRendering
Assembly Version: 8.0.242.0
Win32 Version: 8.00.878.00
CodeBase:
file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.ReportingServices.XmlRendering.DLL
---
Microsoft.ReportingServices.CsvRendering
Assembly Version: 8.0.242.0
Win32 Version: 8.00.878.00
CodeBase:
file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.ReportingServices.CsvRendering.DLL
---
Microsoft.ReportingServices.ImageRendering
Assembly Version: 8.0.242.0
Win32 Version: 8.00.878.00
CodeBase:
file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.ReportingServices.ImageRendering.DLL
---
Microsoft.ReportingServices.HtmlRendering
Assembly Version: 8.0.242.0
Win32 Version: 8.00.878.00
CodeBase:
file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.ReportingServices.HtmlRendering.DLL
---
Microsoft.ReportingServices.ExcelRendering
Assembly Version: 8.0.242.0
Win32 Version: 8.00.878.00
CodeBase:
file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.ReportingServices.ExcelRendering.DLL
---
ReportingServicesNativeClient
Assembly Version: 0.0.0.0
Win32 Version: 2000.080.0878.000
CodeBase:
file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/ReportingServicesNativeClient.DLL
---That looks like bug.
As workaround I suggest to use Generic Query Designer
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Adam Bliss" <abliss@.gmail.com> wrote in message
news:cdjf9k$vk4@.odak26.prod.google.com...
> Hi,
> I built a very simple report that uses a shared data source to access
> an SQL server. I wanted to select all columns from a table on a linked
> server. My query is simply "select * from SERVER.DATABASE.USER.table"
> and it works fine in Query Analyzer. However, when I enter this query
> into the Report Designer (running SP1) and try to run it, I get the
> error below.
> Thanks in advance for any help you wonderful MSFT guys can give,
> especially if there's a workaround!
> --Adam Bliss
> --TEXT OF ERROR MESSAGE--
> Microsoft .NET Framework
> An unhandled exception has occured in a component in your appliaction.
> Click continue and application [sic] will ignore this error and attempt
> to
> continue.
> Object reference not set to an instance of an object.
> Details:
> See the end of this message for details on invoking
> just-in-time (JIT) debugging instead of this dialog box.
> ************** Exception Text **************
> System.NullReferenceException: Object reference not set to an instance
> of an object.
> at Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget.Exec(Guid&
> pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, Object[] pvaIn,
> IntPtr pvaOut)
> at
> Microsoft.ReportDesigner.Design.VDTToolBar.SQLToolBar_ButtonClick(Object
> sender, ToolBarButtonClickEventArgs e)
> at
> System.Windows.Forms.ToolBar.OnButtonClick(ToolBarButtonClickEventArgs
> e)
> at System.Windows.Forms.ToolBar.WmReflectCommand(Message& m)
> at System.Windows.Forms.ToolBar.WndProc(Message& m)
> at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
> at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
> at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32
> msg, IntPtr wparam, IntPtr lparam)
>
> ************** Loaded Assemblies **************
> mscorlib
> Assembly Version: 1.0.5000.0
> Win32 Version: 1.1.4322.573
> CodeBase:
> file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
> ---
> Microsoft.ReportingServices.Designer
> Assembly Version: 8.0.242.0
> Win32 Version: 8.00.878.00
> CodeBase:
> file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.ReportingServices.Designer.dll
> ---
> Microsoft.VisualStudio.Shell.Interop
> Assembly Version: 7.0.3500.0
> Win32 Version: 8.0.30310 (lab21.030309-2105)
> CodeBase:
> file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.VisualStudio.Shell.Interop.DLL
> ---
> Microsoft.VisualStudio.OLE.Interop
> Assembly Version: 7.0.3500.0
> Win32 Version: 8.0.30310 (lab21.030309-2105)
> CodeBase:
> file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.VisualStudio.OLE.Interop.DLL
> ---
> Microsoft.VisualStudio
> Assembly Version: 1.0.5000.0
> Win32 Version: 1.1.4322.573
> CodeBase:
> file:///C:/Program%20Files/Microsoft%20Visual%20Studio%20.NET%202003/Common7/IDE/Microsoft.VisualStudio.DLL
> ---
> Microsoft.DataWarehouse.Interfaces
> Assembly Version: 8.0.242.0
> Win32 Version: 8.00.878.00
> CodeBase:
> file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.DataWarehouse.Interfaces.DLL
> ---
> Microsoft.DataWarehouse.VsIntegration
> Assembly Version: 8.0.242.0
> Win32 Version: 8.00.878.00
> CodeBase:
> file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.DataWarehouse.VsIntegration.DLL
> ---
> System
> Assembly Version: 1.0.5000.0
> Win32 Version: 1.1.4322.573
> CodeBase:
> file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
> ---
> System.Xml
> Assembly Version: 1.0.5000.0
> Win32 Version: 1.1.4322.573
> CodeBase:
> file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
> ---
> System.Web
> Assembly Version: 1.0.5000.0
> Win32 Version: 1.1.4322.573
> CodeBase:
> file:///c:/windows/assembly/gac/system.web/1.0.5000.0__b03f5f7f11d50a3a/system.web.dll
> ---
> System.Drawing
> Assembly Version: 1.0.5000.0
> Win32 Version: 1.1.4322.573
> CodeBase:
> file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
> ---
> Microsoft.DataWarehouse
> Assembly Version: 8.0.242.0
> Win32 Version: 8.00.878.00
> CodeBase:
> file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.DataWarehouse.DLL
> ---
> EnvDTE
> Assembly Version: 7.0.3300.0
> Win32 Version: 7.00.9466
> CodeBase:
> file:///c:/windows/assembly/gac/envdte/7.0.3300.0__b03f5f7f11d50a3a/envdte.dll
> ---
> System.Windows.Forms
> Assembly Version: 1.0.5000.0
> Win32 Version: 1.1.4322.573
> CodeBase:
> file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
> ---
> Microsoft.VSDesigner
> Assembly Version: 7.0.5000.0
> Win32 Version: 7.10.3077
> CodeBase:
> file:///C:/Program%20Files/Microsoft%20Visual%20Studio%20.NET%202003/Common7/IDE/Microsoft.VSDesigner.DLL
> ---
> Microsoft.VisualStudio.Designer.Interfaces
> Assembly Version: 1.0.5000.0
> Win32 Version: 1.1.4322.573
> CodeBase:
> file:///C:/Program%20Files/Microsoft%20Visual%20Studio%20.NET%202003/Common7/IDE/Microsoft.VisualStudio.Designer.Interfaces.DLL
> ---
> RegexAssembly1_0
> Assembly Version: 0.0.0.0
> Win32 Version: n/a
> CodeBase:
> ---
> Microsoft.VisualStudio.TextManager.Interop
> Assembly Version: 7.0.3500.0
> Win32 Version: 8.0.30310 (lab21.030309-2105)
> CodeBase:
> file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.VisualStudio.TextManager.Interop.DLL
> ---
> Microsoft.ReportingServices.ReportPreview
> Assembly Version: 8.0.242.0
> Win32 Version: 8.00.878.00
> CodeBase:
> file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.ReportingServices.ReportPreview.DLL
> ---
> Microsoft.ReportingServices.Processing
> Assembly Version: 8.0.242.0
> Win32 Version: 8.00.878.00
> CodeBase:
> file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.ReportingServices.Processing.DLL
> ---
> Microsoft.ReportingServices.Interfaces
> Assembly Version: 8.0.242.0
> Win32 Version: 8.00.878.00
> CodeBase:
> file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.ReportingServices.Interfaces.DLL
> ---
> Microsoft.ReportingServices.Diagnostics
> Assembly Version: 8.0.242.0
> Win32 Version: 8.00.878.00
> CodeBase:
> file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.ReportingServices.Diagnostics.DLL
> ---
> qcafn_1e
> Assembly Version: 0.0.0.0
> Win32 Version: 1.1.4322.573
> CodeBase:
> file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
> ---
> bz_nfjwh
> Assembly Version: 0.0.0.0
> Win32 Version: 1.1.4322.573
> CodeBase:
> file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
> ---
> yl9hu7fj
> Assembly Version: 0.0.0.0
> Win32 Version: 1.1.4322.573
> CodeBase:
> file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
> ---
> ilerz4wa
> Assembly Version: 0.0.0.0
> Win32 Version: 1.1.4322.573
> CodeBase:
> file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
> ---
> 5jocxjac
> Assembly Version: 0.0.0.0
> Win32 Version: 1.1.4322.573
> CodeBase:
> file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
> ---
> jrfgwn5w
> Assembly Version: 0.0.0.0
> Win32 Version: 1.1.4322.573
> CodeBase:
> file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
> ---
> fxnv6itt
> Assembly Version: 0.0.0.0
> Win32 Version: 1.1.4322.573
> CodeBase:
> file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
> ---
> zg4sz4ni
> Assembly Version: 0.0.0.0
> Win32 Version: 1.1.4322.573
> CodeBase:
> file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
> ---
> ny4juciw
> Assembly Version: 0.0.0.0
> Win32 Version: 1.1.4322.573
> CodeBase:
> file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
> ---
> xlnic1xx
> Assembly Version: 0.0.0.0
> Win32 Version: 1.1.4322.573
> CodeBase:
> file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
> ---
> atmntgbj
> Assembly Version: 0.0.0.0
> Win32 Version: 1.1.4322.573
> CodeBase:
> file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
> ---
> imdmrqdn
> Assembly Version: 0.0.0.0
> Win32 Version: 1.1.4322.573
> CodeBase:
> file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
> ---
> -t4ubrdd
> Assembly Version: 0.0.0.0
> Win32 Version: 1.1.4322.573
> CodeBase:
> file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
> ---
> ogl20pjz
> Assembly Version: 0.0.0.0
> Win32 Version: 1.1.4322.573
> CodeBase:
> file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
> ---
> uzelzqkt
> Assembly Version: 0.0.0.0
> Win32 Version: 1.1.4322.573
> CodeBase:
> file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
> ---
> 7gxa3lt5
> Assembly Version: 0.0.0.0
> Win32 Version: 1.1.4322.573
> CodeBase:
> file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
> ---
> zafsetv2
> Assembly Version: 0.0.0.0
> Win32 Version: 1.1.4322.573
> CodeBase:
> file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
> ---
> ttnoe-eu
> Assembly Version: 0.0.0.0
> Win32 Version: 1.1.4322.573
> CodeBase:
> file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
> ---
> zzdw1h6p
> Assembly Version: 0.0.0.0
> Win32 Version: 1.1.4322.573
> CodeBase:
> file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
> ---
> r9dhpvbw
> Assembly Version: 0.0.0.0
> Win32 Version: 1.1.4322.573
> CodeBase:
> file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
> ---
> qexy1od1
> Assembly Version: 0.0.0.0
> Win32 Version: 1.1.4322.573
> CodeBase:
> file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
> ---
> x5cdllnv
> Assembly Version: 0.0.0.0
> Win32 Version: 1.1.4322.573
> CodeBase:
> file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
> ---
> System.Design
> Assembly Version: 1.0.5000.0
> Win32 Version: 1.1.4322.573
> CodeBase:
> file:///c:/windows/assembly/gac/system.design/1.0.5000.0__b03f5f7f11d50a3a/system.design.dll
> ---
> Accessibility
> Assembly Version: 1.0.5000.0
> Win32 Version: 1.1.4322.573
> CodeBase:
> file:///c:/windows/assembly/gac/accessibility/1.0.5000.0__b03f5f7f11d50a3a/accessibility.dll
> ---
> Microsoft.SqlServer.WizardFramework
> Assembly Version: 8.0.242.0
> Win32 Version: 8.00.878.00
> CodeBase:
> file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.SqlServer.WizardFramework.dll
> ---
> Microsoft.ReportingServices.Designer.Wizards
> Assembly Version: 8.0.242.0
> Win32 Version: 8.00.878.00
> CodeBase:
> file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.ReportingServices.Designer.Wizards.DLL
> ---
> Microsoft.SqlServer.CustomControls
> Assembly Version: 8.0.242.0
> Win32 Version: 8.00.878.00
> CodeBase:
> file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.SqlServer.CustomControls.DLL
> ---
> Microsoft.NetEnterpriseServers.ExceptionMessageBox
> Assembly Version: 8.0.242.0
> Win32 Version: 8.00.878.00
> CodeBase:
> file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.NetEnterpriseServers.ExceptionMessageBox.DLL
> ---
> Microsoft.ReportingServices.DataExtensions
> Assembly Version: 8.0.242.0
> Win32 Version: 8.00.878.00
> CodeBase:
> file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.ReportingServices.DataExtensions.DLL
> ---
> System.Data
> Assembly Version: 1.0.5000.0
> Win32 Version: 1.1.4322.573
> CodeBase:
> file:///c:/windows/assembly/gac/system.data/1.0.5000.0__b77a5c561934e089/system.data.dll
> ---
> System.Data.OracleClient
> Assembly Version: 1.0.5000.0
> Win32 Version: 1.1.4322.573
> CodeBase:
> file:///c:/windows/assembly/gac/system.data.oracleclient/1.0.5000.0__b77a5c561934e089/system.data.oracleclient.dll
> ---
> System.EnterpriseServices
> Assembly Version: 1.0.5000.0
> Win32 Version: 1.1.4322.573
> CodeBase:
> file:///c:/windows/assembly/gac/system.enterpriseservices/1.0.5000.0__b03f5f7f11d50a3a/system.enterpriseservices.dll
> ---
> Interop.Vdt70
> Assembly Version: 8.0.242.0
> Win32 Version: 8.0.242.0
> CodeBase:
> file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Interop.Vdt70.DLL
> ---
> ReportingServicesLibrary
> Assembly Version: 8.0.242.0
> Win32 Version: 8.00.878.00
> CodeBase:
> file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/ReportingServicesLibrary.DLL
> ---
> Microsoft.ReportingServices.XmlRendering
> Assembly Version: 8.0.242.0
> Win32 Version: 8.00.878.00
> CodeBase:
> file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.ReportingServices.XmlRendering.DLL
> ---
> Microsoft.ReportingServices.CsvRendering
> Assembly Version: 8.0.242.0
> Win32 Version: 8.00.878.00
> CodeBase:
> file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.ReportingServices.CsvRendering.DLL
> ---
> Microsoft.ReportingServices.ImageRendering
> Assembly Version: 8.0.242.0
> Win32 Version: 8.00.878.00
> CodeBase:
> file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.ReportingServices.ImageRendering.DLL
> ---
> Microsoft.ReportingServices.HtmlRendering
> Assembly Version: 8.0.242.0
> Win32 Version: 8.00.878.00
> CodeBase:
> file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.ReportingServices.HtmlRendering.DLL
> ---
> Microsoft.ReportingServices.ExcelRendering
> Assembly Version: 8.0.242.0
> Win32 Version: 8.00.878.00
> CodeBase:
> file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/Microsoft.ReportingServices.ExcelRendering.DLL
> ---
> ReportingServicesNativeClient
> Assembly Version: 0.0.0.0
> Win32 Version: 2000.080.0878.000
> CodeBase:
> file:///C:/Program%20Files/Microsoft%20SQL%20Server/80/Tools/Report%20Designer/ReportingServicesNativeClient.DLL
> ---
>

Monday, March 12, 2012

mgmnt studio express won't shrink .ldf files

I'm attempting to truncate/shrink a db (mdf & ldf) to be able to zip it and email it. From Object Explorer I select the db->tasks->shrink->files->filetype->log->release unused spage or reorganize->shrink file to (0mb). This action does not change the size of the .ldf file. Shrinking the mdf works just like SQL 2000 - as expected. Why don't the actions taken do what they imply for the .ldf file? If this is not what the selections mean, what do they mean?

thanks, jack

If you want the LDF to skrink to 0mb then you need to truncate the log because SQL Server in shrink mode reserves what was active log now called virtual log before releasing space to the OS. You can run DBCC Shrinkfile and see what error you get because 2005 now logs the error in the error log. Run a search for DBCC Shrinkfile and Truncate log in the BOL. Hope this helps.

|||Caddre, your response led me to information that explains the 'reality' of dealing with the logfile. In my case since I 'want' an empty db to distribute,I found that I could just detach the db, then delete the .ldf file. When I re-attach a 'new' empty log file is created. -- thanks, jack

Wednesday, March 7, 2012

Meta Database Design Select Question.

Hi,

I have a Datbase with teh following two tables.

Table 1: default_en_listingsdb
it contains the following fields
ID user_ID Title

Table2:
default_en_listingsdbelements
ID field_name field_value listing_id

listing_ID in table 2 is equal to the ID in table 1.

I am building a search for these two tables where i want to return the ID, user_ID and Title. The table data looks like this.

Table 1:
ID user_ID Title
1 1 Test
2 2 Test2

Table2:
ID field_name field_value listing_id
1 beds 2 2
2 beds 1 1
3 city kingsley 1
4 city kingsley 2

I want to return only the ID's where they contain both beds = 2 and city = kingsley.. I want to do this with on e select statement if possible.

Thanks,I hate this, what Tom Kyte calls the "funky data model". Flexible as you like, but so hard to query (and this is a very simple query!)

Also, data integrity is non-existent, because there can be no database constraint that stops you putting 2 for city or kingsley for beds...

Anyway... </RANT>

select t1.*
from table1 t1, table2 beds, table2 city
where t1.id = beds.listing_id
and beds.field_name = 'beds'
and beds.field_value = '2'
and city.field_name = 'city'
and city.field_value = 'kingsley';

Yuk!|||Thanks, I knew it was going to be ugly, i agree that this data model in some ways really sucks... ohh well off to make this work.. Thanks again|||Originally posted by greengaint
Thanks, I knew it was going to be ugly, i agree that this data model in some ways really sucks... ohh well off to make this work.. Thanks again
Everyone "invents" this data model at some point early in their database careers; well, I'm sure I did once anyway. "Hey, look! With this model we don't have to alter tables or application code ever again! The users can just define their own 'fields' whenever they like!" Then later you find that:
(a) performance sucks very badly, and
(b) you need to write SQL 17 pages long to produce the simplest report, and
(c) the data is full of nonsense like beds='4.2' and city = ' kignsley' and startdate = '31 Feb 2004'... and
(d) nobody likes this system any more

Monday, February 20, 2012

Merging two rows

Hi All,
I have question about how to do select on below table.
This table has 3column,
Col1->Account Id[Values 1, 2, 3, 4]
Col2>Code [Values 1,2,3]
Col3>Amount[Values 100,200,300,400]
Each code maps to debit, credit, balance...
I want to do a select which can return me debit, credit and balance for
all the Account in the table.
Something like
select debit, credit, balance from Tab1.
But the diffculty is each debit, credit and balance are in a different
row. How can I merge many rows into a single select statement.
Please advise me how I can do this
Thank YouTry,
select
accountid,
sum(case when code = 1 then amount else 0 end) as debit,
sum(case when code = 2 then amount else 0 end) as credit,
sum(case when code = 3 then amount else 0 end) as balance
from
group by accountid
AMB
"dhani" wrote:

> Hi All,
> I have question about how to do select on below table.
> This table has 3column,
> Col1->Account Id[Values 1, 2, 3, 4]
> Col2>Code [Values 1,2,3]
> Col3>Amount[Values 100,200,300,400]
> Each code maps to debit, credit, balance...
> I want to do a select which can return me debit, credit and balance for
> all the Account in the table.
> Something like
> select debit, credit, balance from Tab1.
> But the diffculty is each debit, credit and balance are in a different
> row. How can I merge many rows into a single select statement.
> Please advise me how I can do this
> Thank You
>|||dhani wrote:
> Hi All,
> I have question about how to do select on below table.
> This table has 3column,
> Col1->Account Id[Values 1, 2, 3, 4]
> Col2>Code [Values 1,2,3]
> Col3>Amount[Values 100,200,300,400]
> Each code maps to debit, credit, balance...
> I want to do a select which can return me debit, credit and balance
> for all the Account in the table.
> Something like
> select debit, credit, balance from Tab1.
> But the diffculty is each debit, credit and balance are in a different
> row. How can I merge many rows into a single select statement.
> Please advise me how I can do this
> Thank You
Your requirements are not clear.
Please read and comply with www.aspfaq.com/5006
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.|||The post by the user provides some information that should be able to help
him out.
Allthough I encourage the use of some 'standard' posting and
recommendations, just replying that the users requirements are not clear
and he should comply with etiquette that is not even requied by the
newsgroup doesn't make sense.
What the user wants is to pivot the table in this case.
Personally I would go for a different table design.
Dandy Weyn
[MCSE-MCSA-MCDBA-MCDST-MCT]
http://www.dandyman.net
Check my SQL Server Resource Pages at http://www.dandyman.net/sql
"Bob Barrows [MVP]" <reb01501@.NOyahoo.SPAMcom> wrote in message
news:%234faQbWuFHA.3224@.TK2MSFTNGP10.phx.gbl...
> dhani wrote:
> Your requirements are not clear.
> Please read and comply with www.aspfaq.com/5006
> Bob Barrows
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
>|||> Allthough I encourage the use of some 'standard' posting and
> recommendations, just replying that the users requirements are not clear
> and he should comply with etiquette that is not even requied by the
> newsgroup doesn't make sense.
Sure it does (and "make sense" is very subjective, isn't it? Just because
SELECT * and a 9-page stored procedure makes sense to you, doesn't mean we
all share that opinion). The requirements were not clear, so Bob asked for
further clarification, and showed the user a quite helpful link in providing
requirements in a generally accepted format here.
Nobody said it was required by the newsgroup (what is required by the
newsgroup anyway, I have no idea what you're talking about). But you'll see
this follow-up a lot, and I can only assume from you lack of visibility here
that it's just a fact of life in here that you haven't yet been exposed to
enough to understand.
21 letters. Wow.|||So you are judging my knowlegde?
I don't think we ever met and I would definetely not judge you, knowing that
you are a respected MVP.
Did you use a user defined function to count the letters in my
certification?
So why do you conclude I have a lack of visibility and what fact of life
have I not been exposed to?
Don't you think it would be better to just share knowledge in order to
provide solutions and results?
Dandy Weyn
[MCSE-MCSA-MCDBA-MCDST-MCT]
http://www.dandyman.net
Check my SQL Server Resource Pages at http://www.dandyman.net/sql
"Aaron Bertrand [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:ewD9UjXuFHA.2008@.TK2MSFTNGP10.phx.gbl...
> Sure it does (and "make sense" is very subjective, isn't it? Just because
> SELECT * and a 9-page stored procedure makes sense to you, doesn't mean we
> all share that opinion). The requirements were not clear, so Bob asked
> for further clarification, and showed the user a quite helpful link in
> providing requirements in a generally accepted format here.
> Nobody said it was required by the newsgroup (what is required by the
> newsgroup anyway, I have no idea what you're talking about). But you'll
> see this follow-up a lot, and I can only assume from you lack of
> visibility here that it's just a fact of life in here that you haven't yet
> been exposed to enough to understand.
> 21 letters. Wow.
>|||> Don't you think it would be better to just share knowledge in order to
> provide solutions and results?
Yes, and part of that knowledge is learning how to post requirements that
work well, are easily re-create-able and test-able, and are requested.
You judged Bob's post and said it didn't make sense. I disagree. Period.|||Dandy Weyn [Dandyman] wrote:
> The post by the user provides some information that should be able to
> help him out.
I'm not trying to be combative or insulting, but, if the post contained
sufficient information, then why didn't you provide a solution?
Look, Alejandro made an attempt based on his guess as to what the user
needed. It may even be the correct solution. The question is: Who knows? I
could have made a similar attempt, only to have the OP come back and say:
"no that's not what I wanted at all", in which case both my time and the
OP's were wasted.

> Allthough I encourage the use of some 'standard' posting and
> recommendations, just replying that the users requirements are not
> clear and he should comply
Well, maybe "comply" was a poor choice of words: I meant "follow the
recommendations made" but I was a little strapped for time and was trying to
be concise.

> with etiquette that is not even requied by
I think if you use google, you will fiind that a large percentage of posts
to this group, as well as the comp.databases.ms-sqlserver group, receive a
similar initial request to provide DDL and sample data. This is usenet,
there is no way to "require" etiquette. That does not mean we should not
make an effort to help posters get help as efficiently as possible by
showing them the best way to provide the information needed to solve their
problems. Aaron's article does a good job of that. He put it in his
"ettiquette" section, but that does not mean this has anything to do with
"ettiquette".

> the newsgroup doesn't make sense.
Why not? What else should I do when the post contains insufficient
information to provide a solution? Waste my time and the OP's by making a
guess? Ignore the message (how does that help the OP)?
> What the user wants is to pivot the table in this case.
Maybe. In fact, I will even go so far as to say "probably". But, does he
need a dynamic pivot? Or does he have static values on which to base a
non-dynamic pivot?

> Personally I would go for a different table design.
Really? Based on what? You know very little about the OP's requirements ...
And why don't you think a vague statement about a "different table design"
is as bad as a request for clarification?
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.