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

Tuesday, March 20, 2012

BUG: Severe error occurred on the current command...

select top 10 count(*) peerTotal, B.peerCountryCode, B.peerCountry,
(select top 1 peerCity from Peers where peerCity != 'Determining' AND peerCountry != 'NULL' and peerCountryCode = B.peerCountryCode group by peerCity order by count(peerCity) desc) peerTopCity
from Peers B where peerCountryCode != 'NULL' and peerCountry != 'NULL' group by peerCountryCode, peerCountry order by peerTotal desc

This causes the error

but if you take the order by at teh end out, it works. The table is partitioned acrosss 3 bladesBy the way, I am using SP2 CTP|||Source,Severity,Message
01/09/2007 09:06:09,Server,Unknown,A user request from the session with SPID 59 generated a fatal exception. SQL Server is terminating this session. Contact Product Support Services with the dump produced in the log directory.
01/09/2007 09:06:09,Server,Unknown,Error: 17310<c/> Severity: 20<c/> State: 1.
01/09/2007 09:06:09,spid59,Unknown,External dump process return code 0x20000001.<nl/>External dump process returned no errors.
01/09/2007 09:06:09,spid59,Unknown,Stack Signature for the dump is 0x0684EA45
01/09/2007 09:06:09,spid59,Unknown,78132A36 Module(MSVCR80+00002A36)
01/09/2007 09:06:09,spid59,Unknown,781329AA Module(MSVCR80+000029AA)
01/09/2007 09:06:09,spid59,Unknown,0126872D Module(sqlservr+0026872D)
01/09/2007 09:06:09,spid59,Unknown,01268590 Module(sqlservr+00268590)
01/09/2007 09:06:09,spid59,Unknown,01268AE0 Module(sqlservr+00268AE0)
01/09/2007 09:06:09,spid59,Unknown,01267AEF Module(sqlservr+00267AEF)
01/09/2007 09:06:09,spid59,Unknown,0100B1D5 Module(sqlservr+0000B1D5)
01/09/2007 09:06:09,spid59,Unknown,0100B4C5 Module(sqlservr+0000B4C5)
01/09/2007 09:06:09,spid59,Unknown,0100B39F Module(sqlservr+0000B39F)
01/09/2007 09:06:09,spid59,Unknown,0102F3DB Module(sqlservr+0002F3DB)
01/09/2007 09:06:09,spid59,Unknown,01030CC2 Module(sqlservr+00030CC2)
01/09/2007 09:06:09,spid59,Unknown,0102CDE6 Module(sqlservr+0002CDE6)
01/09/2007 09:06:09,spid59,Unknown,012DC2DD Module(sqlservr+002DC2DD)
01/09/2007 09:06:09,spid59,Unknown,013ADAA5 Module(sqlservr+003ADAA5)
01/09/2007 09:06:09,spid59,Unknown,012DB9B7 Module(sqlservr+002DB9B7)
01/09/2007 09:06:09,spid59,Unknown,012DC028 Module(sqlservr+002DC028)
01/09/2007 09:06:09,spid59,Unknown,012DD905 Module(sqlservr+002DD905)
01/09/2007 09:06:09,spid59,Unknown,012DD7A0 Module(sqlservr+002DD7A0)
01/09/2007 09:06:09,spid59,Unknown,012DCEA7 Module(sqlservr+002DCEA7)
01/09/2007 09:06:09,spid59,Unknown,012DDBA3 Module(sqlservr+002DDBA3)
01/09/2007 09:06:09,spid59,Unknown,012E13A8 Module(sqlservr+002E13A8)
01/09/2007 09:06:09,spid59,Unknown,013C92D9 Module(sqlservr+003C92D9)
01/09/2007 09:06:09,spid59,Unknown,013C8AE9 Module(sqlservr+003C8AE9)
01/09/2007 09:06:09,spid59,Unknown,01415594 Module(sqlservr+00415594)
01/09/2007 09:06:09,spid59,Unknown,013C8AE9 Module(sqlservr+003C8AE9)
01/09/2007 09:06:09,spid59,Unknown,01454E39 Module(sqlservr+00454E39)
01/09/2007 09:06:09,spid59,Unknown,013C8AE9 Module(sqlservr+003C8AE9)
01/09/2007 09:06:09,spid59,Unknown,0141A804 Module(sqlservr+0041A804)
01/09/2007 09:06:09,spid59,Unknown,013C8AE9 Module(sqlservr+003C8AE9)
01/09/2007 09:06:09,spid59,Unknown,01418E23 Module(sqlservr+00418E23)
01/09/2007 09:06:09,spid59,Unknown,013C9B43 Module(sqlservr+003C9B43)
01/09/2007 09:06:09,spid59,Unknown,013C8AE9 Module(sqlservr+003C8AE9)
01/09/2007 09:06:09,spid59,Unknown,0141B6BE Module(sqlservr+0041B6BE)
01/09/2007 09:06:09,spid59,Unknown,013C8AE9 Module(sqlservr+003C8AE9)
01/09/2007 09:06:09,spid59,Unknown,01415594 Module(sqlservr+00415594)
01/09/2007 09:06:09,spid59,Unknown,013C8AE9 Module(sqlservr+003C8AE9)
01/09/2007 09:06:09,spid59,Unknown,01415E6E Module(sqlservr+00415E6E)
01/09/2007 09:06:09,spid59,Unknown,013C9B43 Module(sqlservr+003C9B43)
01/09/2007 09:06:09,spid59,Unknown,013C8AE9 Module(sqlservr+003C8AE9)
01/09/2007 09:06:09,spid59,Unknown,01EBFF7D Module(sqlservr+00EBFF7D)
01/09/2007 09:06:09,spid59,Unknown,0151F41F Module(sqlservr+0051F41F)
01/09/2007 09:06:09,spid59,Unknown,013B6A49 Module(sqlservr+003B6A49)
01/09/2007 09:06:09,spid59,Unknown,013B6891 Module(sqlservr+003B6891)
01/09/2007 09:06:09,spid59,Unknown,* Short Stack Dump
01/09/2007 09:06:09,spid59,Unknown,* -
01/09/2007 09:06:09,spid59,Unknown,* *******************************************************************************
01/09/2007 09:06:09,spid59,Unknown,* SegSs: 00000023:
01/09/2007 09:06:09,spid59,Unknown,* Esp: 63CCB9FC: 63CC1102 21E257A8 21E7D930 21C9E3E8 63CCBA40 02490881
01/09/2007 09:06:09,spid59,Unknown,* EFlags: 00010246: 006F0064 00730077 004E005F 00000054 00610050 00680074
01/09/2007 09:06:09,spid59,Unknown,* SegCs: 0000001B:
01/09/2007 09:06:09,spid59,Unknown,* Ebp: 63CCBA18: 63CCBA4C 013B6A49 21E7D930 00000000 21E257A8 63CC1156
01/09/2007 09:06:09,spid59,Unknown,* Eip: 013B6891: 5BD9A5F3 3843893C C7404389 FFFFFC45 C38BFFFF 64F44D8B
01/09/2007 09:06:09,spid59,Unknown,* Edx: 00000000:
01/09/2007 09:06:09,spid59,Unknown,* Ecx: 00000008:
01/09/2007 09:06:09,spid59,Unknown,* Ebx: 21E7D930: 013B68C0 00000000 0000006D 21E257A8 00000000 00000000
01/09/2007 09:06:09,spid59,Unknown,* Eax: 00000000:
01/09/2007 09:06:09,spid59,Unknown,* Esi: 00000000:
01/09/2007 09:06:09,spid59,Unknown,* Edi: 21E7D948: 00000000 00000000 00000000 00000000 00000000 00000000
01/09/2007 09:06:09,spid59,Unknown,*
01/09/2007 09:06:09,spid59,Unknown,* dbghelp 64330000 64444FFF 00115000
01/09/2007 09:06:09,spid59,Unknown,* xplog70 63B30000 63B32FFF 00003000
01/09/2007 09:06:09,spid59,Unknown,* xplog70 63B10000 63B1BFFF 0000c000
01/09/2007 09:06:09,spid59,Unknown,* xpstar90 63AE0000 63B05FFF 00026000
01/09/2007 09:06:09,spid59,Unknown,* odbcint 63AC0000 63AD6FFF 00017000
01/09/2007 09:06:09,spid59,Unknown,* ATL80 7C630000 7C64AFFF 0001b000
01/09/2007 09:06:09,spid59,Unknown,* BatchParser90 63990000 639AEFFF 0001f000
01/09/2007 09:06:09,spid59,Unknown,* ODBC32 63950000 6398CFFF 0003d000
01/09/2007 09:06:09,spid59,Unknown,* SQLSCM90 63930000 63938FFF 00009000
01/09/2007 09:06:09,spid59,Unknown,* xpstar90 638D0000 63918FFF 00049000
01/09/2007 09:06:09,spid59,Unknown,* xpsqlbot 638B0000 638B5FFF 00006000
01/09/2007 09:06:09,spid59,Unknown,* msftepxy 633C0000 633D4FFF 00015000
01/09/2007 09:06:09,spid59,Unknown,* SQLNCLIR 00770000 007A2FFF 00033000
01/09/2007 09:06:09,spid59,Unknown,* comdlg32 762B0000 762F9FFF 0004a000
01/09/2007 09:06:09,spid59,Unknown,* COMCTL32 77530000 775C6FFF 00097000
01/09/2007 09:06:09,spid59,Unknown,* sqlncli 63010000 63233FFF 00224000
01/09/2007 09:06:09,spid59,Unknown,* CLBCatQ 777B0000 77832FFF 00083000
01/09/2007 09:06:09,spid59,Unknown,* xpsp2res 62D40000 63004FFF 002c5000
01/09/2007 09:06:09,spid59,Unknown,* ntdsapi 766F0000 76704FFF 00015000
01/09/2007 09:06:09,spid59,Unknown,* SAMLIB 62D30000 62D3EFFF 0000f000
01/09/2007 09:06:09,spid59,Unknown,* NTMARTA 77E00000 77E21FFF 00022000
01/09/2007 09:06:09,spid59,Unknown,* wshtcpip 71AE0000 71AE7FFF 00008000
01/09/2007 09:06:09,spid59,Unknown,* hnetcfg 62CD0000 62D28FFF 00059000
01/09/2007 09:06:09,spid59,Unknown,* dssenh 68100000 68123FFF 00024000
01/09/2007 09:06:09,spid59,Unknown,* imagehlp 76C10000 76C38FFF 00029000
01/09/2007 09:06:09,spid59,Unknown,* WINTRUST 76BB0000 76BDAFFF 0002b000
01/09/2007 09:06:09,spid59,Unknown,* dbghelp 62950000 62A64FFF 00115000
01/09/2007 09:06:09,spid59,Unknown,* msfte 626F0000 62948FFF 00259000
01/09/2007 09:06:09,spid59,Unknown,* security 61F50000 61F53FFF 00004000
01/09/2007 09:06:09,spid59,Unknown,* rasadhlp 76F80000 76F84FFF 00005000
01/09/2007 09:06:09,spid59,Unknown,* WLDAP32 76F10000 76F3DFFF 0002e000
01/09/2007 09:06:09,spid59,Unknown,* winrnr 76F70000 76F76FFF 00007000
01/09/2007 09:06:09,spid59,Unknown,* DNSAPI 76ED0000 76EF8FFF 00029000
01/09/2007 09:06:09,spid59,Unknown,* RESUTILS 344B0000 344C2FFF 00013000
01/09/2007 09:06:09,spid59,Unknown,* CLUSAPI 34490000 344A1FFF 00012000
01/09/2007 09:06:09,spid59,Unknown,* OLEAUT32 77D00000 77D8BFFF 0008c000
01/09/2007 09:06:09,spid59,Unknown,* WSOCK32 71BB0000 71BB8FFF 00009000
01/09/2007 09:06:09,spid59,Unknown,* VERSION 77B90000 77B97FFF 00008000
01/09/2007 09:06:09,spid59,Unknown,* MTXCLU 34470000 34488FFF 00019000
01/09/2007 09:06:09,spid59,Unknown,* msvcp60 780C0000 78120FFF 00061000
01/09/2007 09:06:09,spid59,Unknown,* MSDTCPRX 343F0000 34467FFF 00078000
01/09/2007 09:06:09,spid59,Unknown,* XOLEHLP 343E0000 343E5FFF 00006000
01/09/2007 09:06:09,spid59,Unknown,* COMRES 77010000 770D5FFF 000c6000
01/09/2007 09:06:09,spid59,Unknown,* schannel 76750000 76776FFF 00027000
01/09/2007 09:06:09,spid59,Unknown,* cryptdll 766E0000 766EBFFF 0000c000
01/09/2007 09:06:09,spid59,Unknown,* kerberos 34320000 34377FFF 00058000
01/09/2007 09:06:09,spid59,Unknown,* iphlpapi 76CF0000 76D09FFF 0001a000
01/09/2007 09:06:09,spid59,Unknown,* msv1_0 76C90000 76CB6FFF 00027000
01/09/2007 09:06:09,spid59,Unknown,* ole32 77670000 777A3FFF 00134000
01/09/2007 09:06:09,spid59,Unknown,* MSCOREE 340C0000 34104FFF 00045000
01/09/2007 09:06:09,spid59,Unknown,* AUTHZ 76C40000 76C53FFF 00014000
01/09/2007 09:06:09,spid59,Unknown,* rsaenh 68000000 6802EFFF 0002f000
01/09/2007 09:06:09,spid59,Unknown,* SQLOS 344D0000 344D4FFF 00005000
01/09/2007 09:06:09,spid59,Unknown,* sqlevn70 4F610000 4F7B8FFF 001a9000
01/09/2007 09:06:09,spid59,Unknown,* instapi 48060000 48069FFF 0000a000
01/09/2007 09:06:09,spid59,Unknown,* psapi 76B70000 76B7AFFF 0000b000
01/09/2007 09:06:09,spid59,Unknown,* comctl32 77420000 77522FFF 00103000
01/09/2007 09:06:09,spid59,Unknown,* SHLWAPI 77DA0000 77DF1FFF 00052000
01/09/2007 09:06:09,spid59,Unknown,* SHELL32 7C8D0000 7D0D2FFF 00803000
01/09/2007 09:06:09,spid59,Unknown,* NETAPI32 71C40000 71C97FFF 00058000
01/09/2007 09:06:09,spid59,Unknown,* opends60 333E0000 333E6FFF 00007000
01/09/2007 09:06:09,spid59,Unknown,* USERENV 76920000 769E3FFF 000c4000
01/09/2007 09:06:09,spid59,Unknown,* WS2HELP 71BF0000 71BF7FFF 00008000
01/09/2007 09:06:09,spid59,Unknown,* WS2_32 71C00000 71C16FFF 00017000
01/09/2007 09:06:09,spid59,Unknown,* MSWSOCK 71B20000 71B60FFF 00041000
01/09/2007 09:06:09,spid59,Unknown,* Secur32 76F50000 76F62FFF 00013000
01/09/2007 09:06:09,spid59,Unknown,* MSASN1 76190000 761A1FFF 00012000
01/09/2007 09:06:09,spid59,Unknown,* CRYPT32 761B0000 76242FFF 00093000
01/09/2007 09:06:09,spid59,Unknown,* GDI32 77C00000 77C47FFF 00048000
01/09/2007 09:06:09,spid59,Unknown,* USER32 77380000 77411FFF 00092000
01/09/2007 09:06:09,spid59,Unknown,* RPCRT4 77C50000 77CEEFFF 0009f000
01/09/2007 09:06:09,spid59,Unknown,* ADVAPI32 77F50000 77FEBFFF 0009c000
01/09/2007 09:06:09,spid59,Unknown,* MSVCP80 7C420000 7C4A6FFF 00087000
01/09/2007 09:06:09,spid59,Unknown,* msvcrt 77BA0000 77BF9FFF 0005a000
01/09/2007 09:06:09,spid59,Unknown,* MSVCR80 78130000 781CAFFF 0009b000
01/09/2007 09:06:09,spid59,Unknown,* kernel32 77E40000 77F41FFF 00102000
01/09/2007 09:06:09,spid59,Unknown,* ntdll 7C800000 7C8BFFFF 000c0000
01/09/2007 09:06:09,spid59,Unknown,* sqlservr 01000000 02C09FFF 01c0a000
01/09/2007 09:06:09,spid59,Unknown,* MODULE BASE END SIZE
01/09/2007 09:06:09,spid59,Unknown,*
01/09/2007 09:06:09,spid59,Unknown,*
01/09/2007 09:06:09,spid59,Unknown,* ry order by peerTotal desc
01/09/2007 09:06:09,spid59,Unknown,* != 'NULL' and peerCountry != 'NULL' group by peerCountryCode<c/> peerCount
01/09/2007 09:06:09,spid59,Unknown,* y) desc) peerTopCity from divinityTorrentPeers B where peerCountryCode
01/09/2007 09:06:09,spid59,Unknown,* CountryCode = B.peerCountryCode group by peerCity order by count(peerCit
01/09/2007 09:06:09,spid59,Unknown,* Peers where peerCity != 'Determining' AND peerCountry != 'NULL' and peer
01/09/2007 09:06:09,spid59,Unknown,* ountryCode<c/> B.peerCountry<c/> (select top 1 peerCity from Torrent
01/09/2007 09:06:09,spid59,Unknown,* SET XACT_ABORT ON; select top 10 count(*) peerTotal<c/> B.peerC
01/09/2007 09:06:09,spid59,Unknown,* Input Buffer 510 bytes -
01/09/2007 09:06:09,spid59,Unknown,* Access Violation occurred reading address 00000000
01/09/2007 09:06:09,spid59,Unknown,* Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION
01/09/2007 09:06:09,spid59,Unknown,* Exception Address = 013B6891 Module(sqlservr+003B6891)
01/09/2007 09:06:09,spid59,Unknown,*
01/09/2007 09:06:09,spid59,Unknown,*
01/09/2007 09:06:09,spid59,Unknown,* Private server build.
01/09/2007 09:06:09,spid59,Unknown,* 01/09/07 09:06:09 spid 59
01/09/2007 09:06:09,spid59,Unknown,* BEGIN STACK DUMP:
01/09/2007 09:06:09,spid59,Unknown,*
01/09/2007 09:06:09,spid59,Unknown,* *******************************************************************************|||Hmm.. I am also getting this error, even after installing the new Sp2 CTP patch.... this is bad that no one has even responded to this yet..

Sunday, March 11, 2012

Bug in SSIS?

I am trying to convert a string to a specific date format by using a simple select like this:

SELECT CONVERT(VARCHAR(3), CONVERT(DATETIME, ?, 103),107)

First of all the Parameter ? is not recognized and when i run the Preview it would trought the following error even if i change the ? with '20050101' for example:

===================================

There was an error displaying the preview. (Microsoft Visual Studio)

===================================

Undefined function 'CONVERT' in expression. (Microsoft JET Database Engine)


Program Location:

at Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.Connections.SQLTaskConnectionOleDbClass.ExecuteStatement(Int32 resultType, Boolean isStoredProc, UInt32 dwTimeOut)
at Microsoft.DataTransformationServices.Design.PipelineUtils.ShowDataPreview(String sqlStatement, ConnectionManager connectionManager, Control parentWindow, IServiceProvider serviceProvider, IDTSExternalMetadataColumnCollection90 externalColumns)
at Microsoft.DataTransformationServices.DataFlowUI.DataFlowConnectionPage.previewButton_Click(Object sender, EventArgs e)

Anyone experiencing this kind of problem? Solutions?

Best Regards,

Luis Sim?es

Well the error clearly indicates that Jet doesn't support the function so this would not be an SSIS bug. Have you attempted to look at the Jet docs to see if it supports convert. The last time I used jet it did not.

Thanks,

Matt

|||

Yes you are right.

I have figured it out pretty quickly and i tried to delete this post without success sorry...

It was my mistake! Not really looking into it :P

But thanks :)

Best Regards,

PS: Merry Christmas to All of YOU!

BUG in SQL SERVER 2000 ?

I have an Access database that retrieves view definitions from an SQL server
database. I use this statement to get the view definitions :
select TABLE_NAME as VIEW_NAME,VIEW_DEFINITION
from INFORMATION_SCHEMA.VIEWS
I have a view thet is more then 4000 characters and then the call against
INFORMATION_SCHEMA returns NULL for the VIEW_DEFINITION. Why ?
If i query the syscomments table the view is splitted in two columns.
Regards
Robert Vabo
Senior developer
Gecko Informasjonssystemer AS
rv_nospam@.gecko.no
Remove the _nospam to send mail !
www.gecko.noDo you mean rows or columns in the syscomments table'
--
HTH,
SriSamp
Please reply to the whole group only!
http://www32.brinkster.com/srisamp
"Robert Vabo" <rvabo@.msn.com> wrote in message
news:%23jK0CCh8DHA.2116@.TK2MSFTNGP10.phx.gbl...
> I have an Access database that retrieves view definitions from an SQL
server
> database. I use this statement to get the view definitions :
> select TABLE_NAME as VIEW_NAME,VIEW_DEFINITION
> from INFORMATION_SCHEMA.VIEWS
> I have a view thet is more then 4000 characters and then the call against
> INFORMATION_SCHEMA returns NULL for the VIEW_DEFINITION. Why ?
> If i query the syscomments table the view is splitted in two columns.
>
> --
> Regards
> Robert Vabo
> Senior developer
> Gecko Informasjonssystemer AS
> rv_nospam@.gecko.no
> Remove the _nospam to send mail !
> www.gecko.no
>|||Sorry. I mean rows ofcourse.
But the problem is that the column VIEW_DEFINITION returns NULL when
querying the INFORMATION_SCHEMA
Regards
Robert Vabo
Senior developer
Gecko Informasjonssystemer AS
rv_nospam@.gecko.no
Remove the _nospam to send mail !
www.gecko.no
"SriSamp" <ssampath@.sct.co.in> skrev i melding
news:%23YBXKkh8DHA.452@.TK2MSFTNGP11.phx.gbl...
> Do you mean rows or columns in the syscomments table'
> --
> HTH,
> SriSamp
> Please reply to the whole group only!
> http://www32.brinkster.com/srisamp
> "Robert Vabo" <rvabo@.msn.com> wrote in message
> news:%23jK0CCh8DHA.2116@.TK2MSFTNGP10.phx.gbl...
> server
against
>

BUG in SQL SERVER 2000 ?

I have an Access database that retrieves view definitions from an SQL server
database. I use this statement to get the view definitions :
select TABLE_NAME as VIEW_NAME,VIEW_DEFINITION
from INFORMATION_SCHEMA.VIEWS
I have a view thet is more then 4000 characters and then the call against
INFORMATION_SCHEMA returns NULL for the VIEW_DEFINITION. Why ?
If i query the syscomments table the view is splitted in two columns.
--
Regards
Robert Vabo
Senior developer
Gecko Informasjonssystemer AS
rv_nospam@.gecko.no
Remove the _nospam to send mail !
www.gecko.noDo you mean rows or columns in the syscomments table'
--
HTH,
SriSamp
Please reply to the whole group only!
http://www32.brinkster.com/srisamp
"Robert Vabo" <rvabo@.msn.com> wrote in message
news:%23jK0CCh8DHA.2116@.TK2MSFTNGP10.phx.gbl...
> I have an Access database that retrieves view definitions from an SQL
server
> database. I use this statement to get the view definitions :
> select TABLE_NAME as VIEW_NAME,VIEW_DEFINITION
> from INFORMATION_SCHEMA.VIEWS
> I have a view thet is more then 4000 characters and then the call against
> INFORMATION_SCHEMA returns NULL for the VIEW_DEFINITION. Why ?
> If i query the syscomments table the view is splitted in two columns.
>
> --
> Regards
> Robert Vabo
> Senior developer
> Gecko Informasjonssystemer AS
> rv_nospam@.gecko.no
> Remove the _nospam to send mail !
> www.gecko.no
>|||Sorry. I mean rows ofcourse.
But the problem is that the column VIEW_DEFINITION returns NULL when
querying the INFORMATION_SCHEMA
--
Regards
Robert Vabo
Senior developer
Gecko Informasjonssystemer AS
rv_nospam@.gecko.no
Remove the _nospam to send mail !
www.gecko.no
"SriSamp" <ssampath@.sct.co.in> skrev i melding
news:%23YBXKkh8DHA.452@.TK2MSFTNGP11.phx.gbl...
> Do you mean rows or columns in the syscomments table'
> --
> HTH,
> SriSamp
> Please reply to the whole group only!
> http://www32.brinkster.com/srisamp
> "Robert Vabo" <rvabo@.msn.com> wrote in message
> news:%23jK0CCh8DHA.2116@.TK2MSFTNGP10.phx.gbl...
> > I have an Access database that retrieves view definitions from an SQL
> server
> > database. I use this statement to get the view definitions :
> > select TABLE_NAME as VIEW_NAME,VIEW_DEFINITION
> > from INFORMATION_SCHEMA.VIEWS
> >
> > I have a view thet is more then 4000 characters and then the call
against
> > INFORMATION_SCHEMA returns NULL for the VIEW_DEFINITION. Why ?
> > If i query the syscomments table the view is splitted in two columns.
> >
> >
> > --
> > Regards
> > Robert Vabo
> > Senior developer
> > Gecko Informasjonssystemer AS
> > rv_nospam@.gecko.no
> > Remove the _nospam to send mail !
> > www.gecko.no
> >
> >
>

Bug in SELECT TOP (100) PERCENT with ORDER BY in SQLExpress?

I have a problem with the following query in SQLExpress:

SELECT TOP (100) PERCENT ClientSurname, ClientName
FROM dbo.Client
ORDER BY ClientSurname, ClientName

The query returns always assorted data ignoring the ORDER BY keyword, no matter if the query is invoked directly from Management Studio Express CTP as a View, Table-valued function or called from an Access ADP project. The result is always assorted.

Now an interesting thing is that the syntax below returns always an expected order:

SELECT TOP (99) PERCENT
SELECT TOP 10000

Am I missing something or is it a bug in SQLExpress?I never use the brackets (parenthesis) around the percentage. Maybe your second example is just using the top 10000 (not the 99%) and sorting your recs as you expect.

Keeping in mind that I know nothing of this SQLExpress :)|||TOP is a function, not a predicate as it used to be in 2K.

Thursday, March 8, 2012

Bug in SELECT IN SELECT?

Hello,

we had a performance issue with our application. The application executed a lot of SELECT IN SELECT-Statements.

Because SQL-Server was at 100% the whole time we started the profiler and had a look. A single one of these SELECT IN SELECT-Statements had a duration from 4 to 6 seconds. That looked strange, so we tried it without our application. Executing the SELECT IN SELECT-Statement directly: 4-6 seconds. Very strange about this is, that the second SELECT (the one after IN) returned only one or two items. So we splitted it: Executed the second SELECT first. Then executed the first statement with manually changed IN-clause. Both selects didn't need any noticable time. So, back in our application we did the same. The result was that the process that took about 70 minutes with the SELECT IN SELECT run through in under 3 minutes with result = SELECT; SELECT in result.

Pretty strange, hu?

Is this a known bug? Is this a bug at all?

the query plan might give some clues to the bad performance. also, you might consider converting your IN() query into an Inner join.

Bug in ISNUMERIC ?

strange thing I just ran into, not sure if this is a bug or what ... but pretty annoying.
In MS SQLServer 2000 :

SELECT (ISNUMERIC('0E010101'))

returns "1"

but

SELECT CAST ('0E010101' AS numeric)

returns "Error converting data type varchar to numeric"

any idea?ISNUMERIC tests whether a value can be converted to a number of any type.

CAST ('0E010101' AS numeric) attempts to specifically convert the string to the SQL NUMERIC data type.|||I think he was addressing the fact that there was an 'E' in the numeric string.

Hypothesis:
the E is recognized as the exponent value from a float.
so it includes it.

I dont know but it sounds good to me.|||No, same happens with D.
I thought it could be Hexadecimal, but it doesn't seem to work with ABCFGH
?

Originally posted by Ruprect
Hypothesis:
the E is recognized as the exponent value from a float.
so it includes it.

Could Be|||Originally posted by Ruprect
I think he was addressing the fact that there was an 'E' in the numeric string.

Hypothesis:
the E is recognized as the exponent value from a float.
so it includes it.

I dont know but it sounds good to me.

I tried the following statement and it gives a 0 so i am going with my Hypothesis
SELECT (ISNUMERIC('0A010101'))|||try SELECT (ISNUMERIC('0D010101'))

Originally posted by Ruprect
I tried the following statement and it gives a 0 so i am going with my Hypothesis
SELECT (ISNUMERIC('0A010101'))|||The strange thing is that SELECT (ISNUMERIC('0DE010101')) returns 0
but
SELECT (ISNUMERIC('0D010101'))
or
SELECT (ISNUMERIC('0E010101'))
return 1

Originally posted by Tontxu
try SELECT (ISNUMERIC('0D010101'))|||Books Online ISNUMERIC
ISNUMERIC returns 1 when the input expression evaluates to a valid integer, floating point number, money or decimal type; otherwise it returns 0. A return value of 1 guarantees that expression can be converted to one of these numeric types.

i even tried different combiantions and added an e to the end it appears that it's reading the values with on char in the second position
no i need to create a script that trys a brute force on every combination

nahhh|||I don't know much about number but I think Ruprect is right on this one...

I don't know what that D stands for either,.. but apparently it stands for something...|||i retracted my d statement
i thought that it could have been indicative of some type of money
danish kroners or whatever they buy their crap with.|||the only thing I know is that it's not only the second position as my initial problem was with
SELECT (ISNUMERIC('0102D121'))

my problem was :

DECLARE @.Temp nvachar(25)

SELECT @.Temp = '0000D121'
SELECT
CASE
WHEN ISNUMERIC (@.Temp) THEN CONVERT(nvarchar(20),convert(numeric,@.Temp))
ELSE @.Temp
END

the problem is that @.Temp is gonna be a colum from a table so I can predict the values and I'm trying to remove the leading '0'

Originally posted by rokslide
I don't know much about number but I think Ruprect is right on this one...

I don't know what that D stands for either,.. but apparently it stands for something...|||there is a bug with converting to numeric.

try:

select convert(float,1.7256e+06)
select convert(float,'1.7256e+06')
select convert(numeric(38,19),1.7256e+06)
select convert(numeric(38,19),'1.7256e+06')

in query analyzer...

Bill|||Originally posted by rokslide
I don't know much about number but I think Ruprect is right on this one...

I don't know what that D stands for either,.. but apparently it stands for something... Great zot! No old C programmers around anymore, or what ?!?!

E is the exponent introducer for real (float*4, 7 digit precision) values. D is the introducer for double (float*8, 53 digit precision) values. M is a suffix for (packed) decimal, and even IsNumeric() fails to process M correctly.

-PatP|||A history lesson!

Do old C programmers ever die? Or does their legacy go on?|||Damn...learned something new again...|||I Win!!!!

and i guessed

we are the champions! We Are the champions!Playing in the background|||Now that you have won, Ruprect, you can keep your prize and walk away, or you can swap your prize for what is in thread number 3. ;-)|||Hold on! I demand a recount.|||winning is more than actually doing something.. it's making everyone believe that you did something and first no less.

and welll keep on fighting til the end... ba bummmm:o
we are the champions :o
we are the champions :o
:o
of the world......:o

sorry. it must be all the cough syrup i had at lunch today...

:p

bug in exception handling (begin try... begin catch...)?

begin try
-- insert ...
select * from nonexistingtableorfunction;
end try
begin catch
print 'catch me if you can'; -- line will not be printed
end catch;
begin try
exec doNotExitingprocedure;
end try
begin catch
print 'this line is printed :-)';
end catch;
Why this different behaviour?
If you wrap 1. example in anthother proc with exception handling
(begin try... begin catch...),
the wrapping proc will catch the error.
The above behaviour is not what I would expect compared with other
languages such as Java, C#, PL/SQL...
Greetings
B. D. JensenI think this is one of numerous reasons I have noticed a distinct lack of
uptake on the new TRY mechanism. Until it really does catch errors I won't
use it, nor advise my clients to.
"B D Jensen" <bjorn.d.jensen@.gmail.com> wrote in message
news:1191585968.457460.319780@.o80g2000hse.googlegroups.com...
> begin try
> -- insert ...
> select * from nonexistingtableorfunction;
> end try
> begin catch
> print 'catch me if you can'; -- line will not be printed
> end catch;
>
> begin try
> exec doNotExitingprocedure;
> end try
> begin catch
> print 'this line is printed :-)';
> end catch;
>
> Why this different behaviour?
> If you wrap 1. example in anthother proc with exception handling
> (begin try... begin catch...),
> the wrapping proc will catch the error.
>
> The above behaviour is not what I would expect compared with other
> languages such as Java, C#, PL/SQL...
> Greetings
> B. D. Jensen
>|||B D,
I believe that what is happening here is that in your first example, the
batch is failing with a syntax error:
Msg 208, Level 16, State 1, Line 1
Invalid object name 'nonexistingtableorfunction'.
This means that it failed at compile time and never executed. Since it
never executed, the try / catch had no chance to do anything.
In your second example, the called routine got the same error as above and
never executed.
However, in this case the calling routine is running just fine and the try /
catch sees that the called routine got an error.
At least, that is what it looks like to me.
RLF
"B D Jensen" <bjorn.d.jensen@.gmail.com> wrote in message
news:1191585968.457460.319780@.o80g2000hse.googlegroups.com...
> begin try
> -- insert ...
> select * from nonexistingtableorfunction;
> end try
> begin catch
> print 'catch me if you can'; -- line will not be printed
> end catch;
>
> begin try
> exec doNotExitingprocedure;
> end try
> begin catch
> print 'this line is printed :-)';
> end catch;
>
> Why this different behaviour?
> If you wrap 1. example in anthother proc with exception handling
> (begin try... begin catch...),
> the wrapping proc will catch the error.
>
> The above behaviour is not what I would expect compared with other
> languages such as Java, C#, PL/SQL...
> Greetings
> B. D. Jensen
>|||Take a look at the BOL here:
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/3a5711f5-4f6d-49e8-b1eb-53645181bc40.htm
In your first case, the missing object caused the batch to terminate, and
TRY/CATCH won't help if the batch is terminated. In your second case, the
batch is not terminated and TRY/CATCH works.
Yuu can place a PRINT statement at the end of each batch to see whether the
batch is terminated before it reaches the end.
Linchi
"B D Jensen" wrote:
> begin try
> -- insert ...
> select * from nonexistingtableorfunction;
> end try
> begin catch
> print 'catch me if you can'; -- line will not be printed
> end catch;
>
> begin try
> exec doNotExitingprocedure;
> end try
> begin catch
> print 'this line is printed :-)';
> end catch;
>
> Why this different behaviour?
> If you wrap 1. example in anthother proc with exception handling
> (begin try... begin catch...),
> the wrapping proc will catch the error.
>
> The above behaviour is not what I would expect compared with other
> languages such as Java, C#, PL/SQL...
> Greetings
> B. D. Jensen
>

Wednesday, March 7, 2012

BUG- DATEPART(ww) DATENAME (ww) SPANISH

Hi,
I think this is a bug:
set language spanish
select datepart (ww,'01/04/2000')
select datename (ww,'01/04/2000')
go
Changed language setting to Espa?ol.
14
(1 row(s) affected)
14
************* It′s OK. Because I query the same thing.
select datepart (ww,'04/11/2000')
select datename (ww,'04/11/2000')
go
45
(1 row(s) affected)
45
(1 row(s) affected)
************* It′s OK. Because I query the same thing.
select datepart (ww,'09/04/2000')
select datename (ww,'09/04/2000')
go
15
(1 row(s) affected)
16
(1 row(s) affected)
************ WHY t-sql with language spanish produces different results wit
h datename y datepart to '09/04/2000'?Books Online say that DATEPART will take into account the setting of SET
DATEFIRST, but it doesn't say anything like that for DATENAME. My guess is
that the problem lies here somewhere. Anyhow, note that SQL Server does not
produce week numbers as per the ISO standard! This is why MS added the
ISOWeek function as an example in SQL Server 2000's Books Online.
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=...ublic.sqlserver
"Jose Antonio Pineda" <anonymous@.discussions.microsoft.com> wrote in message
news:9B0DA440-ADB3-468F-9BFA-455437036D4B@.microsoft.com...
> Hi,
> I think this is a bug:
> set language spanish
> select datepart (ww,'01/04/2000')
> select datename (ww,'01/04/2000')
> go
>
> Changed language setting to Espaol.
> --
> 14
> (1 row(s) affected)
>
> --
> 14
> ************* Its OK. Because I query the same thing.
> select datepart (ww,'04/11/2000')
> select datename (ww,'04/11/2000')
> go
> --
> 45
> (1 row(s) affected)
>
> --
> 45
> (1 row(s) affected)
>
> ************* Its OK. Because I query the same thing.
>
> select datepart (ww,'09/04/2000')
> select datename (ww,'09/04/2000')
> go
> --
> 15
> (1 row(s) affected)
>
> --
> 16
> (1 row(s) affected)
> ************ WHY t-sql with language spanish produces different results
with datename y datepart to '09/04/2000'?
>

Bug cannot export/import any dts package on sql 2000 from 2005 manag. studio

I am connectd to a 2000 database and select import and try to

generate a dts to pull in a flat file... the destination is also a 2000 database.. I used to do this using enterprise manager..

Nothing works you get the error:

The operation could not be completed.

The existsonsqlserver mthod has encountered an ole db error code 0x80004005 (client unable to esablish connection) the sql statement issued has failed.

I can connect fine an open query windows and look at all the tables etc...

You can file bugs here:

http://lab.msdn.microsoft.com/productfeedback/default.aspx

Thanks

Bug cannot export/import any dts package on sql 2000 from 2005 manag. studio

I am connectd to a 2000 database and select import and try to

generate a dts to pull in a flat file... the destination is also a 2000 database.. I used to do this using enterprise manager..

Nothing works you get the error:

The operation could not be completed.

The existsonsqlserver mthod has encountered an ole db error code 0x80004005 (client unable to esablish connection) the sql statement issued has failed.

I can connect fine an open query windows and look at all the tables etc...

You can file bugs here:

http://lab.msdn.microsoft.com/productfeedback/default.aspx

Thanks

Saturday, February 25, 2012

Bubble Chart

I would like to show static values on the Y-Axis of a bubble chart, say High,
Medium and Low. When I select the descriptive text in the dataset the
bubbles are not plotted correctly whilst if I retrieve the numeric
equivalent the bubbles are plotted the right way, but the Y-axis will show
numbers and not text.
Any help would be greatly appreciated.I too would like to do this and have not found any help so far. Has anyone
been successful in this? Or does anyone know of good documentation and
specific examples for the bubble chart?
"Adrian Theuma" wrote:
> I would like to show static values on the Y-Axis of a bubble chart, say High,
> Medium and Low. When I select the descriptive text in the dataset the
> bubbles are not plotted correctly whilst if I retrieve the numeric
> equivalent the bubbles are plotted the right way, but the Y-axis will show
> numbers and not text.
> Any help would be greatly appreciated.
>

Sunday, February 12, 2012

bout union select....

can someone help me how can i access datas using union? or show my data in the gridview....pls....

coz i have 3 tables...

i need to output the datas of the 3 tables in 1 gridview.

tables are: TT0001,TM0011,TM0001

TT0001 has syain_id(PK),time_in,time_out,year(PK),month(PK),day(PK)

TM0011 has office_name,office_id(PK)

TM0001 has syain_id(PK) office_id(PK),empl_date

the scenario is:

i have a combo box for office_name, and a textbox for imputting the date( 2007/01/23).when i click the button OK.

the time_in,time_out and syain_name of the person who is present in the choosen date(ex. 2007/01/23) will be shown in my gridview_info.

i already have some codes but it still confuse me and has many errors...

my code:

GridView_info.Visible = True

'//for odbc
Dim StrConn As String = "Dsn=MS_PKG01;UID=emiline;APP=Microsoft? Visual Studio? 2005;WSID=MSHNP200603;DATABASE=MS_PKG01;Trusted_Connection=Yes"
Dim MyConn As Odbc.OdbcConnection = New Odbc.OdbcConnection(StrConn)

'Dim MyConn As New SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings("MS_PKG01ConnectionString").ConnectionString)

MyConn.Open()

'//parsing 2
Dim MyString As String = TextBox_date.Text
Dim MyDateTime As DateTime = DateTime.Parse(MyString)
Console.WriteLine(MyDateTime)

Dim stringQuery2 As String = "SELECT * from tempo_db"

Dim SQLcommand2 As New Odbc.OdbcCommand("Create table tempo_db ( syain_name char(40),year char(4), month char(2), day char(2), in_hh int, in_mi int, out_hh int, out_mi int )", MyConn)
SQLcommand2.ExecuteNonQuery()

Dim SQLcommand1 As New Odbc.OdbcCommand("Drop table tempo_db", MyConn)
SQLcommand1.ExecuteNonQuery()

Dim da As New Odbc.OdbcDataAdapter("Select TT0001.Year,TT0001.Month,TT0001.Day,TT0001.in_hh,TT0001.in_mi,TT0001.out_hh,TT0001.out_min where TT0001.Year =" + MyString + " and TT0001.Month =" + MyString + " and TT0001.Day =" + MyString + " and TT0001.syain_id =" + TM0001.syain_id + " Union Select TM0001.syain_name where TM0001.syain_id =" + TT0001.syain_id + "  Union Select TM0011.office_name where TM0011.office_id =" + TM0001.office_id + "
Dim ds As New DataSet()
Dim foundrow As DataRow
Dim ds2 As New DataSet
'Dim temp_data_table As New DataTable

GridView_info.DataSource = ds
da.Fill(ds, "TT0001")

Dim sqldataadapter2 As New Odbc.OdbcDataAdapter(stringQuery2, MyConn)
sqldataadapter2.Fill(ds2, "tempo_db")
Dim date_ctr As Integer
date_ctr = 1

While date_ctr <= Date.DaysInMonth(Now.Year, Now.Month)

ds.Tables(0).PrimaryKey = New DataColumn() {ds.Tables(0).Columns("Year")}
'ds.Tables(1).PrimaryKey = New DataColumn() {ds.Tables(0).Columns("Month")}
'ds.Tables(2).PrimaryKey = New DataColumn() {ds.Tables(0).Columns("Day")}

foundrow = ds.Tables(0).Rows.Find(date_ctr)
'foundrow = ds.Tables(1).Rows.Find(date_ctr)
'foundrow = ds.Tables(2).Rows.Find(date_ctr)

Dim in_hh, in_mi, out_hh, out_mi As String

If foundrow IsNot Nothing Then
in_hh = foundrow.Item("in_hh")
in_mi = foundrow.Item("in_mi")
out_hh = foundrow.Item("out_hh")
out_mi = foundrow.Item("out_mi")
End If

End While

GridView_info.DataSource = ds2
GridView_info.DataBind()
MyConn.Close()

End Sub

/// ps: im having problem with my select statements....

can someone help me analyze what i had written... and what is my mistake...

any help is greatly appreciated...

thanks

nat!

Remember in union all select statement have to returns the same table structure, and you should use syntax like :

Select * from t1 where a=b

UNION

select * from t2 where b=c

instead of

Select * where a=b

UNION

select * where b=c

(you have it in da As New Odbc.OdbcDataAdapter)

If you select statements returns different number of columns just add dummy columns to where you need them

like

Select c1,c2,c3,c4 from t1 where a=b

UNION

select d1,d2,d3 ,'dummy value' from t2 where b=c

but remember that all columns have to have the same format like 1 select statement

Thanks

JPazgier

Bottom 10?

I know the select distinct TOP 10 returns top ten highest price items but
what about top 10 lowest priced items?
Thanks
S.This is a multi-part message in MIME format.
--=_NextPart_000_04E8_01C3CEEC.B41FEA20
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
It's all in the ORDER BY:
select top 10
*
from
MyTable
order by
Price -- 10 cheapest
select top 10
*
from
MyTable
order by
Price DESC -- 10 most expensive
Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"SMAN" <ksanti@.nycap.rr.com> wrote in message
news:ODQ$ZYxzDHA.2156@.TK2MSFTNGP09.phx.gbl...
I know the select distinct TOP 10 returns top ten highest price items but
what about top 10 lowest priced items?
Thanks
S.
--=_NextPart_000_04E8_01C3CEEC.B41FEA20
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

It's all in the ORDER BY:
select top 10
=*
from
=MyTable
order by
=Price -- 10 cheapest
select top 10
=*
from
=MyTable
order by
Price DESC -- 10 most =expensive
-- Tom
---T=homas A. Moreau, BSc, PhD, MCSE, MCDBASQL Server MVPColumnist, SQL =Server ProfessionalToronto, ON Canadahttp://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=/sql
"SMAN" wrote in message news:ODQ$ZYxzDHA.2156=@.TK2MSFTNGP09.phx.gbl...I know the select distinct TOP 10 returns top ten highest price items =butwhat about top 10 lowest priced items?ThanksS.

--=_NextPart_000_04E8_01C3CEEC.B41FEA20--|||SELECT TOP 10 * FROM <your table> ORDER BY Price
"SMAN" <ksanti@.nycap.rr.com> wrote in message
news:ODQ$ZYxzDHA.2156@.TK2MSFTNGP09.phx.gbl...
> I know the select distinct TOP 10 returns top ten highest price items but
> what about top 10 lowest priced items?
> Thanks
> S.
>|||ahh...makes cents to me now...thank you so much!!!!
"J Young" <thorium48@.hotmail.com> wrote in message
news:OohzYexzDHA.4060@.TK2MSFTNGP11.phx.gbl...
> SELECT TOP 10 * FROM <your table> ORDER BY Price
> "SMAN" <ksanti@.nycap.rr.com> wrote in message
> news:ODQ$ZYxzDHA.2156@.TK2MSFTNGP09.phx.gbl...
> > I know the select distinct TOP 10 returns top ten highest price items
but
> > what about top 10 lowest priced items?
> >
> > Thanks
> >
> > S.
> >
> >
>|||This is a multi-part message in MIME format.
--=_NextPart_000_053D_01C3CEEF.AEBA81F0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
But will it make dollars to you later ... ;-)
--
Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"SMAN" <ksanti@.nycap.rr.com> wrote in message
news:OkpBWjxzDHA.1736@.TK2MSFTNGP09.phx.gbl...
ahh...makes cents to me now...thank you so much!!!!
"J Young" <thorium48@.hotmail.com> wrote in message
news:OohzYexzDHA.4060@.TK2MSFTNGP11.phx.gbl...
> SELECT TOP 10 * FROM <your table> ORDER BY Price
> "SMAN" <ksanti@.nycap.rr.com> wrote in message
> news:ODQ$ZYxzDHA.2156@.TK2MSFTNGP09.phx.gbl...
> > I know the select distinct TOP 10 returns top ten highest price items
but
> > what about top 10 lowest priced items?
> >
> > Thanks
> >
> > S.
> >
> >
>
--=_NextPart_000_053D_01C3CEEF.AEBA81F0
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

But will it make dollars to you later =... ;-)
-- Tom
---T=homas A. Moreau, BSc, PhD, MCSE, MCDBASQL Server MVPColumnist, SQL =Server ProfessionalToronto, ON Canadahttp://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=/sql
"SMAN" wrote in message news:OkpBWjxzDHA.1736=@.TK2MSFTNGP09.phx.gbl...ahh...makes cents to me now...thank you so much!!!!"J Young" =wrote in messagenews:OohzYexzDHA.4060=@.TK2MSFTNGP11.phx.gbl...> SELECT TOP 10 * FROM ORDER BY =Price>> "SMAN" wrote in message> news:ODQ$ZYxzDHA.2156=@.TK2MSFTNGP09.phx.gbl...> > I know the select distinct TOP 10 returns top ten highest price itemsbut> > what about top 10 lowest priced =items?> >> > Thanks> >> > S.> =>> >>>

--=_NextPart_000_053D_01C3CEEF.AEBA81F0--|||You had better throw in 'WITH TIES'.
Else, you'll get screwed when there are a few products with the same price.
And that goes for your 'TOP 10 highest' query too.
James Hokes
"J Young" <thorium48@.hotmail.com> wrote in message
news:OohzYexzDHA.4060@.TK2MSFTNGP11.phx.gbl...
> SELECT TOP 10 * FROM <your table> ORDER BY Price
> "SMAN" <ksanti@.nycap.rr.com> wrote in message
> news:ODQ$ZYxzDHA.2156@.TK2MSFTNGP09.phx.gbl...
> > I know the select distinct TOP 10 returns top ten highest price items
but
> > what about top 10 lowest priced items?
> >
> > Thanks
> >
> > S.
> >
> >
>