From sqlserver667 at yahoo.com Mon May 3 07:04:20 2004 From: sqlserver667 at yahoo.com (S D) Date: Mon, 3 May 2004 05:04:20 -0700 (PDT) Subject: [dba-SQLServer] DTS works like a transaction? Message-ID: <20040503120420.94379.qmail@web90105.mail.scd.yahoo.com> Hi group, I'm creating an impact analysis for my first really big SQL server project. I need to fire a lot (30+) sp's. I want to do this using a DTS package. I think a job is not intended for this and a job is too slow. Question regarding DTS: Does a DTS work like a transaction? So if one SP fails will all actions rollback? TIA Sander --------------------------------- Do you Yahoo!? Win a $20,000 Career Makeover at Yahoo! HotJobs From Robert.Djabarov at usaa.com Mon May 3 08:50:40 2004 From: Robert.Djabarov at usaa.com (Djabarov, Robert) Date: Mon, 3 May 2004 08:50:40 -0500 Subject: [dba-SQLServer] DTS works like a transaction? Message-ID: <6B1FEFC06BC3474B8721FDAA8366810D08C99F63@ex04.eagle.usaa.com> DTS can be very elaborate and very uncontrollable at the same time. But if you store all the calls into a SQL Task within the package and structure each sp with proper error validation/error raising constructs, as well as return code validation after execution of each sp, - your package will be a smooth sailing. Robert Djabarov SQL Server & UDB Sr. SQL Server Administrator Phone: (210) 913-3148 Pager: (210) 753-3148 9800 Fredericksburg Rd. San Antonio, TX 78288 www.usaa.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of S D Sent: Monday, May 03, 2004 7:04 AM To: sqlserver667 Subject: [dba-SQLServer] DTS works like a transaction? Hi group, I'm creating an impact analysis for my first really big SQL server project. I need to fire a lot (30+) sp's. I want to do this using a DTS package. I think a job is not intended for this and a job is too slow. Question regarding DTS: Does a DTS work like a transaction? So if one SP fails will all actions rollback? TIA Sander --------------------------------- Do you Yahoo!? Win a $20,000 Career Makeover at Yahoo! HotJobs _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From mwp.reid at qub.ac.uk Mon May 3 09:59:46 2004 From: mwp.reid at qub.ac.uk (Martin Reid) Date: Mon, 3 May 2004 15:59:46 +0100 Subject: [dba-SQLServer] DTS works like a transaction? References: <6B1FEFC06BC3474B8721FDAA8366810D08C99F63@ex04.eagle.usaa.com> Message-ID: <000d01c4311f$47dfc110$1b02a8c0@MARTINREID> Robert Do you have an example fo such a beast? I am particulary interested in something that carries out operation 1 then 2 then 3 etc? Martin ----- Original Message ----- From: "Djabarov, Robert" To: Sent: Monday, May 03, 2004 2:50 PM Subject: RE: [dba-SQLServer] DTS works like a transaction? > DTS can be very elaborate and very uncontrollable at the same time. But > if you store all the calls into a SQL Task within the package and > structure each sp with proper error validation/error raising constructs, > as well as return code validation after execution of each sp, - your > package will be a smooth sailing. > > Robert Djabarov > SQL Server & UDB > Sr. SQL Server Administrator > Phone: (210) 913-3148 > Pager: (210) 753-3148 > 9800 Fredericksburg Rd. San Antonio, TX 78288 > www.usaa.com > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of S D > Sent: Monday, May 03, 2004 7:04 AM > To: sqlserver667 > Subject: [dba-SQLServer] DTS works like a transaction? > > Hi group, > > I'm creating an impact analysis for my first really big SQL server > project. > I need to fire a lot (30+) sp's. I want to do this using a DTS package. > I think a job is not intended for this and a job is too slow. > > Question regarding DTS: > Does a DTS work like a transaction? > So if one SP fails will all actions rollback? > > TIA > > Sander > > > --------------------------------- > Do you Yahoo!? > Win a $20,000 Career Makeover at Yahoo! HotJobs > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From Robert.Djabarov at usaa.com Mon May 3 12:12:11 2004 From: Robert.Djabarov at usaa.com (Djabarov, Robert) Date: Mon, 3 May 2004 12:12:11 -0500 Subject: [dba-SQLServer] DTS works like a transaction? Message-ID: <6B1FEFC06BC3474B8721FDAA8366810D08C99F64@ex04.eagle.usaa.com> Not sure what you refer to as "such a beast", but error control is usually implemented within procedures as: -- Within the procedure... begin transaction --...action query or DDL statement... if @@error != 0 begin raiserror ('your custom message goes here', 15, 1) rollback transaction return (1) end commit transaction return (0) -- Within the script of other stored procedure that calls the above... declare @RetVal tinyint exec @RetVal = sp_your_stored_procedure @param1, @param2, param...n if @RetVal != 0 begin -- Here you make determination whether to procede -- with the rest of the logic or terminate/divert -- the execution of the script. end Robert Djabarov SQL Server & UDB Sr. SQL Server Administrator Phone: (210) 913-3148 Pager: (210) 753-3148 9800 Fredericksburg Rd. San Antonio, TX 78288 www.usaa.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Martin Reid Sent: Monday, May 03, 2004 10:00 AM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] DTS works like a transaction? Robert Do you have an example fo such a beast? I am particulary interested in something that carries out operation 1 then 2 then 3 etc? Martin ----- Original Message ----- From: "Djabarov, Robert" To: Sent: Monday, May 03, 2004 2:50 PM Subject: RE: [dba-SQLServer] DTS works like a transaction? > DTS can be very elaborate and very uncontrollable at the same time. But > if you store all the calls into a SQL Task within the package and > structure each sp with proper error validation/error raising constructs, > as well as return code validation after execution of each sp, - your > package will be a smooth sailing. > > Robert Djabarov > SQL Server & UDB > Sr. SQL Server Administrator > Phone: (210) 913-3148 > Pager: (210) 753-3148 > 9800 Fredericksburg Rd. San Antonio, TX 78288 > www.usaa.com > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of S D > Sent: Monday, May 03, 2004 7:04 AM > To: sqlserver667 > Subject: [dba-SQLServer] DTS works like a transaction? > > Hi group, > > I'm creating an impact analysis for my first really big SQL server > project. > I need to fire a lot (30+) sp's. I want to do this using a DTS package. > I think a job is not intended for this and a job is too slow. > > Question regarding DTS: > Does a DTS work like a transaction? > So if one SP fails will all actions rollback? > > TIA > > Sander > > > --------------------------------- > Do you Yahoo!? > Win a $20,000 Career Makeover at Yahoo! HotJobs > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From my.lists at verizon.net Mon May 3 15:48:23 2004 From: my.lists at verizon.net (Francisco H Tapia) Date: Mon, 03 May 2004 13:48:23 -0700 Subject: [dba-SQLServer] Review Message-ID: <4096B017.6050403@verizon.net> I need to get a 2nd pair of eyes on this... The purpose of this script is to go into tbl_address and prevent a duplication of the name "main office" for companyID selected. So far It appears to me as if it's fine but I keep getting an error on the Keyword WHILE, what did I miss... i've been staring at it for 30min :( Declare @CompanyID as UniqueIdentifier, @LocationName As Varchar(100) SET @CompanyID = 'E0979997-E5F1-4DC0-8597-5EB649DEC872' IF IsNull(@LocationName,'') = '' BEGIN IF EXISTS(Select LocationName from tbl_Address WHERE CompanyID = @CompanyID AND LocationName = 'Main Office') BEGIN DECLARE @i AS INT SET @i = 1 SET @LocationName = 'Office ' + CAST(@i AS VARCHAR(3) WHILE EXISTS(Select LocationName from tbl_Address WHERE CompanyID = @CompanyID AND LocationName = @LocationName) BEGIN SET @LocationName = 'Office ' + CAST(@i AS VARCHAR(3) SET @i = @i + 1 END END ELSE BEGIN SET @LocationName = 'Main Office' END END -- -Francisco From Robert.Djabarov at usaa.com Mon May 3 16:05:27 2004 From: Robert.Djabarov at usaa.com (Djabarov, Robert) Date: Mon, 3 May 2004 16:05:27 -0500 Subject: [dba-SQLServer] Review Message-ID: <6B1FEFC06BC3474B8721FDAA8366810D08C9A746@ex04.eagle.usaa.com> You're missing a closed parenthesis after: SET @LocationName = 'Office ' + CAST(@i AS VARCHAR(3) Robert Djabarov SQL Server & UDB Sr. SQL Server Administrator Phone: (210) 913-3148 Pager: (210) 753-3148 9800 Fredericksburg Rd. San Antonio, TX 78288 www.usaa.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Francisco H Tapia Sent: Monday, May 03, 2004 3:48 PM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] Review I need to get a 2nd pair of eyes on this... The purpose of this script is to go into tbl_address and prevent a duplication of the name "main office" for companyID selected. So far It appears to me as if it's fine but I keep getting an error on the Keyword WHILE, what did I miss... i've been staring at it for 30min :( Declare @CompanyID as UniqueIdentifier, @LocationName As Varchar(100) SET @CompanyID = 'E0979997-E5F1-4DC0-8597-5EB649DEC872' IF IsNull(@LocationName,'') = '' BEGIN IF EXISTS(Select LocationName from tbl_Address WHERE CompanyID = @CompanyID AND LocationName = 'Main Office') BEGIN DECLARE @i AS INT SET @i = 1 SET @LocationName = 'Office ' + CAST(@i AS VARCHAR(3) WHILE EXISTS(Select LocationName from tbl_Address WHERE CompanyID = @CompanyID AND LocationName = @LocationName) BEGIN SET @LocationName = 'Office ' + CAST(@i AS VARCHAR(3) SET @i = @i + 1 END END ELSE BEGIN SET @LocationName = 'Main Office' END END -- -Francisco _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From my.lists at verizon.net Mon May 3 16:34:22 2004 From: my.lists at verizon.net (Francisco H Tapia) Date: Mon, 03 May 2004 14:34:22 -0700 Subject: [dba-SQLServer] Review In-Reply-To: <6B1FEFC06BC3474B8721FDAA8366810D08C9A746@ex04.eagle.usaa.com> References: <6B1FEFC06BC3474B8721FDAA8366810D08C9A746@ex04.eagle.usaa.com> Message-ID: <4096BADE.3030602@verizon.net> :D, thanks, i was looking to closely at it, and then again, not close enough :D Djabarov, Robert said the following on 5/3/2004 2:05 PM: >You're missing a closed parenthesis after: > SET @LocationName = 'Office ' + CAST(@i AS VARCHAR(3) > >Robert Djabarov >SQL Server & UDB >Sr. SQL Server Administrator >Phone: (210) 913-3148 >Pager: (210) 753-3148 >9800 Fredericksburg Rd. San Antonio, TX 78288 >www.usaa.com > >-----Original Message----- >From: dba-sqlserver-bounces at databaseadvisors.com >[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of >Francisco H Tapia >Sent: Monday, May 03, 2004 3:48 PM >To: dba-sqlserver at databaseadvisors.com >Subject: [dba-SQLServer] Review > >I need to get a 2nd pair of eyes on this... The purpose of this script >is to go into tbl_address and prevent a duplication of the name "main >office" for companyID selected. So far It appears to me as if it's fine > >but I keep getting an error on the Keyword WHILE, what did I miss... >i've been staring at it for 30min :( > >Declare @CompanyID as UniqueIdentifier, @LocationName As Varchar(100) >SET @CompanyID = 'E0979997-E5F1-4DC0-8597-5EB649DEC872' >IF IsNull(@LocationName,'') = '' > BEGIN > IF EXISTS(Select LocationName from tbl_Address WHERE CompanyID = >@CompanyID AND LocationName = 'Main Office') > BEGIN > DECLARE @i AS INT > SET @i = 1 > SET @LocationName = 'Office ' + CAST(@i AS VARCHAR(3) > WHILE EXISTS(Select LocationName from tbl_Address WHERE >CompanyID = @CompanyID AND LocationName = @LocationName) > BEGIN > SET @LocationName = 'Office ' + CAST(@i AS VARCHAR(3) > SET @i = @i + 1 > END > > END > ELSE > BEGIN > SET @LocationName = 'Main Office' > END > END > > > -- -Francisco From davide at dalyn.co.nz Mon May 3 22:44:53 2004 From: davide at dalyn.co.nz (David Emerson) Date: Tue, 04 May 2004 15:44:53 +1200 Subject: [dba-SQLServer] Testing Message-ID: <5.2.0.9.0.20040504154432.00bc84d0@mail.dalyn.co.nz> Regards David Emerson Dalyn Software Ltd 25 Cunliffe St, Churton Park Wellington, New Zealand Ph/Fax (04) 478-7456 Mobile 027-280-9348 From paul.hartland at fsmail.net Thu May 6 03:12:33 2004 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Thu, 6 May 2004 10:12:33 +0200 (CEST) Subject: [dba-SQLServer] OT - HTML & ASP Help Required Message-ID: <25062370.1083831153377.JavaMail.www@wwinf3001> To all, Being a complete novice to HTML & ASP I bought myself a couple of books on the subjects and have been playing around with a test logon page for our company. I have the HTML code (as below) saved as default.htm on a Windows 2000 server with IIS installed in the C:\Inetpub\wwwroot directory along with the ASP code which is saved as checklogin.asp in the same directory. On my Windows 98 machine at home with Personal Web Server (PWS) installed it runs fine, however when trying to run it on our server in the office it just displays the ASP code when the checklogin.asl page is called, and if you try it from a desktop it comes up with a you are about to download checklogin.asp page. Has anyone any ideas whats wrong, or can point me to a list on HTML and ASP etc. default.htm code below: Orridge Reporting Logon

Orridge & Co. Internet Reporting System

Enter Username & Password Below


Username:

Password:


checklogin.asp code is below: <%@ LANGUAGE="VBSCRIPT" %> <% Option Explicit %> <% Dim objConn Dim objRs Dim strSQL Set objConn = Server.CreateObject("ADODB.Connection") objConn.ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)}; " & _ "DBQ=\\Development\C$\InetPub\Wwwroot\Genesis.mdb" objConn.Open Set objRs = Server.CreateObject("ADODB.RecordSet") strSQL = "SELECT * FROM tblUsers WHERE Username = '" & Request.Form("Username") & "'" objRs.Open strSQL, objConn If (objRs.EOF) Then Response.Write "" Response.Write "User Not Registered." Response.Write "" Response.End Else Response.Write "" Response.Write "User Found." Response.Write "" Response.End End If objRs.Close Set objRs = Nothing objConn.Close Set objConn = Nothing %> Thanks in advance for any help. Paul Hartland -- Whatever you Wanadoo: http://www.wanadoo.co.uk/time/ This email has been checked for most known viruses - find out more at: http://www.wanadoo.co.uk/help/id/7098.htm From mwp.reid at qub.ac.uk Thu May 6 03:41:30 2004 From: mwp.reid at qub.ac.uk (Martin Reid) Date: Thu, 6 May 2004 09:41:30 +0100 Subject: [dba-SQLServer] Backup and restore References: <25062370.1083831153377.JavaMail.www@wwinf3001> Message-ID: <000901c43345$ede22f80$9111758f@aine> Anyone got an example of running backup of SQL Server from Access they would care to share?? Rushing to meet a deadline. Martin From rl_stewart at highstream.net Thu May 6 12:29:19 2004 From: rl_stewart at highstream.net (Robert L. Stewart) Date: Thu, 06 May 2004 12:29:19 -0500 Subject: [dba-SQLServer] Re: OT - HTML & ASP Help Required In-Reply-To: <200405061700.i46H0UQ09663@databaseadvisors.com> Message-ID: <5.1.0.14.2.20040506122508.02a64958@pop3.highstream.net> Paul, Since this is a SQL Server forum, I doubt you will get much help for ASP and HTML here. Try: http://www.aspforblondes.com/ http://aspalliance.com/ http://www.411asp.net/ http://www.aspfree.com/ http://www.4guysfromrolla.com/ All of which specialize in ASP. At 12:00 PM 5/6/2004 -0500, you wrote: >Date: Thu, 6 May 2004 10:12:33 +0200 (CEST) >From: paul.hartland at fsmail.net >Subject: [dba-SQLServer] OT - HTML & ASP Help Required >To: dba-sqlserver >Message-ID: <25062370.1083831153377.JavaMail.www at wwinf3001> >Content-Type: text/plain; charset=iso-8859-1 > >To all, > >Being a complete novice to HTML & ASP I bought myself a couple of books on >the subjects and have been playing around with a test logon page for our >company. I have the HTML code (as below) saved as default.htm on a >Windows 2000 server with IIS installed in the C:\Inetpub\wwwroot directory >along with the ASP code which is saved as checklogin.asp in the same >directory. On my Windows 98 machine at home with Personal Web Server >(PWS) installed it runs fine, however when trying to run it on our server >in the office it just displays the ASP code when the checklogin.asl page >is called, and if you try it from a desktop it comes up with a you are >about to download checklogin.asp page. > >Has anyone any ideas whats wrong, or can point me to a list on HTML and >ASP etc. > From mwp.reid at qub.ac.uk Thu May 6 12:32:31 2004 From: mwp.reid at qub.ac.uk (Martin Reid) Date: Thu, 6 May 2004 18:32:31 +0100 Subject: [dba-SQLServer] Backup References: <5.1.0.14.2.20040506122508.02a64958@pop3.highstream.net> Message-ID: <002501c43390$1cebd020$1b02a8c0@MARTINREID> no response to the request re backing up SQL Server via Access -anyone any examples? Martin From CMackin at Quiznos.com Thu May 6 12:40:47 2004 From: CMackin at Quiznos.com (Mackin, Christopher) Date: Thu, 6 May 2004 11:40:47 -0600 Subject: [dba-SQLServer] Backup Message-ID: <19F28F0B4284C04FB90CAA380451FFD941277D@bross.quiznos.net> I always just set up a Maintenance Plan in Enterprise Manager that controls backups and optimizations and runs everythiing required on a nightly basis. Have never seen the need to create backups via Access. You could easily go through Enterprise Manager and create a Job that does the backup then just run that code via a Command object in VBA. A sample backup in T-SQL looks like this: BACKUP DATABASE [MySampleDB] TO DISK = N'E:\Microsoft SQL Server\MSSQL\Data\MyBak' WITH INIT , NOUNLOAD , NAME = N'MyTest backup', NOSKIP , STATS = 10, NOFORMAT -Chris Mackin -----Original Message----- From: Martin Reid [mailto:mwp.reid at qub.ac.uk] Sent: Thursday, May 06, 2004 11:33 AM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] Backup no response to the request re backing up SQL Server via Access -anyone any examples? Martin _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From jmoss111 at bellsouth.net Thu May 6 12:43:38 2004 From: jmoss111 at bellsouth.net (JMoss) Date: Thu, 6 May 2004 12:43:38 -0500 Subject: [dba-SQLServer] OT - HTML & ASP Help Required In-Reply-To: <25062370.1083831153377.JavaMail.www@wwinf3001> Message-ID: Paul, I'm assuming that you have created a virtual directory, and have set permissions. In the properties page of the virtual directory, on the virtual directory tab, click the configuration button. On the App Mapping tab, make sure thar the .asp extension is in the configured extension list. If not, add it. On the App Debugging tab, ensure that the Send detailed ASP error messages to client radio button is selected. Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of paul.hartland at fsmail.net Sent: Thursday, May 06, 2004 3:13 AM To: dba-sqlserver Subject: [dba-SQLServer] OT - HTML & ASP Help Required To all, Being a complete novice to HTML & ASP I bought myself a couple of books on the subjects and have been playing around with a test logon page for our company. I have the HTML code (as below) saved as default.htm on a Windows 2000 server with IIS installed in the C:\Inetpub\wwwroot directory along with the ASP code which is saved as checklogin.asp in the same directory. On my Windows 98 machine at home with Personal Web Server (PWS) installed it runs fine, however when trying to run it on our server in the office it just displays the ASP code when the checklogin.asl page is called, and if you try it from a desktop it comes up with a you are about to download checklogin.asp page. Has anyone any ideas whats wrong, or can point me to a list on HTML and ASP etc. default.htm code below: Orridge Reporting Logon

Orridge & Co. Internet Reporting System

Enter Username & Password Below


Username:

Password:


checklogin.asp code is below: <%@ LANGUAGE="VBSCRIPT" %> <% Option Explicit %> <% Dim objConn Dim objRs Dim strSQL Set objConn = Server.CreateObject("ADODB.Connection") objConn.ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)}; " & _ "DBQ=\\Development\C$\InetPub\Wwwroot\Genesis.mdb" objConn.Open Set objRs = Server.CreateObject("ADODB.RecordSet") strSQL = "SELECT * FROM tblUsers WHERE Username = '" & Request.Form("Username") & "'" objRs.Open strSQL, objConn If (objRs.EOF) Then Response.Write "" Response.Write "User Not Registered." Response.Write "" Response.End Else Response.Write "" Response.Write "User Found." Response.Write "" Response.End End If objRs.Close Set objRs = Nothing objConn.Close Set objConn = Nothing %> Thanks in advance for any help. Paul Hartland -- Whatever you Wanadoo: http://www.wanadoo.co.uk/time/ This email has been checked for most known viruses - find out more at: http://www.wanadoo.co.uk/help/id/7098.htm _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From Robert.Djabarov at usaa.com Thu May 6 13:15:59 2004 From: Robert.Djabarov at usaa.com (Djabarov, Robert) Date: Thu, 6 May 2004 13:15:59 -0500 Subject: [dba-SQLServer] Re: OT - HTML & ASP Help Required Message-ID: <6B1FEFC06BC3474B8721FDAA8366810D08C9A752@ex04.eagle.usaa.com> I think you need to make sure that your IIS can support Frontpage Server Extensions. Hit those sites below for more details. Robert Djabarov SQL Server & UDB Sr. SQL Server Administrator Phone: (210) 913-3148 Pager: (210) 753-3148 9800 Fredericksburg Rd. San Antonio, TX 78288 www.usaa.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Robert L. Stewart Sent: Thursday, May 06, 2004 12:29 PM To: dba-sqlserver at databaseadvisors.com Cc: paul.hartland at fsmail.net Subject: [dba-SQLServer] Re: OT - HTML & ASP Help Required Paul, Since this is a SQL Server forum, I doubt you will get much help for ASP and HTML here. Try: http://www.aspforblondes.com/ http://aspalliance.com/ http://www.411asp.net/ http://www.aspfree.com/ http://www.4guysfromrolla.com/ All of which specialize in ASP. At 12:00 PM 5/6/2004 -0500, you wrote: >Date: Thu, 6 May 2004 10:12:33 +0200 (CEST) >From: paul.hartland at fsmail.net >Subject: [dba-SQLServer] OT - HTML & ASP Help Required >To: dba-sqlserver >Message-ID: <25062370.1083831153377.JavaMail.www at wwinf3001> >Content-Type: text/plain; charset=iso-8859-1 > >To all, > >Being a complete novice to HTML & ASP I bought myself a couple of books on >the subjects and have been playing around with a test logon page for our >company. I have the HTML code (as below) saved as default.htm on a >Windows 2000 server with IIS installed in the C:\Inetpub\wwwroot directory >along with the ASP code which is saved as checklogin.asp in the same >directory. On my Windows 98 machine at home with Personal Web Server >(PWS) installed it runs fine, however when trying to run it on our server >in the office it just displays the ASP code when the checklogin.asl page >is called, and if you try it from a desktop it comes up with a you are >about to download checklogin.asp page. > >Has anyone any ideas whats wrong, or can point me to a list on HTML and >ASP etc. > _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From Robert.Djabarov at usaa.com Thu May 6 13:17:02 2004 From: Robert.Djabarov at usaa.com (Djabarov, Robert) Date: Thu, 6 May 2004 13:17:02 -0500 Subject: [dba-SQLServer] Backup Message-ID: <6B1FEFC06BC3474B8721FDAA8366810D08C9A753@ex04.eagle.usaa.com> Create a stored procedure (wrapper) that does the backup, and call it with pass-through query from Access. Robert Djabarov SQL Server & UDB Sr. SQL Server Administrator Phone: (210) 913-3148 Pager: (210) 753-3148 9800 Fredericksburg Rd. San Antonio, TX 78288 www.usaa.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Martin Reid Sent: Thursday, May 06, 2004 12:33 PM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] Backup no response to the request re backing up SQL Server via Access -anyone any examples? Martin _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From mwp.reid at qub.ac.uk Thu May 6 14:36:04 2004 From: mwp.reid at qub.ac.uk (Martin Reid) Date: Thu, 6 May 2004 20:36:04 +0100 Subject: [dba-SQLServer] Backup References: <6B1FEFC06BC3474B8721FDAA8366810D08C9A753@ex04.eagle.usaa.com> Message-ID: <002701c433a1$5f7f5c70$1b02a8c0@MARTINREID> Problem is I have to use an Access form and let the suer 1. Select db to back up 2. Select a folder for the backup both local and network 3. Name the backup with teh date and time it occured Of course I also have to do a restore form these files as well. All in the access interface. Martin ----- Original Message ----- From: "Djabarov, Robert" To: Sent: Thursday, May 06, 2004 7:17 PM Subject: RE: [dba-SQLServer] Backup > Create a stored procedure (wrapper) that does the backup, and call it > with pass-through query from Access. > > Robert Djabarov > SQL Server & UDB > Sr. SQL Server Administrator > Phone: (210) 913-3148 > Pager: (210) 753-3148 > 9800 Fredericksburg Rd. San Antonio, TX 78288 > www.usaa.com > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Martin > Reid > Sent: Thursday, May 06, 2004 12:33 PM > To: dba-sqlserver at databaseadvisors.com > Subject: [dba-SQLServer] Backup > > no response to the request re backing up SQL Server via Access -anyone > any > examples? > > > Martin > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From my.lists at verizon.net Thu May 6 14:52:00 2004 From: my.lists at verizon.net (Francisco H Tapia) Date: Thu, 06 May 2004 12:52:00 -0700 Subject: [dba-SQLServer] Backup In-Reply-To: <002701c433a1$5f7f5c70$1b02a8c0@MARTINREID> References: <6B1FEFC06BC3474B8721FDAA8366810D08C9A753@ex04.eagle.usaa.com> <002701c433a1$5f7f5c70$1b02a8c0@MARTINREID> Message-ID: <409A9760.2060904@verizon.net> Martin, Check out SQL-DMO as an object refrence. You can do all that you ask via this interface, choose db, Backup/restore. Martin Reid wrote On 5/6/2004 12:36 PM: >Problem is I have to use an Access form and let the suer > >1. Select db to back up >2. Select a folder for the backup both local and network >3. Name the backup with teh date and time it occured > >Of course I also have to do a restore form these files as well. All in the >access interface. > >Martin > > > >----- Original Message ----- >From: "Djabarov, Robert" >To: >Sent: Thursday, May 06, 2004 7:17 PM >Subject: RE: [dba-SQLServer] Backup > > > > >>Create a stored procedure (wrapper) that does the backup, and call it >>with pass-through query from Access. >> >>Robert Djabarov >>SQL Server & UDB >>Sr. SQL Server Administrator >>Phone: (210) 913-3148 >>Pager: (210) 753-3148 >>9800 Fredericksburg Rd. San Antonio, TX 78288 >>www.usaa.com >> >>-----Original Message----- >>From: dba-sqlserver-bounces at databaseadvisors.com >>[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Martin >>Reid >>Sent: Thursday, May 06, 2004 12:33 PM >>To: dba-sqlserver at databaseadvisors.com >>Subject: [dba-SQLServer] Backup >> >>no response to the request re backing up SQL Server via Access -anyone >>any >>examples? >> >> >>Martin >> >>____ >> > > -- -Francisco From martyconnelly at shaw.ca Thu May 6 15:26:32 2004 From: martyconnelly at shaw.ca (MartyConnelly) Date: Thu, 06 May 2004 13:26:32 -0700 Subject: [dba-SQLServer] Backup References: <6B1FEFC06BC3474B8721FDAA8366810D08C9A753@ex04.eagle.usaa.com> <002701c433a1$5f7f5c70$1b02a8c0@MARTINREID> Message-ID: <409A9F78.7020801@shaw.ca> Here is VB6 source code to do a lot of these procedures via SQL-DMO from Andrea Montanari's DBAMGR MSDE SQL Server Manager tool. http://www.asql.biz/DbaMgr.shtm In case you get lost in the Italian Look for DbaMgr2k 0.7.0 # 26/03/2004 (832kb) VB source download, free but need to register You might want to give the full package a whirl. Martin Reid wrote: >Problem is I have to use an Access form and let the suer > >1. Select db to back up >2. Select a folder for the backup both local and network >3. Name the backup with teh date and time it occured > >Of course I also have to do a restore form these files as well. All in the >access interface. > >Martin > > > >----- Original Message ----- >From: "Djabarov, Robert" >To: >Sent: Thursday, May 06, 2004 7:17 PM >Subject: RE: [dba-SQLServer] Backup > > > > >>Create a stored procedure (wrapper) that does the backup, and call it >>with pass-through query from Access. >> >>Robert Djabarov >>SQL Server & UDB >>Sr. SQL Server Administrator >>Phone: (210) 913-3148 >>Pager: (210) 753-3148 >>9800 Fredericksburg Rd. San Antonio, TX 78288 >>www.usaa.com >> >>-----Original Message----- >>From: dba-sqlserver-bounces at databaseadvisors.com >>[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Martin >>Reid >>Sent: Thursday, May 06, 2004 12:33 PM >>To: dba-sqlserver at databaseadvisors.com >>Subject: [dba-SQLServer] Backup >> >>no response to the request re backing up SQL Server via Access -anyone >>any >>examples? >> >> >>Martin >> >>_______________________________________________ >>dba-SQLServer mailing list >>dba-SQLServer at databaseadvisors.com >>http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >>http://www.databaseadvisors.com >> >>_______________________________________________ >>dba-SQLServer mailing list >>dba-SQLServer at databaseadvisors.com >>http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >>http://www.databaseadvisors.com >> >> >> >> > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > > > > -- Marty Connelly Victoria, B.C. Canada From mwp.reid at qub.ac.uk Thu May 6 16:22:13 2004 From: mwp.reid at qub.ac.uk (Martin Reid) Date: Thu, 6 May 2004 22:22:13 +0100 Subject: [dba-SQLServer] Backup References: <6B1FEFC06BC3474B8721FDAA8366810D08C9A753@ex04.eagle.usaa.com><002701c433a1$5f7f5c70$1b02a8c0@MARTINREID> <409A9F78.7020801@shaw.ca> Message-ID: <001901c433b0$344dc870$1b02a8c0@MARTINREID> Thanks Marty Anyone want this when I have written it let me know. In theory It will allow User to select db to back up Select local folder Select network folder Backup to both locations Name the backup file with the db name plus the date and time of backup of course have to do the reverse and allow them to restore as well. Martin ----- Original Message ----- From: "MartyConnelly" To: Sent: Thursday, May 06, 2004 9:26 PM Subject: Re: [dba-SQLServer] Backup > Here is VB6 source code to do a lot of these procedures via SQL-DMO > from Andrea Montanari's DBAMGR MSDE SQL Server Manager tool. > http://www.asql.biz/DbaMgr.shtm > In case you get lost in the Italian > Look for DbaMgr2k 0.7.0 # 26/03/2004 (832kb) VB source download, free > but need to register > You might want to give the full package a whirl. > > > > Martin Reid wrote: > > >Problem is I have to use an Access form and let the suer > > > >1. Select db to back up > >2. Select a folder for the backup both local and network > >3. Name the backup with teh date and time it occured > > > >Of course I also have to do a restore form these files as well. All in the > >access interface. > > > >Martin > > > > > > > >----- Original Message ----- > >From: "Djabarov, Robert" > >To: > >Sent: Thursday, May 06, 2004 7:17 PM > >Subject: RE: [dba-SQLServer] Backup > > > > > > > > > >>Create a stored procedure (wrapper) that does the backup, and call it > >>with pass-through query from Access. > >> > >>Robert Djabarov > >>SQL Server & UDB > >>Sr. SQL Server Administrator > >>Phone: (210) 913-3148 > >>Pager: (210) 753-3148 > >>9800 Fredericksburg Rd. San Antonio, TX 78288 > >>www.usaa.com > >> > >>-----Original Message----- > >>From: dba-sqlserver-bounces at databaseadvisors.com > >>[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Martin > >>Reid > >>Sent: Thursday, May 06, 2004 12:33 PM > >>To: dba-sqlserver at databaseadvisors.com > >>Subject: [dba-SQLServer] Backup > >> > >>no response to the request re backing up SQL Server via Access -anyone > >>any > >>examples? > >> > >> > >>Martin > >> > >>_______________________________________________ > >>dba-SQLServer mailing list > >>dba-SQLServer at databaseadvisors.com > >>http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > >>http://www.databaseadvisors.com > >> > >>_______________________________________________ > >>dba-SQLServer mailing list > >>dba-SQLServer at databaseadvisors.com > >>http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > >>http://www.databaseadvisors.com > >> > >> > >> > >> > > > >_______________________________________________ > >dba-SQLServer mailing list > >dba-SQLServer at databaseadvisors.com > >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > >http://www.databaseadvisors.com > > > > > > > > > > -- > Marty Connelly > Victoria, B.C. > Canada > > > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From mwp.reid at qub.ac.uk Thu May 6 16:40:06 2004 From: mwp.reid at qub.ac.uk (Martin Reid) Date: Thu, 6 May 2004 22:40:06 +0100 Subject: [dba-SQLServer] Views References: <6B1FEFC06BC3474B8721FDAA8366810D08C9A753@ex04.eagle.usaa.com><002701c433a1$5f7f5c70$1b02a8c0@MARTINREID><409A9F78.7020801@shaw.ca> <001901c433b0$344dc870$1b02a8c0@MARTINREID> Message-ID: <000901c433b2$b3f6d5b0$1b02a8c0@MARTINREID> I am looking at views in Access View is on SQL Server Works well. On edit the record works and all is well. Saves ok. On second edit the ODBC call fails? Any comments? Martin From accessd at shaw.ca Thu May 6 22:23:41 2004 From: accessd at shaw.ca (Jim Lawrence (AccessD)) Date: Thu, 06 May 2004 20:23:41 -0700 Subject: [dba-SQLServer] Re: OT - HTML & ASP Help Required In-Reply-To: <6B1FEFC06BC3474B8721FDAA8366810D08C9A752@ex04.eagle.usaa.com> Message-ID: FrontPage server extensions are bad :-(...adds lots of overhead and can introduce some very weird problems. Had a string of oddities but once the extension were turned off and the server purged every thing started working fine. Some have claimed that they can open up security holes but can not confirm that. Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Djabarov, Robert Sent: Thursday, May 06, 2004 11:16 AM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer] Re: OT - HTML & ASP Help Required I think you need to make sure that your IIS can support Frontpage Server Extensions. Hit those sites below for more details. Robert Djabarov SQL Server & UDB Sr. SQL Server Administrator Phone: (210) 913-3148 Pager: (210) 753-3148 9800 Fredericksburg Rd. San Antonio, TX 78288 www.usaa.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Robert L. Stewart Sent: Thursday, May 06, 2004 12:29 PM To: dba-sqlserver at databaseadvisors.com Cc: paul.hartland at fsmail.net Subject: [dba-SQLServer] Re: OT - HTML & ASP Help Required Paul, Since this is a SQL Server forum, I doubt you will get much help for ASP and HTML here. Try: http://www.aspforblondes.com/ http://aspalliance.com/ http://www.411asp.net/ http://www.aspfree.com/ http://www.4guysfromrolla.com/ All of which specialize in ASP. At 12:00 PM 5/6/2004 -0500, you wrote: >Date: Thu, 6 May 2004 10:12:33 +0200 (CEST) >From: paul.hartland at fsmail.net >Subject: [dba-SQLServer] OT - HTML & ASP Help Required >To: dba-sqlserver >Message-ID: <25062370.1083831153377.JavaMail.www at wwinf3001> >Content-Type: text/plain; charset=iso-8859-1 > >To all, > >Being a complete novice to HTML & ASP I bought myself a couple of books on >the subjects and have been playing around with a test logon page for our >company. I have the HTML code (as below) saved as default.htm on a >Windows 2000 server with IIS installed in the C:\Inetpub\wwwroot directory >along with the ASP code which is saved as checklogin.asp in the same >directory. On my Windows 98 machine at home with Personal Web Server >(PWS) installed it runs fine, however when trying to run it on our server >in the office it just displays the ASP code when the checklogin.asl page >is called, and if you try it from a desktop it comes up with a you are >about to download checklogin.asp page. > >Has anyone any ideas whats wrong, or can point me to a list on HTML and >ASP etc. > _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From andrew.haslett at ilc.gov.au Thu May 6 23:10:50 2004 From: andrew.haslett at ilc.gov.au (Haslett, Andrew) Date: Fri, 7 May 2004 13:40:50 +0930 Subject: [dba-SQLServer] OT - HTML & ASP Help Required Message-ID: This means that IIS didn't recognise the asp extension and hence couldn't parse the code contained within. When this occurs, it just sends you the whole file instead. Why does this occur? Either IIS isn't installed or running correctly, OR it is running correctly but the asp ISAPI 'mapping' isn't configured. Under properties of the website -> Home Directory tab -> Configuration Button -> ensure that asp mapping is there, pointing to the asp.dll (c:\windows\system32\asp.dll) A reinstall of IIS on the server will usually fix this all up for you... Cheers, Andrew -----Original Message----- From: paul.hartland at fsmail.net [mailto:paul.hartland at fsmail.net] Sent: Thursday, 6 May 2004 5:43 PM To: dba-sqlserver Subject: [dba-SQLServer] OT - HTML & ASP Help Required To all, Being a complete novice to HTML & ASP I bought myself a couple of books on the subjects and have been playing around with a test logon page for our company. I have the HTML code (as below) saved as default.htm on a Windows 2000 server with IIS installed in the C:\Inetpub\wwwroot directory along with the ASP code which is saved as checklogin.asp in the same directory. On my Windows 98 machine at home with Personal Web Server (PWS) installed it runs fine, however when trying to run it on our server in the office it just displays the ASP code when the checklogin.asl page is called, and if you try it from a desktop it comes up with a you are about to download checklogin.asp page. Has anyone any ideas whats wrong, or can point me to a list on HTML and ASP etc. default.htm code below: Orridge Reporting Logon

Orridge & Co. Internet Reporting System

Enter Username & Password Below


Username:

Password:


checklogin.asp code is below: <%@ LANGUAGE="VBSCRIPT" %> <% Option Explicit %> <% Dim objConn Dim objRs Dim strSQL Set objConn = Server.CreateObject("ADODB.Connection") objConn.ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)}; " & _ "DBQ=\\Development\C$\InetPub\Wwwroot\Genesis.mdb" objConn.Open Set objRs = Server.CreateObject("ADODB.RecordSet") strSQL = "SELECT * FROM tblUsers WHERE Username = '" & Request.Form("Username") & "'" objRs.Open strSQL, objConn If (objRs.EOF) Then Response.Write "" Response.Write "User Not Registered." Response.Write "" Response.End Else Response.Write "" Response.Write "User Found." Response.Write "" Response.End End If objRs.Close Set objRs = Nothing objConn.Close Set objConn = Nothing %> Thanks in advance for any help. Paul Hartland -- Whatever you Wanadoo: http://www.wanadoo.co.uk/time/ This email has been checked for most known viruses - find out more at: http://www.wanadoo.co.uk/help/id/7098.htm _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com IMPORTANT - PLEASE READ ******************** This email and any files transmitted with it are confidential and may contain information protected by law from disclosure. If you have received this message in error, please notify the sender immediately and delete this email from your system. No warranty is given that this email or files, if attached to this email, are free from computer viruses or other defects. They are provided on the basis the user assumes all responsibility for loss, damage or consequence resulting directly or indirectly from their use, whether caused by the negligence of the sender or not. From michael.broesdorf at web.de Fri May 7 15:36:23 2004 From: michael.broesdorf at web.de (=?iso-8859-1?Q?Michael_Br=F6sdorf?=) Date: Fri, 7 May 2004 22:36:23 +0200 Subject: [dba-SQLServer] Microsoft SQL Server Reporting Services In-Reply-To: Message-ID: Hi all, while playing around with the new reporting services for SQL Server I stumbled across one issue: to filter data before the report is rendered one can use parameters. >From what I've read in Books Online, each parameter is presented to the user indivually. This is not a good solution, if larger numbers of parameters are needed. Is it possible to create a form or something the like to specify a set of parameters and apply them at once? TIA, Michael ____________ Virus checked by G DATA AntiVirusKit Version: BD 14.0.321 from 04.05.2004 Virus news: www.antiviruslab.com From tuxedo_man at hotmail.com Fri May 7 20:11:46 2004 From: tuxedo_man at hotmail.com (Billy Pang) Date: Sat, 08 May 2004 01:11:46 +0000 Subject: [dba-SQLServer] OT: passve ftp client Message-ID: Hello: Sorry for this non-database post but does anyone know of a command-line ftp utility that supports passive mode and can automatically run a text file (containing FTP commands) after it starts up? There is an FTP commandline client (ftp.exe) that ships with Windows but it does not support passive mode (however, it can automatically run the text file after startup via the -s option though). Thanks a million in advance, Billy PS: If you are are interested, some command line FTP links of interest are: 1) describes the windows ftp.exe (including the -s option) http://www.microsoft.com/windowsxp/home/using/productdoc/en/default.asp?url=/windowsxp/home/using/productdoc/en/ftp.asp 2) indicates that windows ftp.exe does not support passive mode http://support.microsoft.com/default.aspx?scid=kb;en-us;271078 _________________________________________________________________ MSN Premium includes powerful parental controls and get 2 months FREE* http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines From mwp.reid at qub.ac.uk Sat May 8 04:54:18 2004 From: mwp.reid at qub.ac.uk (Martin Reid) Date: Sat, 8 May 2004 10:54:18 +0100 Subject: [dba-SQLServer] List Box values to SP References: Message-ID: <006301c434e2$716a9480$1b02a8c0@MARTINREID> I need to pass the values from a list box in Access to a stored procedure which does a multi table insert.Unless of course theres a better way to do this? Martin From mwp.reid at qub.ac.uk Mon May 10 02:59:25 2004 From: mwp.reid at qub.ac.uk (Martin Reid) Date: Mon, 10 May 2004 08:59:25 +0100 Subject: [dba-SQLServer] Odd Behaviour References: <6B1FEFC06BC3474B8721FDAA8366810D08C9A753@ex04.eagle.usaa.com><002701c433a1$5f7f5c70$1b02a8c0@MARTINREID><409A9F78.7020801@shaw.ca> <001901c433b0$344dc870$1b02a8c0@MARTINREID> Message-ID: <001c01c43664$b671b030$9111758f@aine> Has anyone seen this before? Not sure what is happening? Is this security related?? Martin create a view using some sql View created I name the view Vw_AssetByAssetTypeRecordset Creates it fine I look in EM View name is [MARTINREID].[BarTracks_Version15T].[dbo].[vw_AssetByAssetTypeRecordset] View when I go to edit it is defined as SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO ALTER VIEW [MARTINREID_BarTracks_Version15T_dbo_vw_AssetByAssetTypeRecordset] AS SELECT * FROM [MARTINREID].[BarTracks_Version15T].[dbo].[vw_AssetByAssetTypeRecordset] GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO This only happened today. BEfore this it was named dbo.viewname as usual Any ideas whats going on???? From my.lists at verizon.net Mon May 10 10:34:00 2004 From: my.lists at verizon.net (Francisco H Tapia) Date: Mon, 10 May 2004 08:34:00 -0700 Subject: [dba-SQLServer] List Box values to SP In-Reply-To: <006301c434e2$716a9480$1b02a8c0@MARTINREID> References: <006301c434e2$716a9480$1b02a8c0@MARTINREID> Message-ID: <409FA0E8.8030104@verizon.net> I haven't seen any replies for this to you Martin, so here is a crack at it..., mind you I haven't done this but I think it's easy enough to try it out... I would wrap all your items w/ a delimiter (such as | (pipe)) into a variable and pass a single string variable to your stored procedure, next in the stored procedure I'd unwrap the parameter by looping in a while loop and inserting the values into a temp table, then using the temp table to inner join into my normal select statement. The other way to do this is to use dynamic sql which I don't like because you end up having to give users direct select access to your tables... a practice that I detest. please let me know if you need some sample code and i'll dig up some time to post it today :) Martin Reid wrote On 5/8/2004 2:54 AM: >I need to pass the values from a list box in Access to a stored procedure >which does a multi table insert.Unless of course theres a better way to do >this? > >Martin > > -- -Francisco From DavidL at sierranevada.com Mon May 10 10:47:23 2004 From: DavidL at sierranevada.com (David Lewis) Date: Mon, 10 May 2004 08:47:23 -0700 Subject: [dba-SQLServer] List Box values to SP Message-ID: <9923336B7F4D1A459B983065D95397B90394A7@pale.sierranevada.corp> The following sub takes the values from two text boxes (one for the beginning date, one for the ending date), then sends them to a few sprocs and then finally opens a report. I don't have any validation here to make sure the dates are valid, which really should be added..... There should be enough here to get you started. Private Sub cmdRunReport_Click() Dim dtBegin As Date Dim dtEnd As Date Dim cmd As ADODB.Command Set cmd = New ADODB.Command Set cmd.ActiveConnection = CurrentProject.Connection cmd.CommandType = adCmdStoredProc Dim prm As ADODB.Parameter dtBegin = txtBegin.Value dtEnd = txtEnd.Value Set prm = cmd.CreateParameter("dtBegin", adDate, adParamInput, , dtBegin) cmd.Parameters.Append prm Set prm = cmd.CreateParameter("dtEnd", adDate, adParamInput, , dtEnd) cmd.Parameters.Append prm cmd.CommandText = "dbo.spJLFilteredBBTs" cmd.Execute cmd.CommandText = "dbo.spJLFilteredNotPacked" cmd.Execute cmd.CommandText = "dbo.spJLPackageDataPack" cmd.Execute cmd.CommandText = "dbo.spJLPackNotFiltered" cmd.Execute Set prm = Nothing Set cmd = Nothing cmdBBTs.Enabled = True Dim stDocName As String stDocName = "rptBATFJeff" DoCmd.OpenReport stDocName, acPreview End Sub To send list box values you can piece something together from the following two snippets. The first sends values from one list box to another: Dim ctlSource As Control Dim ctlDest As Control Dim strFermCode As String Dim intCurrentRow As Integer Set ctlSource = Forms!frmFilterCodeCreate!lstCellar Set ctlDest = Forms!frmFilterCodeCreate!lstSelected For intCurrentRow = 0 To ctlSource.ListCount - 1 If ctlSource.Selected(intCurrentRow) Then strFermCode = ctlSource.Column(3) strItems = strItems & ctlSource.Column(0, intCurrentRow) & ";" strItems = strItems & """" & strFermCode & """" & ";" End If Next intCurrentRow ' Reset destination control's RowSource property. ctlDest.RowSource = "" ctlDest.RowSource = strItems lstSelected.Requery Here is a snippet that will loop through a multi-select list box, append a parameter, run a sproc, delete the parameter and repeat. It is probably better for a multi-select list box to send the entire string of selected items to the sproc, parse it there and run it multiple times. For i = 0 To lstSelected.ListCount - 1 intFERMID = lstSelected.Column(0, i) Set prm = cmd.CreateParameter("FERMID", adInteger, adParamInput, , intFERMID) cmd.Parameters.Append prm cmd.Execute cmd.Parameters.Delete "FERMID" Next Message: 3 Date: Sat, 8 May 2004 10:54:18 +0100 From: "Martin Reid" Subject: [dba-SQLServer] List Box values to SP To: Message-ID: <006301c434e2$716a9480$1b02a8c0 at MARTINREID> Content-Type: text/plain; charset="iso-8859-1" I need to pass the values from a list box in Access to a stored procedure which does a multi table insert.Unless of course theres a better way to do this? Martin ------------------------------ _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver End of dba-SQLServer Digest, Vol 15, Issue 6 ******************************************** From DMcAfee at haascnc.com Mon May 10 13:09:45 2004 From: DMcAfee at haascnc.com (David McAfee) Date: Mon, 10 May 2004 11:09:45 -0700 Subject: [dba-SQLServer] List Box values to SP Message-ID: <657FB70438B7D311AF320090279C1801061441B6@EXCHMAIL> If you are using a multi-select listbox, you can always loop through the list box as such: 'Inserting records from a listbox (Looping through the listbox) Dim varIndex As Variant Dim lRecordsAffected As Long Dim Cnn As ADODB.Connection Dim Cmd As ADODB.Command Set Cnn = New ADODB.Connection Set Cnn = CurrentProject.Connection For Each varIndex In Me.MyListBox.ItemsSelected 'For every item selected in list box Set Cmd = New ADODB.Command With Cmd Set .ActiveConnection = Cnn .CommandType = adCmdStoredProc .CommandText = "stp_YourSprocHere" .Parameters.Append .CreateParameter("@addrID", adGUID, adParamInput, , Me.lstAddrLocOrContact.Column(3, varIndex)) Set .ActiveConnection = Cnn .Execute lRecordsAffected, , adExecuteNoRecords ' Do not return a recordset End With Set Cmd = Nothing Next 'Loop to the next selected item Cnn.Close Set Cnn = Nothing Another thing that I just recently did on a different form was to create a global temp table on the form open (ADP). I am using this form as a "maintenance" screen to clear out duplicate / erroneous entries. I Move certain records from one listbox to the next listbox by flagging a field in the temp table with a code. Both listboxes have the same stored procedure as the its rowsource (only sending back a different parameter, for the filter). When I am ready to do my multi table updates with the values listed in the listbox, I do it all through T-SQL by joining against the temp table. Upon closing the form, the global temp table deletes itself. Pretty neat. D Martin wrote: I need to pass the values from a list box in Access to a stored procedure which does a multi table insert.Unless of course theres a better way to do this? Martin From sqlserver667 at yahoo.com Tue May 11 00:44:39 2004 From: sqlserver667 at yahoo.com (S D) Date: Mon, 10 May 2004 22:44:39 -0700 (PDT) Subject: [dba-SQLServer] DTS => execution *.bat to logfile? Message-ID: <20040511054439.69625.qmail@web90102.mail.scd.yahoo.com> Hi group, (SQLServer 2000) i've got a dts package. woow.. In it i've got a "execute task proces" This proces copies a file named switch_new.xls to switch_.xls eg switch_11052004.xls. When I run this on a local drive it works like a charm. When I run it on the server (DBA installed it for me) it doesn't work BUT it also doesn't fail. How can modify my simple script so that it creates a logfile of what it did or didn't do?! TIA .BAT-file: copy H:\SQL-SERVER_CRM\ANALYSE_PROCS\LEV_SWITCH\switch_new.xls H:\SQL-SERVER_CRM\ANALYSE_PROCS\LEV_SWITCH\switch_%1.xls Sander PS %1 is filled using a variable also created in the DTS package --------------------------------- Do you Yahoo!? Win a $20,000 Career Makeover at Yahoo! HotJobs From sqlserver667 at yahoo.com Tue May 11 01:04:01 2004 From: sqlserver667 at yahoo.com (S D) Date: Mon, 10 May 2004 23:04:01 -0700 (PDT) Subject: [dba-SQLServer] DTS websites? Message-ID: <20040511060401.73750.qmail@web90109.mail.scd.yahoo.com> Hi group, does anybody know of some GOOD websites regarding DTS programming? I've got several SQL Server books (for MCSD curiculum) and they all cover DTS....it exists. That's it, some of them cover the tasks (theoreticly) but no examples or best practices. Any tips for a DTS starter? TIA SD __________________________________ Do you Yahoo!? Win a $20,000 Career Makeover at Yahoo! HotJobs http://hotjobs.sweepstakes.yahoo.com/careermakeover From John.Maxwell2 at ntl.com Tue May 11 03:17:09 2004 From: John.Maxwell2 at ntl.com (John Maxwell @ London City) Date: Tue, 11 May 2004 09:17:09 +0100 Subject: [dba-SQLServer] DTS websites? Message-ID: Hello there, a starter myself I have found. Microsoft? SQL Server(tm) 2000 DTS Step by Step useful. Have the MCSD books also which are not a great deal of use for learning DTS. Will give you the pratical guide you are looking for rather than the how to pass the exam MCSD books. Afraid do not know any web sites Regards john > -----Original Message----- > From: S D [SMTP:sqlserver667 at yahoo.com] > Sent: 11 May 2004 07:04 > To: sqlserver667 > Subject: [dba-SQLServer] DTS websites? > > Hi group, > > does anybody know of some GOOD websites regarding DTS > programming? I've got several SQL Server books (for > MCSD curiculum) and they all cover DTS....it exists. > That's it, some of them cover the tasks (theoreticly) > but no examples or best practices. > > Any tips for a DTS starter? > > TIA > > SD > > > > > __________________________________ > Do you Yahoo!? > Win a $20,000 Career Makeover at Yahoo! HotJobs > http://hotjobs.sweepstakes.yahoo.com/careermakeover > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com The contents of this email and any attachments are sent for the personal attention of the addressee(s) only and may be confidential. If you are not the intended addressee, any use, disclosure or copying of this email and any attachments is unauthorised - please notify the sender by return and delete the message. Any representations or commitments expressed in this email are subject to contract. ntl Group Limited From sqlserver667 at yahoo.com Tue May 11 04:56:29 2004 From: sqlserver667 at yahoo.com (S D) Date: Tue, 11 May 2004 02:56:29 -0700 (PDT) Subject: [dba-SQLServer] DTS websites? In-Reply-To: Message-ID: <20040511095629.92760.qmail@web90101.mail.scd.yahoo.com> Hi John, i've got a couple of links via an ex-colleage (..spelling...) http://www.sqldts.com/ http://vyaskn.tripod.com/sql_server_dts_best_practices.htm http://www.devarticles.com HTH SD --- "John Maxwell @ London City" wrote: > Hello there, > > a starter myself I have found. > > Microsoft? SQL Server(tm) 2000 DTS Step by Step > > useful. > > Have the MCSD books also which are not a great deal > of use for learning DTS. > Will give you the pratical guide you are looking for > rather than the how to > pass the exam MCSD books. > > > Afraid do not know any web sites > > Regards > > john > > > > > > -----Original Message----- > > From: S D [SMTP:sqlserver667 at yahoo.com] > > Sent: 11 May 2004 07:04 > > To: sqlserver667 > > Subject: [dba-SQLServer] DTS websites? > > > > Hi group, > > > > does anybody know of some GOOD websites regarding > DTS > > programming? I've got several SQL Server books > (for > > MCSD curiculum) and they all cover DTS....it > exists. > > That's it, some of them cover the tasks > (theoreticly) > > but no examples or best practices. > > > > Any tips for a DTS starter? > > > > TIA > > > > SD > > > > > > > > > > __________________________________ > > Do you Yahoo!? > > Win a $20,000 Career Makeover at Yahoo! HotJobs > > > http://hotjobs.sweepstakes.yahoo.com/careermakeover > > _______________________________________________ > > dba-SQLServer mailing list > > dba-SQLServer at databaseadvisors.com > > > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > > http://www.databaseadvisors.com > > > The contents of this email and any attachments are > sent for the personal attention > of the addressee(s) only and may be confidential. > If you are not the intended > addressee, any use, disclosure or copying of this > email and any attachments is > unauthorised - please notify the sender by return > and delete the message. Any > representations or commitments expressed in this > email are subject to contract. > > ntl Group Limited > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > __________________________________ Do you Yahoo!? Win a $20,000 Career Makeover at Yahoo! HotJobs http://hotjobs.sweepstakes.yahoo.com/careermakeover From John.Maxwell2 at ntl.com Tue May 11 05:04:59 2004 From: John.Maxwell2 at ntl.com (John Maxwell @ London City) Date: Tue, 11 May 2004 11:04:59 +0100 Subject: [dba-SQLServer] DTS websites? Message-ID: Thanks for sharing, they will be useful. john > -----Original Message----- > From: S D [SMTP:sqlserver667 at yahoo.com] > Sent: 11 May 2004 10:56 > To: dba-sqlserver at databaseadvisors.com > Subject: RE: [dba-SQLServer] DTS websites? > > Hi John, > > i've got a couple of links via an ex-colleage > (..spelling...) > http://www.sqldts.com/ > http://vyaskn.tripod.com/sql_server_dts_best_practices.htm > http://www.devarticles.com > > HTH > > SD > > --- "John Maxwell @ London City" > wrote: > > Hello there, > > > > a starter myself I have found. > > > > Microsoft? SQL Server(tm) 2000 DTS Step by Step > > > > useful. > > > > Have the MCSD books also which are not a great deal > > of use for learning DTS. > > Will give you the pratical guide you are looking for > > rather than the how to > > pass the exam MCSD books. > > > > > > Afraid do not know any web sites > > > > Regards > > > > john > > > > > > > > > > > -----Original Message----- > > > From: S D [SMTP:sqlserver667 at yahoo.com] > > > Sent: 11 May 2004 07:04 > > > To: sqlserver667 > > > Subject: [dba-SQLServer] DTS websites? > > > > > > Hi group, > > > > > > does anybody know of some GOOD websites regarding > > DTS > > > programming? I've got several SQL Server books > > (for > > > MCSD curiculum) and they all cover DTS....it > > exists. > > > That's it, some of them cover the tasks > > (theoreticly) > > > but no examples or best practices. > > > > > > Any tips for a DTS starter? > > > > > > TIA > > > > > > SD > > > > > > > > > > > > > > > __________________________________ > > > Do you Yahoo!? > > > Win a $20,000 Career Makeover at Yahoo! HotJobs > > > > > http://hotjobs.sweepstakes.yahoo.com/careermakeover > > > _______________________________________________ > > > dba-SQLServer mailing list > > > dba-SQLServer at databaseadvisors.com > > > > > > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > > > http://www.databaseadvisors.com > > > > > > The contents of this email and any attachments are > > sent for the personal attention > > of the addressee(s) only and may be confidential. > > If you are not the intended > > addressee, any use, disclosure or copying of this > > email and any attachments is > > unauthorised - please notify the sender by return > > and delete the message. Any > > representations or commitments expressed in this > > email are subject to contract. > > > > ntl Group Limited > > > > _______________________________________________ > > dba-SQLServer mailing list > > dba-SQLServer at databaseadvisors.com > > > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > > http://www.databaseadvisors.com > > > > > > > > __________________________________ > Do you Yahoo!? > Win a $20,000 Career Makeover at Yahoo! HotJobs > http://hotjobs.sweepstakes.yahoo.com/careermakeover > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com The contents of this email and any attachments are sent for the personal attention of the addressee(s) only and may be confidential. If you are not the intended addressee, any use, disclosure or copying of this email and any attachments is unauthorised - please notify the sender by return and delete the message. Any representations or commitments expressed in this email are subject to contract. ntl Group Limited From mwp.reid at qub.ac.uk Wed May 12 14:35:26 2004 From: mwp.reid at qub.ac.uk (Martin Reid) Date: Wed, 12 May 2004 20:35:26 +0100 Subject: [dba-SQLServer] Strcomp References: <6B1FEFC06BC3474B8721FDAA8366810D08C9A753@ex04.eagle.usaa.com><002701c433a1$5f7f5c70$1b02a8c0@MARTINREID><409A9F78.7020801@shaw.ca><001901c433b0$344dc870$1b02a8c0@MARTINREID> <001c01c43664$b671b030$9111758f@aine> Message-ID: <000901c43858$491a62c0$1b02a8c0@MARTINREID> Is there an easy ay to recreate the following in SQL Server StrComp([tblName.fieldname],""Z"",0) Martin From HARVEYF1 at WESTAT.com Thu May 13 10:22:37 2004 From: HARVEYF1 at WESTAT.com (Francis Harvey) Date: Thu, 13 May 2004 11:22:37 -0400 Subject: [dba-SQLServer] Strcomp Message-ID: <446DDE75CFC7E1438061462F85557B0F0BFE69@remail2.westat.com> Martin, Maybe: CASE WHEN CONVERT(binary,[tblName.fieldname]) < CONVERT(binary,'Z') THEN -1 WHEN CONVERT(binary,[tblName.fieldname]) = CONVERT(binary,'Z') THEN 0 WHEN CONVERT(binary,[tblName.fieldname]) > CONVERT(binary,'Z') THEN 1 END Francis R Harvey III WB 303, (301)294-3952 harveyf1 at westat.com > -----Original Message----- > From: Martin Reid [mailto:mwp.reid at qub.ac.uk] > Sent: Wednesday, May 12, 2004 3:35 PM > To: dba-sqlserver at databaseadvisors.com > Subject: [dba-SQLServer] Strcomp > > > Is there an easy ay to recreate the following in SQL Server > > StrComp([tblName.fieldname],""Z"",0) > > > Martin > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > From MarkBoyd at McBeeAssociates.com Thu May 13 10:34:48 2004 From: MarkBoyd at McBeeAssociates.com (Mark Boyd) Date: Thu, 13 May 2004 11:34:48 -0400 Subject: [dba-SQLServer] mobsync.exe Message-ID: Employees within my company use Windows Synchronization Manager to sync data from their locally installed SQL Server to a server on the network. This seemed to be working fine until this past Monday. Now it seems that every WindowsXP machine is generating an error from Windows Synchronization Mgr indicating that it has encountered a problem and must close. I am guessing that the issue has something to do with the SQL Server on the network, and possibly Windows Updates that were applied last week. Has anyone else experienced this error? Any ideas are appreciated. Thanks, Mark Boyd Sr. Systems Analyst McBee Associates, Inc. --------------------------------------------------------------------------- Note: This message and any attachments are intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender by replying to this message, and then delete it from your system. --------------------------------------------------------------------------- From CMackin at Quiznos.com Thu May 13 10:40:21 2004 From: CMackin at Quiznos.com (Mackin, Christopher) Date: Thu, 13 May 2004 09:40:21 -0600 Subject: [dba-SQLServer] mobsync.exe Message-ID: <19F28F0B4284C04FB90CAA380451FFD94127B0@bross.quiznos.net> Not sure if this helps, but I can tell you that M$ did release a bunch of updates for XP on Monday that certain machines in my office received via Automatic Updates. -Chris Mackin -----Original Message----- From: Mark Boyd [mailto:MarkBoyd at mcbeeassociates.com] Sent: Thursday, May 13, 2004 9:35 AM To: SQLServerList Subject: [dba-SQLServer] mobsync.exe Employees within my company use Windows Synchronization Manager to sync data from their locally installed SQL Server to a server on the network. This seemed to be working fine until this past Monday. Now it seems that every WindowsXP machine is generating an error from Windows Synchronization Mgr indicating that it has encountered a problem and must close. I am guessing that the issue has something to do with the SQL Server on the network, and possibly Windows Updates that were applied last week. Has anyone else experienced this error? Any ideas are appreciated. Thanks, Mark Boyd Sr. Systems Analyst McBee Associates, Inc. --------------------------------------------------------------------------- Note: This message and any attachments are intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender by replying to this message, and then delete it from your system. --------------------------------------------------------------------------- _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From mwp.reid at qub.ac.uk Fri May 14 10:23:53 2004 From: mwp.reid at qub.ac.uk (Martin Reid) Date: Fri, 14 May 2004 16:23:53 +0100 Subject: [dba-SQLServer] Odd behaviour References: <446DDE75CFC7E1438061462F85557B0F0BFE69@remail2.westat.com> Message-ID: <000901c439c7$7714bf20$9111758f@aine> Working on a major revision to SQL Server Couple of problems still remaining. rst.Open ("Select " & argFieldName & " FROM tblDeveloperConsole") The above line when executed returns an error "Invalid Object Name" 'tblDeveloperConsole' The table is there. SPs work etc etc Am I doing something wrong in how I am trying to create the statement??? I need to pass a field name to the select at run time. Well several in fact. The var gets it value OK but the SQL Statement appears to be correct but isnt. This will be converted at some point to an SP. Martin From HARVEYF1 at WESTAT.com Fri May 14 11:02:27 2004 From: HARVEYF1 at WESTAT.com (Francis Harvey) Date: Fri, 14 May 2004 12:02:27 -0400 Subject: [dba-SQLServer] Odd behaviour Message-ID: <446DDE75CFC7E1438061462F85557B0F0BFE74@remail2.westat.com> Martin, The obligatory note, don't wait too long to turn it into an SP. Now that that's out of the way... Is the owner of the table dbo or the account that you are logging in as? Is your initial database different from the one where your table is stored? If so, you will need to use three part notation to specify your table. Francis R Harvey III WB 303, (301)294-3952 harveyf1 at westat.com > -----Original Message----- > From: Martin Reid [mailto:mwp.reid at qub.ac.uk] > Sent: Friday, May 14, 2004 11:24 AM > To: dba-sqlserver at databaseadvisors.com > Subject: [dba-SQLServer] Odd behaviour > > > Working on a major revision to SQL Server > > Couple of problems still remaining. > > rst.Open ("Select " & argFieldName & " FROM tblDeveloperConsole") > > The above line when executed returns an error "Invalid Object Name" > > 'tblDeveloperConsole' > > > The table is there. SPs work etc etc Am I doing something > wrong in how I am > trying to create the statement??? I need to pass a field name > to the select > at run time. Well several in fact. The var gets it value OK > but the SQL > Statement appears to be correct but isnt. > > This will be converted at some point to an SP. > > > Martin > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > From CMackin at Quiznos.com Fri May 14 11:09:26 2004 From: CMackin at Quiznos.com (Mackin, Christopher) Date: Fri, 14 May 2004 10:09:26 -0600 Subject: [dba-SQLServer] Odd behaviour Message-ID: <19F28F0B4284C04FB90CAA380451FFD94127B5@bross.quiznos.net> Try adding the dbo. prefix. So: rst.Open ("Select " & argFieldName & " FROM dbo.tblDeveloperConsole") Of course this is assuming that dbo created the table. -Chris Mackin -----Original Message----- From: Martin Reid [mailto:mwp.reid at qub.ac.uk] Sent: Friday, May 14, 2004 9:24 AM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] Odd behaviour Working on a major revision to SQL Server Couple of problems still remaining. rst.Open ("Select " & argFieldName & " FROM tblDeveloperConsole") The above line when executed returns an error "Invalid Object Name" 'tblDeveloperConsole' The table is there. SPs work etc etc Am I doing something wrong in how I am trying to create the statement??? I need to pass a field name to the select at run time. Well several in fact. The var gets it value OK but the SQL Statement appears to be correct but isnt. This will be converted at some point to an SP. Martin _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From mwp.reid at qub.ac.uk Fri May 14 13:08:26 2004 From: mwp.reid at qub.ac.uk (Martin Reid) Date: Fri, 14 May 2004 19:08:26 +0100 Subject: [dba-SQLServer] Odd behaviour References: <446DDE75CFC7E1438061462F85557B0F0BFE74@remail2.westat.com> Message-ID: <001101c439de$75ffae30$1b02a8c0@MARTINREID> Will give it a shot. Its a big upsize project so getting it all to work first then its all going to SPs. Martin ----- Original Message ----- From: "Francis Harvey" To: Sent: Friday, May 14, 2004 5:02 PM Subject: RE: [dba-SQLServer] Odd behaviour > Martin, > > The obligatory note, don't wait too long to turn it into an SP. Now > that that's out of the way... Is the owner of the table dbo or the > account that you are logging in as? Is your initial database different > from the one where your table is stored? If so, you will need to use > three part notation to specify your table. > > Francis R Harvey III > WB 303, (301)294-3952 > harveyf1 at westat.com > > > > -----Original Message----- > > From: Martin Reid [mailto:mwp.reid at qub.ac.uk] > > Sent: Friday, May 14, 2004 11:24 AM > > To: dba-sqlserver at databaseadvisors.com > > Subject: [dba-SQLServer] Odd behaviour > > > > > > Working on a major revision to SQL Server > > > > Couple of problems still remaining. > > > > rst.Open ("Select " & argFieldName & " FROM tblDeveloperConsole") > > > > The above line when executed returns an error "Invalid Object Name" > > > > 'tblDeveloperConsole' > > > > > > The table is there. SPs work etc etc Am I doing something > > wrong in how I am > > trying to create the statement??? I need to pass a field name > > to the select > > at run time. Well several in fact. The var gets it value OK > > but the SQL > > Statement appears to be correct but isnt. > > > > This will be converted at some point to an SP. > > > > > > Martin > > > > _______________________________________________ > > dba-SQLServer mailing list > > dba-SQLServer at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > > http://www.databaseadvisors.com > > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From my.lists at verizon.net Fri May 14 15:30:52 2004 From: my.lists at verizon.net (Francisco H Tapia) Date: Fri, 14 May 2004 13:30:52 -0700 Subject: [dba-SQLServer] Odd behaviour In-Reply-To: <446DDE75CFC7E1438061462F85557B0F0BFE74@remail2.westat.com> References: <446DDE75CFC7E1438061462F85557B0F0BFE74@remail2.westat.com> Message-ID: <40A52C7C.9050003@verizon.net> Martin, This sounds like a rights issue. I'm a bit confused on why you're using a select in this manner. By this I mean that it is generally accepted advice to NOT let users have access directly to tables. If your login does not have specific "RIGHTS" to select from a table then of course the table won't be visible. Francis Harvey wrote On 5/14/2004 9:02 AM: >Martin, > >The obligatory note, don't wait too long to turn it into an SP. Now >that that's out of the way... Is the owner of the table dbo or the >account that you are logging in as? Is your initial database different >from the one where your table is stored? If so, you will need to use >three part notation to specify your table. > >Francis R Harvey III >WB 303, (301)294-3952 >harveyf1 at westat.com > > > > >>-----Original Message----- >>From: Martin Reid [mailto:mwp.reid at qub.ac.uk] >>Sent: Friday, May 14, 2004 11:24 AM >>To: dba-sqlserver at databaseadvisors.com >>Subject: [dba-SQLServer] Odd behaviour >> >> >>Working on a major revision to SQL Server >> >>Couple of problems still remaining. >> >>rst.Open ("Select " & argFieldName & " FROM tblDeveloperConsole") >> >>The above line when executed returns an error "Invalid Object Name" >> >>'tblDeveloperConsole' >> >> >>The table is there. SPs work etc etc Am I doing something >>wrong in how I am >>trying to create the statement??? I need to pass a field name >>to the select >>at run time. Well several in fact. The var gets it value OK >>but the SQL >>Statement appears to be correct but isnt. >> >>This will be converted at some point to an SP. >> >> >>Martin >> >> >> -- -Francisco From mwp.reid at qub.ac.uk Fri May 14 15:40:38 2004 From: mwp.reid at qub.ac.uk (Martin Reid) Date: Fri, 14 May 2004 21:40:38 +0100 Subject: [dba-SQLServer] Odd behaviour References: <446DDE75CFC7E1438061462F85557B0F0BFE74@remail2.westat.com> <40A52C7C.9050003@verizon.net> Message-ID: <001801c439f3$b8a39160$1b02a8c0@MARTINREID> Francisco Got it sorted. I am testing with the SQL before moving the whole lot to SQL Server. The entire database is run by thousands of SQL Strings. I have to follow all the logic first to try and work out whats happening with most of the stuff. What calls what etc then build in the specific SQL Server Sps oncce I have worked out the logic of how it operates. Something like 50000 lines of code in this. I have many of the SPs built but cant put them in place until I am 100% sure of the logic used in the old application. What clode I can leave in the client and what I MUST move to the server. Its a fairly complicated system and theres an interface to hand held scanners which will communicate with the new SQL Server BE using XML.That should be fun when I get to that section. Its actually very interesting as this system in addition to all that has its own permissions system which has to remain outisde of SQL Server. Some parts are quite hard to get but well we learn something new every day. The main problem is that when I replace one thing another falls over etc so its tail chasing at the moment but getting there. Oh yeah and its all unbound as well. Martin ----- Original Message ----- From: "Francisco H Tapia" To: Sent: Friday, May 14, 2004 9:30 PM Subject: Re: [dba-SQLServer] Odd behaviour > Martin, > This sounds like a rights issue. I'm a bit confused on why you're > using a select in this manner. By this I mean that it is generally > accepted advice to NOT let users have access directly to tables. If > your login does not have specific "RIGHTS" to select from a table then > of course the table won't be visible. > > > > Francis Harvey wrote On 5/14/2004 9:02 AM: > > >Martin, > > > >The obligatory note, don't wait too long to turn it into an SP. Now > >that that's out of the way... Is the owner of the table dbo or the > >account that you are logging in as? Is your initial database different > >from the one where your table is stored? If so, you will need to use > >three part notation to specify your table. > > > >Francis R Harvey III > >WB 303, (301)294-3952 > >harveyf1 at westat.com > > > > > > > > > >>-----Original Message----- > >>From: Martin Reid [mailto:mwp.reid at qub.ac.uk] > >>Sent: Friday, May 14, 2004 11:24 AM > >>To: dba-sqlserver at databaseadvisors.com > >>Subject: [dba-SQLServer] Odd behaviour > >> > >> > >>Working on a major revision to SQL Server > >> > >>Couple of problems still remaining. > >> > >>rst.Open ("Select " & argFieldName & " FROM tblDeveloperConsole") > >> > >>The above line when executed returns an error "Invalid Object Name" > >> > >>'tblDeveloperConsole' > >> > >> > >>The table is there. SPs work etc etc Am I doing something > >>wrong in how I am > >>trying to create the statement??? I need to pass a field name > >>to the select > >>at run time. Well several in fact. The var gets it value OK > >>but the SQL > >>Statement appears to be correct but isnt. > >> > >>This will be converted at some point to an SP. > >> > >> > >>Martin > >> > >> > >> > -- > -Francisco > > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From cfoust at infostatsystems.com Fri May 14 16:08:15 2004 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Fri, 14 May 2004 14:08:15 -0700 Subject: [dba-SQLServer] Odd behaviour Message-ID: All unbound? *My* kind of database! Charlotte Foust -----Original Message----- From: Martin Reid [mailto:mwp.reid at qub.ac.uk] Sent: Friday, May 14, 2004 12:41 PM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] Odd behaviour Francisco Got it sorted. I am testing with the SQL before moving the whole lot to SQL Server. The entire database is run by thousands of SQL Strings. I have to follow all the logic first to try and work out whats happening with most of the stuff. What calls what etc then build in the specific SQL Server Sps oncce I have worked out the logic of how it operates. Something like 50000 lines of code in this. I have many of the SPs built but cant put them in place until I am 100% sure of the logic used in the old application. What clode I can leave in the client and what I MUST move to the server. Its a fairly complicated system and theres an interface to hand held scanners which will communicate with the new SQL Server BE using XML.That should be fun when I get to that section. Its actually very interesting as this system in addition to all that has its own permissions system which has to remain outisde of SQL Server. Some parts are quite hard to get but well we learn something new every day. The main problem is that when I replace one thing another falls over etc so its tail chasing at the moment but getting there. Oh yeah and its all unbound as well. Martin ----- Original Message ----- From: "Francisco H Tapia" To: Sent: Friday, May 14, 2004 9:30 PM Subject: Re: [dba-SQLServer] Odd behaviour > Martin, > This sounds like a rights issue. I'm a bit confused on why you're > using a select in this manner. By this I mean that it is generally > accepted advice to NOT let users have access directly to tables. If > your login does not have specific "RIGHTS" to select from a table then > of course the table won't be visible. > > > > Francis Harvey wrote On 5/14/2004 9:02 AM: > > >Martin, > > > >The obligatory note, don't wait too long to turn it into an SP. Now > >that that's out of the way... Is the owner of the table dbo or the > >account that you are logging in as? Is your initial database > >different from the one where your table is stored? If so, you will > >need to use three part notation to specify your table. > > > >Francis R Harvey III > >WB 303, (301)294-3952 > >harveyf1 at westat.com > > > > > > > > > >>-----Original Message----- > >>From: Martin Reid [mailto:mwp.reid at qub.ac.uk] > >>Sent: Friday, May 14, 2004 11:24 AM > >>To: dba-sqlserver at databaseadvisors.com > >>Subject: [dba-SQLServer] Odd behaviour > >> > >> > >>Working on a major revision to SQL Server > >> > >>Couple of problems still remaining. > >> > >>rst.Open ("Select " & argFieldName & " FROM tblDeveloperConsole") > >> > >>The above line when executed returns an error "Invalid Object Name" > >> > >>'tblDeveloperConsole' > >> > >> > >>The table is there. SPs work etc etc Am I doing something wrong in > >>how I am trying to create the statement??? I need to pass a field > >>name to the select > >>at run time. Well several in fact. The var gets it value OK > >>but the SQL > >>Statement appears to be correct but isnt. > >> > >>This will be converted at some point to an SP. > >> > >> > >>Martin > >> > >> > >> > -- > -Francisco > > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From mwp.reid at qub.ac.uk Fri May 14 16:10:48 2004 From: mwp.reid at qub.ac.uk (Martin Reid) Date: Fri, 14 May 2004 22:10:48 +0100 Subject: [dba-SQLServer] Odd behaviour References: Message-ID: <000f01c439f7$ef6167a0$1b02a8c0@MARTINREID> LOL Martin ----- Original Message ----- From: "Charlotte Foust" To: Sent: Friday, May 14, 2004 10:08 PM Subject: RE: [dba-SQLServer] Odd behaviour > All unbound? *My* kind of database! > > Charlotte Foust > > -----Original Message----- > From: Martin Reid [mailto:mwp.reid at qub.ac.uk] > Sent: Friday, May 14, 2004 12:41 PM > To: dba-sqlserver at databaseadvisors.com > Subject: Re: [dba-SQLServer] Odd behaviour > > > Francisco > > Got it sorted. I am testing with the SQL before moving the whole lot to > SQL Server. The entire database is run by thousands of SQL Strings. I > have to follow all the logic first to try and work out whats happening > with most of the stuff. What calls what etc then build in the specific > SQL Server Sps oncce I have worked out the logic of how it operates. > Something like 50000 lines of code in this. I have many of the SPs built > but cant put them in place until I am 100% sure of the logic used in the > old application. What clode I can leave in the client and what I MUST > move to the server. Its a fairly complicated system and theres an > interface to hand held scanners which will communicate with the new SQL > Server BE using XML.That should be fun when I get to that section. Its > actually very interesting as this system in addition to all that has its > own permissions system which has to remain outisde of SQL Server. Some > parts are quite hard to get but well we learn something new every day. > > The main problem is that when I replace one thing another falls over etc > so its tail chasing at the moment but getting there. > > Oh yeah and its all unbound as well. > > Martin > > > > > > ----- Original Message ----- > From: "Francisco H Tapia" > To: > Sent: Friday, May 14, 2004 9:30 PM > Subject: Re: [dba-SQLServer] Odd behaviour > > > > Martin, > > This sounds like a rights issue. I'm a bit confused on why you're > > using a select in this manner. By this I mean that it is generally > > accepted advice to NOT let users have access directly to tables. If > > your login does not have specific "RIGHTS" to select from a table then > > > of course the table won't be visible. > > > > > > > > Francis Harvey wrote On 5/14/2004 9:02 AM: > > > > >Martin, > > > > > >The obligatory note, don't wait too long to turn it into an SP. Now > > >that that's out of the way... Is the owner of the table dbo or the > > >account that you are logging in as? Is your initial database > > >different from the one where your table is stored? If so, you will > > >need to use three part notation to specify your table. > > > > > >Francis R Harvey III > > >WB 303, (301)294-3952 > > >harveyf1 at westat.com > > > > > > > > > > > > > > >>-----Original Message----- > > >>From: Martin Reid [mailto:mwp.reid at qub.ac.uk] > > >>Sent: Friday, May 14, 2004 11:24 AM > > >>To: dba-sqlserver at databaseadvisors.com > > >>Subject: [dba-SQLServer] Odd behaviour > > >> > > >> > > >>Working on a major revision to SQL Server > > >> > > >>Couple of problems still remaining. > > >> > > >>rst.Open ("Select " & argFieldName & " FROM tblDeveloperConsole") > > >> > > >>The above line when executed returns an error "Invalid Object Name" > > >> > > >>'tblDeveloperConsole' > > >> > > >> > > >>The table is there. SPs work etc etc Am I doing something wrong in > > >>how I am trying to create the statement??? I need to pass a field > > >>name to the select > > >>at run time. Well several in fact. The var gets it value OK > > >>but the SQL > > >>Statement appears to be correct but isnt. > > >> > > >>This will be converted at some point to an SP. > > >> > > >> > > >>Martin > > >> > > >> > > >> > > -- > > -Francisco > > > > > > _______________________________________________ > > dba-SQLServer mailing list > > dba-SQLServer at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > > http://www.databaseadvisors.com > > > > > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From my.lists at verizon.net Fri May 14 16:18:24 2004 From: my.lists at verizon.net (Francisco H Tapia) Date: Fri, 14 May 2004 14:18:24 -0700 Subject: [dba-SQLServer] Odd behaviour In-Reply-To: References: Message-ID: <40A537A0.9020002@verizon.net> there's nothing wrong w/ unbound, in fact w/ an ADP or if you're working w/ an MDB and Sql Server, unbound is imnsho the way to go :D ... i think colby is asleep ;o) Charlotte Foust wrote On 5/14/2004 2:08 PM: >All unbound? *My* kind of database! > >Charlotte Foust > >-----Original Message----- >From: Martin Reid [mailto:mwp.reid at qub.ac.uk] >Sent: Friday, May 14, 2004 12:41 PM >To: dba-sqlserver at databaseadvisors.com >Subject: Re: [dba-SQLServer] Odd behaviour > > >Francisco > >Got it sorted. I am testing with the SQL before moving the whole lot to >SQL Server. The entire database is run by thousands of SQL Strings. I >have to follow all the logic first to try and work out whats happening >with most of the stuff. What calls what etc then build in the specific >SQL Server Sps oncce I have worked out the logic of how it operates. >Something like 50000 lines of code in this. I have many of the SPs built >but cant put them in place until I am 100% sure of the logic used in the >old application. What clode I can leave in the client and what I MUST >move to the server. Its a fairly complicated system and theres an >interface to hand held scanners which will communicate with the new SQL >Server BE using XML.That should be fun when I get to that section. Its >actually very interesting as this system in addition to all that has its >own permissions system which has to remain outisde of SQL Server. Some >parts are quite hard to get but well we learn something new every day. > >The main problem is that when I replace one thing another falls over etc >so its tail chasing at the moment but getting there. > >Oh yeah and its all unbound as well. > >Martin > > > > > >----- Original Message ----- >From: "Francisco H Tapia" >To: >Sent: Friday, May 14, 2004 9:30 PM >Subject: Re: [dba-SQLServer] Odd behaviour > > > > >>Martin, >> This sounds like a rights issue. I'm a bit confused on why you're >>using a select in this manner. By this I mean that it is generally >>accepted advice to NOT let users have access directly to tables. If >>your login does not have specific "RIGHTS" to select from a table then >> >> > > > >>of course the table won't be visible. >> >> >> >>Francis Harvey wrote On 5/14/2004 9:02 AM: >> >> >> >>>Martin, >>> >>>The obligatory note, don't wait too long to turn it into an SP. Now >>>that that's out of the way... Is the owner of the table dbo or the >>>account that you are logging in as? Is your initial database >>>different from the one where your table is stored? If so, you will >>>need to use three part notation to specify your table. >>> >>>Francis R Harvey III >>>WB 303, (301)294-3952 >>>harveyf1 at westat.com >>> >>> >>> >>> >>> >>> >>>>-----Original Message----- >>>>From: Martin Reid [mailto:mwp.reid at qub.ac.uk] >>>>Sent: Friday, May 14, 2004 11:24 AM >>>>To: dba-sqlserver at databaseadvisors.com >>>>Subject: [dba-SQLServer] Odd behaviour >>>> >>>> >>>>Working on a major revision to SQL Server >>>> >>>>Couple of problems still remaining. >>>> >>>>rst.Open ("Select " & argFieldName & " FROM tblDeveloperConsole") >>>> >>>>The above line when executed returns an error "Invalid Object Name" >>>> >>>>'tblDeveloperConsole' >>>> >>>> >>>>The table is there. SPs work etc etc Am I doing something wrong in >>>>how I am trying to create the statement??? I need to pass a field >>>>name to the select >>>>at run time. Well several in fact. The var gets it value OK >>>>but the SQL >>>>Statement appears to be correct but isnt. >>>> >>>>This will be converted at some point to an SP. >>>> >>>> >>>>Martin >>>> >>>> >>>> >>>> >>>> -- -Francisco From cfoust at infostatsystems.com Fri May 14 18:59:29 2004 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Fri, 14 May 2004 16:59:29 -0700 Subject: [dba-SQLServer] Odd behaviour Message-ID: Shhh! Let's not wake him. He gets *so* cranky ... Charlotte Foust -----Original Message----- From: Francisco H Tapia [mailto:my.lists at verizon.net] Sent: Friday, May 14, 2004 1:18 PM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] Odd behaviour there's nothing wrong w/ unbound, in fact w/ an ADP or if you're working w/ an MDB and Sql Server, unbound is imnsho the way to go :D ... i think colby is asleep ;o) Charlotte Foust wrote On 5/14/2004 2:08 PM: >All unbound? *My* kind of database! > >Charlotte Foust > >-----Original Message----- >From: Martin Reid [mailto:mwp.reid at qub.ac.uk] >Sent: Friday, May 14, 2004 12:41 PM >To: dba-sqlserver at databaseadvisors.com >Subject: Re: [dba-SQLServer] Odd behaviour > > >Francisco > >Got it sorted. I am testing with the SQL before moving the whole lot to >SQL Server. The entire database is run by thousands of SQL Strings. I >have to follow all the logic first to try and work out whats happening >with most of the stuff. What calls what etc then build in the specific >SQL Server Sps oncce I have worked out the logic of how it operates. >Something like 50000 lines of code in this. I have many of the SPs >built but cant put them in place until I am 100% sure of the logic used >in the old application. What clode I can leave in the client and what I >MUST move to the server. Its a fairly complicated system and theres an >interface to hand held scanners which will communicate with the new SQL >Server BE using XML.That should be fun when I get to that section. Its >actually very interesting as this system in addition to all that has >its own permissions system which has to remain outisde of SQL Server. >Some parts are quite hard to get but well we learn something new every >day. > >The main problem is that when I replace one thing another falls over >etc so its tail chasing at the moment but getting there. > >Oh yeah and its all unbound as well. > >Martin > > > > > >----- Original Message ----- >From: "Francisco H Tapia" >To: >Sent: Friday, May 14, 2004 9:30 PM >Subject: Re: [dba-SQLServer] Odd behaviour > > > > >>Martin, >> This sounds like a rights issue. I'm a bit confused on why you're >>using a select in this manner. By this I mean that it is generally >>accepted advice to NOT let users have access directly to tables. If >>your login does not have specific "RIGHTS" to select from a table then >> >> > > > >>of course the table won't be visible. >> >> >> >>Francis Harvey wrote On 5/14/2004 9:02 AM: >> >> >> >>>Martin, >>> >>>The obligatory note, don't wait too long to turn it into an SP. Now >>>that that's out of the way... Is the owner of the table dbo or the >>>account that you are logging in as? Is your initial database >>>different from the one where your table is stored? If so, you will >>>need to use three part notation to specify your table. >>> >>>Francis R Harvey III >>>WB 303, (301)294-3952 >>>harveyf1 at westat.com >>> >>> >>> >>> >>> >>> >>>>-----Original Message----- >>>>From: Martin Reid [mailto:mwp.reid at qub.ac.uk] >>>>Sent: Friday, May 14, 2004 11:24 AM >>>>To: dba-sqlserver at databaseadvisors.com >>>>Subject: [dba-SQLServer] Odd behaviour >>>> >>>> >>>>Working on a major revision to SQL Server >>>> >>>>Couple of problems still remaining. >>>> >>>>rst.Open ("Select " & argFieldName & " FROM tblDeveloperConsole") >>>> >>>>The above line when executed returns an error "Invalid Object Name" >>>> >>>>'tblDeveloperConsole' >>>> >>>> >>>>The table is there. SPs work etc etc Am I doing something wrong in >>>>how I am trying to create the statement??? I need to pass a field >>>>name to the select >>>>at run time. Well several in fact. The var gets it value OK >>>>but the SQL >>>>Statement appears to be correct but isnt. >>>> >>>>This will be converted at some point to an SP. >>>> >>>> >>>>Martin >>>> >>>> >>>> >>>> >>>> -- -Francisco _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Sun May 16 10:14:54 2004 From: jwcolby at colbyconsulting.com (John W. Colby) Date: Sun, 16 May 2004 11:14:54 -0400 Subject: [dba-SQLServer] Odd behaviour In-Reply-To: <40A537A0.9020002@verizon.net> Message-ID: I NEVER sleep, I have two kids 3 and 11 months. John W. Colby www.ColbyConsulting.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Francisco H Tapia Sent: Friday, May 14, 2004 5:18 PM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] Odd behaviour there's nothing wrong w/ unbound, in fact w/ an ADP or if you're working w/ an MDB and Sql Server, unbound is imnsho the way to go :D ... i think colby is asleep ;o) Charlotte Foust wrote On 5/14/2004 2:08 PM: >All unbound? *My* kind of database! > >Charlotte Foust > >-----Original Message----- >From: Martin Reid [mailto:mwp.reid at qub.ac.uk] >Sent: Friday, May 14, 2004 12:41 PM >To: dba-sqlserver at databaseadvisors.com >Subject: Re: [dba-SQLServer] Odd behaviour > > >Francisco > >Got it sorted. I am testing with the SQL before moving the whole lot to >SQL Server. The entire database is run by thousands of SQL Strings. I >have to follow all the logic first to try and work out whats happening >with most of the stuff. What calls what etc then build in the specific >SQL Server Sps oncce I have worked out the logic of how it operates. >Something like 50000 lines of code in this. I have many of the SPs built >but cant put them in place until I am 100% sure of the logic used in the >old application. What clode I can leave in the client and what I MUST >move to the server. Its a fairly complicated system and theres an >interface to hand held scanners which will communicate with the new SQL >Server BE using XML.That should be fun when I get to that section. Its >actually very interesting as this system in addition to all that has its >own permissions system which has to remain outisde of SQL Server. Some >parts are quite hard to get but well we learn something new every day. > >The main problem is that when I replace one thing another falls over etc >so its tail chasing at the moment but getting there. > >Oh yeah and its all unbound as well. > >Martin > > > > > >----- Original Message ----- >From: "Francisco H Tapia" >To: >Sent: Friday, May 14, 2004 9:30 PM >Subject: Re: [dba-SQLServer] Odd behaviour > > > > >>Martin, >> This sounds like a rights issue. I'm a bit confused on why you're >>using a select in this manner. By this I mean that it is generally >>accepted advice to NOT let users have access directly to tables. If >>your login does not have specific "RIGHTS" to select from a table then >> >> > > > >>of course the table won't be visible. >> >> >> >>Francis Harvey wrote On 5/14/2004 9:02 AM: >> >> >> >>>Martin, >>> >>>The obligatory note, don't wait too long to turn it into an SP. Now >>>that that's out of the way... Is the owner of the table dbo or the >>>account that you are logging in as? Is your initial database >>>different from the one where your table is stored? If so, you will >>>need to use three part notation to specify your table. >>> >>>Francis R Harvey III >>>WB 303, (301)294-3952 >>>harveyf1 at westat.com >>> >>> >>> >>> >>> >>> >>>>-----Original Message----- >>>>From: Martin Reid [mailto:mwp.reid at qub.ac.uk] >>>>Sent: Friday, May 14, 2004 11:24 AM >>>>To: dba-sqlserver at databaseadvisors.com >>>>Subject: [dba-SQLServer] Odd behaviour >>>> >>>> >>>>Working on a major revision to SQL Server >>>> >>>>Couple of problems still remaining. >>>> >>>>rst.Open ("Select " & argFieldName & " FROM tblDeveloperConsole") >>>> >>>>The above line when executed returns an error "Invalid Object Name" >>>> >>>>'tblDeveloperConsole' >>>> >>>> >>>>The table is there. SPs work etc etc Am I doing something wrong in >>>>how I am trying to create the statement??? I need to pass a field >>>>name to the select >>>>at run time. Well several in fact. The var gets it value OK >>>>but the SQL >>>>Statement appears to be correct but isnt. >>>> >>>>This will be converted at some point to an SP. >>>> >>>> >>>>Martin >>>> >>>> >>>> >>>> >>>> -- -Francisco _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From my.lists at verizon.net Mon May 17 10:00:35 2004 From: my.lists at verizon.net (Francisco H Tapia) Date: Mon, 17 May 2004 08:00:35 -0700 Subject: [dba-SQLServer] Odd behaviour In-Reply-To: References: Message-ID: <40A8D393.7070408@verizon.net> just poking a stick at ya ;o) John W. Colby wrote On 5/16/2004 8:14 AM: >I NEVER sleep, I have two kids 3 and 11 months. > >John W. Colby >www.ColbyConsulting.com > >-----Original Message----- >From: dba-sqlserver-bounces at databaseadvisors.com >[mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of >Francisco H Tapia >Sent: Friday, May 14, 2004 5:18 PM >To: dba-sqlserver at databaseadvisors.com >Subject: Re: [dba-SQLServer] Odd behaviour > > >there's nothing wrong w/ unbound, in fact w/ an ADP or if you're working >w/ an MDB and Sql Server, unbound is imnsho the way to go :D > >... i think colby is asleep ;o) > >Charlotte Foust wrote On 5/14/2004 2:08 PM: > > > >>All unbound? *My* kind of database! >> >>Charlotte Foust >> >>-----Original Message----- >>From: Martin Reid [mailto:mwp.reid at qub.ac.uk] >>Sent: Friday, May 14, 2004 12:41 PM >>To: dba-sqlserver at databaseadvisors.com >>Subject: Re: [dba-SQLServer] Odd behaviour >> >> >>Francisco >> >>Got it sorted. I am testing with the SQL before moving the whole lot to >>SQL Server. The entire database is run by thousands of SQL Strings. I >>have to follow all the logic first to try and work out whats happening >>with most of the stuff. What calls what etc then build in the specific >>SQL Server Sps oncce I have worked out the logic of how it operates. >>Something like 50000 lines of code in this. I have many of the SPs built >>but cant put them in place until I am 100% sure of the logic used in the >>old application. What clode I can leave in the client and what I MUST >>move to the server. Its a fairly complicated system and theres an >>interface to hand held scanners which will communicate with the new SQL >>Server BE using XML.That should be fun when I get to that section. Its >>actually very interesting as this system in addition to all that has its >>own permissions system which has to remain outisde of SQL Server. Some >>parts are quite hard to get but well we learn something new every day. >> >>The main problem is that when I replace one thing another falls over etc >>so its tail chasing at the moment but getting there. >> >>Oh yeah and its all unbound as well. >> >>Martin >> >> >> >> >> >>----- Original Message ----- >>From: "Francisco H Tapia" >>To: >>Sent: Friday, May 14, 2004 9:30 PM >>Subject: Re: [dba-SQLServer] Odd behaviour >> >> >> >> >> >> >>>Martin, >>> This sounds like a rights issue. I'm a bit confused on why you're >>>using a select in this manner. By this I mean that it is generally >>>accepted advice to NOT let users have access directly to tables. If >>>your login does not have specific "RIGHTS" to select from a table then >>> >>> >>> >>> >> >> >> >> >>>of course the table won't be visible. >>> >>> >>> >>>Francis Harvey wrote On 5/14/2004 9:02 AM: >>> >>> >>> >>> >>> >>>>Martin, >>>> >>>>The obligatory note, don't wait too long to turn it into an SP. Now >>>>that that's out of the way... Is the owner of the table dbo or the >>>>account that you are logging in as? Is your initial database >>>>different from the one where your table is stored? If so, you will >>>>need to use three part notation to specify your table. >>>> >>>>Francis R Harvey III >>>>WB 303, (301)294-3952 >>>>harveyf1 at westat.com >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>>>-----Original Message----- >>>>>From: Martin Reid [mailto:mwp.reid at qub.ac.uk] >>>>>Sent: Friday, May 14, 2004 11:24 AM >>>>>To: dba-sqlserver at databaseadvisors.com >>>>>Subject: [dba-SQLServer] Odd behaviour >>>>> >>>>> >>>>>Working on a major revision to SQL Server >>>>> >>>>>Couple of problems still remaining. >>>>> >>>>>rst.Open ("Select " & argFieldName & " FROM tblDeveloperConsole") >>>>> >>>>>The above line when executed returns an error "Invalid Object Name" >>>>> >>>>>'tblDeveloperConsole' >>>>> >>>>> >>>>>The table is there. SPs work etc etc Am I doing something wrong in >>>>>how I am trying to create the statement??? I need to pass a field >>>>>name to the select >>>>>at run time. Well several in fact. The var gets it value OK >>>>>but the SQL >>>>>Statement appears to be correct but isnt. >>>>> >>>>>This will be converted at some point to an SP. >>>>> >>>>> >>>>>Martin >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> -- -Francisco From mwp.reid at qub.ac.uk Mon May 17 16:25:29 2004 From: mwp.reid at qub.ac.uk (Martin Reid) Date: Mon, 17 May 2004 22:25:29 +0100 Subject: [dba-SQLServer] Local Tables References: <446DDE75CFC7E1438061462F85557B0F0BFE69@remail2.westat.com> Message-ID: <000b01c43c55$7b7505d0$1b02a8c0@MARTINREID> I need to do a multi table select from SQL Server and Insert the resulting data into 10 linked Access MDBs. Never tried this before. Any ideas? Martin From mikedorism at adelphia.net Tue May 18 06:42:26 2004 From: mikedorism at adelphia.net (Mike & Doris Manning) Date: Tue, 18 May 2004 07:42:26 -0400 Subject: [dba-SQLServer] Local Tables In-Reply-To: <000b01c43c55$7b7505d0$1b02a8c0@MARTINREID> Message-ID: <000001c43ccd$314a4650$cc0aa845@hargrove.internal> Create a Local DTS package. Set up the first DTS Export task. Then make copies of that task and change what needs to be changed for the other 9 MDBs. Then link the tasks together using On Completion arrows so that they fire one after the other. Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Martin Reid Sent: Monday, May 17, 2004 5:25 PM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] Local Tables I need to do a multi table select from SQL Server and Insert the resulting data into 10 linked Access MDBs. Never tried this before. Any ideas? Martin _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From MarkBoyd at McBeeAssociates.com Tue May 18 11:45:21 2004 From: MarkBoyd at McBeeAssociates.com (Mark Boyd) Date: Tue, 18 May 2004 12:45:21 -0400 Subject: [dba-SQLServer] Filtered Articles: join_unique_key Message-ID: I'm using join filters with merge replication, and have been advised to use the 'join_unique_key' property for best article performance. Any idea where I can set this property? Thanks, Mark Boyd Sr. Systems Analyst McBee Associates, Inc. --------------------------------------------------------------------------- Note: This message and any attachments are intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender by replying to this message, and then delete it from your system. --------------------------------------------------------------------------- From mwp.reid at qub.ac.uk Tue May 18 15:14:33 2004 From: mwp.reid at qub.ac.uk (Martin Reid) Date: Tue, 18 May 2004 21:14:33 +0100 Subject: [dba-SQLServer] Interesting article References: Message-ID: <002701c43d14$bceb6440$1b02a8c0@MARTINREID> I had to create many SPs for a system I am working on. This helped out no end and it was free. http://msdn.microsoft.com/msdnmag/issues/03/04/StoredProcedures/default.aspx Martin From artful at rogers.com Thu May 20 18:08:14 2004 From: artful at rogers.com (Arthur Fuller) Date: Thu, 20 May 2004 19:08:14 -0400 Subject: [dba-SQLServer] SQL Question In-Reply-To: <002001c4283f$8b44d050$9111758f@aine> Message-ID: <087c01c43ebf$5442dc00$6601a8c0@rock> If you haven't yet an answer to this, I have a function that gathers and concatenates the rows matching a particlar foreign key, which looks like what you need. I published it as a SQL Tip a while back on the builder.com site but if you still need it msg me and I'll fire you a copy. Arthur -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Martin Reid Sent: Thursday, April 22, 2004 3:58 AM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] SQL Question Given a one to many relationship is it possible to produce this output using an SP without the use of cursors etc?? INPUT TABLE 1 1000 IT 1000 Databases 1000 VMS 1001 Spreadsheets 1001 GenStat 1002 Aquatic systems 1002 Research INPUT TABLE 2 1000 Smith 1001 Brown 1002 Foster OUTPUT REQUIRED 1000 Smith IT, Databases,VMS 1001 Brown Spreadsheets,GenStat 1002 Foster Aquatic Systems,Research Martin _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From artful at rogers.com Thu May 20 18:12:21 2004 From: artful at rogers.com (Arthur Fuller) Date: Thu, 20 May 2004 19:12:21 -0400 Subject: [dba-SQLServer] Backup In-Reply-To: <001901c433b0$344dc870$1b02a8c0@MARTINREID> Message-ID: <087d01c43ebf$e7321030$6601a8c0@rock> I've written something like this but would happily view yours and steal its best parts :) -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Martin Reid Sent: Thursday, May 06, 2004 5:22 PM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] Backup Thanks Marty Anyone want this when I have written it let me know. In theory It will allow User to select db to back up Select local folder Select network folder Backup to both locations Name the backup file with the db name plus the date and time of backup of course have to do the reverse and allow them to restore as well. Martin ----- Original Message ----- From: "MartyConnelly" To: Sent: Thursday, May 06, 2004 9:26 PM Subject: Re: [dba-SQLServer] Backup > Here is VB6 source code to do a lot of these procedures via SQL-DMO > from Andrea Montanari's DBAMGR MSDE SQL Server Manager tool. > http://www.asql.biz/DbaMgr.shtm In case you get lost in the Italian > Look for DbaMgr2k 0.7.0 # 26/03/2004 (832kb) VB source download, free > but need to register > You might want to give the full package a whirl. > > > > Martin Reid wrote: > > >Problem is I have to use an Access form and let the suer > > > >1. Select db to back up > >2. Select a folder for the backup both local and network > >3. Name the backup with teh date and time it occured > > > >Of course I also have to do a restore form these files as well. All > >in the > >access interface. > > > >Martin > > > > > > > >----- Original Message ----- > >From: "Djabarov, Robert" > >To: > >Sent: Thursday, May 06, 2004 7:17 PM > >Subject: RE: [dba-SQLServer] Backup > > > > > > > > > >>Create a stored procedure (wrapper) that does the backup, and call > >>it with pass-through query from Access. > >> > >>Robert Djabarov > >>SQL Server & UDB > >>Sr. SQL Server Administrator > >>Phone: (210) 913-3148 > >>Pager: (210) 753-3148 > >>9800 Fredericksburg Rd. San Antonio, TX 78288 > >>www.usaa.com > >> > >>-----Original Message----- > >>From: dba-sqlserver-bounces at databaseadvisors.com > >>[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of > >>Martin Reid > >>Sent: Thursday, May 06, 2004 12:33 PM > >>To: dba-sqlserver at databaseadvisors.com > >>Subject: [dba-SQLServer] Backup > >> > >>no response to the request re backing up SQL Server via Access > >>-anyone any examples? > >> > >> > >>Martin > >> > >>_______________________________________________ > >>dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com > >>http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > >>http://www.databaseadvisors.com > >> > >>_______________________________________________ > >>dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com > >>http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > >>http://www.databaseadvisors.com > >> > >> > >> > >> > > > >_______________________________________________ > >dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com > >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > >http://www.databaseadvisors.com > > > > > > > > > > -- > Marty Connelly > Victoria, B.C. > Canada > > > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From artful at rogers.com Thu May 20 18:13:36 2004 From: artful at rogers.com (Arthur Fuller) Date: Thu, 20 May 2004 19:13:36 -0400 Subject: [dba-SQLServer] Views In-Reply-To: <000901c433b2$b3f6d5b0$1b02a8c0@MARTINREID> Message-ID: <088101c43ec0$14696170$6601a8c0@rock> The implication is that you're going MDB->ODBC->SQL. Correct? Editing and executing views is no problem in ADP. Just checking to be sure.... -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Martin Reid Sent: Thursday, May 06, 2004 5:40 PM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] Views I am looking at views in Access View is on SQL Server Works well. On edit the record works and all is well. Saves ok. On second edit the ODBC call fails? Any comments? Martin _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From artful at rogers.com Thu May 20 18:19:57 2004 From: artful at rogers.com (Arthur Fuller) Date: Thu, 20 May 2004 19:19:57 -0400 Subject: [dba-SQLServer] List Box values to SP In-Reply-To: <006301c434e2$716a9480$1b02a8c0@MARTINREID> Message-ID: <088301c43ec0$f726bad0$6601a8c0@rock> In my SQL Tips column at builder.com I did this one too. You really ought to read my stuff, Martin (nudge, nudge, wink, wink). What I wrote is a function that returns a table from an input string consisting of a sequence of comma-delimited values. Data type is unimportant, since it takes advantage of SQL's ability to handle quotes around any value (i.e. "Balance = 12345" = "Balance = '12345'"). If you want the code, msg me. Sorry for the late response, but I've been buried under a mountain of work lately. Arthur -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Martin Reid Sent: Saturday, May 08, 2004 5:54 AM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] List Box values to SP I need to pass the values from a list box in Access to a stored procedure which does a multi table insert.Unless of course theres a better way to do this? Martin _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From davide at dalyn.co.nz Mon May 24 17:59:08 2004 From: davide at dalyn.co.nz (David Emerson) Date: Tue, 25 May 2004 10:59:08 +1200 Subject: [dba-SQLServer] varchar limits Message-ID: <5.2.0.9.0.20040525105708.00b2b440@mail.dalyn.co.nz> SQL2000. I have the following declaration in a stored procedure - declare @qs varchar(8000) However, when I assign a string to the variable it seems to truncate at 4000 characters. My understanding is that varchar can have up to 8000 characters. Is there something I am missing? Regards David Emerson Dalyn Software Ltd 25 Cunliffe St, Churton Park Wellington, New Zealand Ph/Fax (04) 478-7456 Mobile 027-280-9348 From davide at dalyn.co.nz Mon May 24 19:42:17 2004 From: davide at dalyn.co.nz (David Emerson) Date: Tue, 25 May 2004 12:42:17 +1200 Subject: [dba-SQLServer] varchar limits In-Reply-To: <5.2.0.9.0.20040525105708.00b2b440@mail.dalyn.co.nz> Message-ID: <5.2.0.9.0.20040525124058.00b2b630@mail.dalyn.co.nz> Found the problem - I had a CAST(@txtAct2yyyymm AS nvarchar(6)) which must have converte dthe whole variable to nvarchar. Changing it to varchar solved it. David At 25/05/2004, you wrote: >SQL2000. > >I have the following declaration in a stored procedure - > > declare @qs varchar(8000) > >However, when I assign a string to the variable it seems to truncate at >4000 characters. My understanding is that varchar can have up to 8000 >characters. Is there something I am missing? > >Regards > >David Emerson >Dalyn Software Ltd >25 Cunliffe St, Churton Park >Wellington, New Zealand >Ph/Fax (04) 478-7456 >Mobile 027-280-9348 _______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > > Regards David Emerson Dalyn Software Ltd 25 Cunliffe St, Churton Park Wellington, New Zealand Ph/Fax (04) 478-7456 Mobile 027-280-9348 From stuart at lexacorp.com.pg Mon May 24 19:18:25 2004 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Tue, 25 May 2004 10:18:25 +1000 Subject: [dba-SQLServer] varchar limits In-Reply-To: <5.2.0.9.0.20040525105708.00b2b440@mail.dalyn.co.nz> Message-ID: <40B31D71.15338.927C1F@localhost> On 25 May 2004 at 10:59, David Emerson wrote: > SQL2000. > > I have the following declaration in a stored procedure - > > declare @qs varchar(8000) > > However, when I assign a string to the variable it seems to truncate at > 4000 characters. My understanding is that varchar can have up to 8000 > characters. Is there something I am missing? > Where are you passing the string from? Is the string unicode (which users two bytes per character)? If so, you may be getting an implicit conversion to nvarchar. -- Lexacorp Ltd http://www.lexacorp.com.pg Information Technology Consultancy, Software Development,System Support. From my.lists at verizon.net Tue May 25 14:44:15 2004 From: my.lists at verizon.net (Francisco H Tapia) Date: Tue, 25 May 2004 12:44:15 -0700 Subject: [dba-SQLServer] Top two of each group Message-ID: <40B3A20F.3070000@verizon.net> I have a little select statement, which gives me a grouping of Model1 Frame and Week1 Model1 Frame and week2 Model1 Frame and Week3 Model2 Frame and Week1 Model2 Frame and week2 Model2 Frame and Week3 Model2 Frame and Week3 Model3 Frame and week2 Model3 Frame and Week3 ... etc I'm blanking out on collecting the TOP 2 of each model, instead of seeing the entire model list, How would one just collect the TOP two of each model type? I can think of how to do this in a cursor, but I'd like to avoid that if at all possible. -- -Francisco From artful at rogers.com Wed May 26 06:41:59 2004 From: artful at rogers.com (Arthur Fuller) Date: Wed, 26 May 2004 07:41:59 -0400 Subject: [dba-SQLServer] Top two of each group In-Reply-To: <40B3A20F.3070000@verizon.net> Message-ID: <016501c44316$746a46c0$6601a8c0@rock> Are these strings from a single column or does your "and" represent a group and a subgroup? -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Francisco H Tapia Sent: Tuesday, May 25, 2004 3:44 PM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] Top two of each group I have a little select statement, which gives me a grouping of Model1 Frame and Week1 Model1 Frame and week2 Model1 Frame and Week3 Model2 Frame and Week1 Model2 Frame and week2 Model2 Frame and Week3 Model2 Frame and Week3 Model3 Frame and week2 Model3 Frame and Week3 ... etc I'm blanking out on collecting the TOP 2 of each model, instead of seeing the entire model list, How would one just collect the TOP two of each model type? I can think of how to do this in a cursor, but I'd like to avoid that if at all possible. -- -Francisco _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From dmart06 at emory.edu Wed May 26 13:42:20 2004 From: dmart06 at emory.edu (Donna Martin) Date: Wed, 26 May 2004 14:42:20 -0400 Subject: [dba-SQLServer] Top two of each group In-Reply-To: <40B3A20F.3070000@verizon.net> References: <40B3A20F.3070000@verizon.net> Message-ID: <1085596940.40b4e50c750e6@webmail.service.emory.edu> I believe that might be able to be defined in your output in MaxRows or TopValues. HTH, Donna Quoting Francisco H Tapia : > I have a little select statement, which gives me a grouping of > > Model1 Frame and Week1 > Model1 Frame and week2 > Model1 Frame and Week3 > Model2 Frame and Week1 > Model2 Frame and week2 > Model2 Frame and Week3 > Model2 Frame and Week3 > Model3 Frame and week2 > Model3 Frame and Week3 > ... etc > > I'm blanking out on collecting the TOP 2 of each model, instead of > seeing the entire model list, How would one just collect the TOP two of > each model type? > > I can think of how to do this in a cursor, but I'd like to avoid that if > at all possible. > > -- > -Francisco > > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > From tuxedo_man at hotmail.com Wed May 26 16:22:45 2004 From: tuxedo_man at hotmail.com (Billy Pang) Date: Wed, 26 May 2004 21:22:45 +0000 Subject: [dba-SQLServer] Top two of each group Message-ID: How about... SET NOCOUNT ON DECLARE @ttt TABLE(THE_ID INT NOT NULL IDENTITY(1,1), THE_GROUP CHAR(1), THE_VALUE INT); INSERT INTO @ttt VALUES('A',1); INSERT INTO @ttt VALUES('A',3); INSERT INTO @ttt VALUES('A',5); INSERT INTO @ttt VALUES('B',2); INSERT INTO @ttt VALUES('B',4); INSERT INTO @ttt VALUES('B',5); SELECT X.THE_GROUP , (SELECT TOP 1 B.THE_VALUE FROM @ttt B WHERE B.THE_GROUP = X.THE_GROUP ORDER BY B.THE_VALUE) AS THE_FIRST_VALUE_FOR_THIS_GROUP , (SELECT TOP 1 C.THE_VALUE FROM @ttt C WHERE C.THE_GROUP = X.THE_GROUP AND C.THE_ID NOT IN (SELECT TOP 1 D.THE_ID FROM @ttt D WHERE D.THE_GROUP = X.THE_GROUP ORDER BY D.THE_VALUE) ORDER BY C.THE_VALUE) AS THE_SECOND_VALUE_FOR_THIS_GROUP FROM @ttt X GROUP BY THE_GROUP; Billy >From: Francisco H Tapia >Reply-To: dba-sqlserver at databaseadvisors.com >To: dba-sqlserver at databaseadvisors.com >Subject: [dba-SQLServer] Top two of each group >Date: Tue, 25 May 2004 12:44:15 -0700 > >I have a little select statement, which gives me a grouping of > >Model1 Frame and Week1 >Model1 Frame and week2 >Model1 Frame and Week3 >Model2 Frame and Week1 >Model2 Frame and week2 >Model2 Frame and Week3 >Model2 Frame and Week3 >Model3 Frame and week2 >Model3 Frame and Week3 >... etc > >I'm blanking out on collecting the TOP 2 of each model, instead of seeing >the entire model list, How would one just collect the TOP two of each model >type? > >I can think of how to do this in a cursor, but I'd like to avoid that if at >all possible. > >-- >-Francisco > > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > _________________________________________________________________ MSN Premium includes powerful parental controls and get 2 months FREE* http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines From my.lists at verizon.net Wed May 26 17:21:38 2004 From: my.lists at verizon.net (Francisco H Tapia) Date: Wed, 26 May 2004 15:21:38 -0700 Subject: [dba-SQLServer] Top two of each group In-Reply-To: References: Message-ID: <40B51872.4050109@verizon.net> I did this with a cursor in the end... :( I'm sure there IS a way to do this otherwise, but I haven't invested more time into it, plus this makes it usable it returns the recordset in under 3 seconds so it seems fine, tho I would prefer a NON-CURSOR approach. :\ oh well. Here is the syntax that I used.. (WATCH FOR WRAP) -- Purpose: Select only the TOP 2 of each group Model for display -- -- DECLARE @varModel as VarChar(100) DECLARE curModels CURSOR FOR SELECT dbo.Models.Models AS Model FROM dbo.Frames INNER JOIN dbo.Models ON dbo.Frames.Model = dbo.Models.modelsID INNER JOIN dbo.Holding ON dbo.Frames.[S/N] = dbo.Holding.SN WHERE (dbo.Frames.[Start Date] > GETDATE() - 60) AND (dbo.Frames.Dealer = N'stock') AND (dbo.Models.Frames <> N'Machine Accessories') AND (dbo.Holding.[Hold For] IS NULL) AND (dbo.Models.Models <> N'TL-3') AND (dbo.Models.Models <> N'MDC') AND (dbo.Models.Models <> N'EC-300') AND (NOT (dbo.Models.Models LIKE N'%CE')) AND (NOT (dbo.Models.Models LIKE N'%HE')) Group BY dbo.Models.models CREATE TABLE #tmpTable (Model VARCHAR(100), Frame VARCHAR(100), [Est. Completion] VARCHAR (100), [Cast/Ctrl Ops] VARCHAR(255) ) OPEN curModels FETCH NEXT FROM curModels INTO @varModel WHILE (@@Fetch_Status = 0) BEGIN INSERT INTO #tmpTable (Model, Frame, [Est. Completion], [Cast/Ctrl Ops]) SELECT TOP 2 dbo.Models.Models AS Model, dbo.Models.Frames AS Frame, dbo.prodDate(dbo.Frames.[Start Date] + 3, GETDATE()) AS [Est. Completion], ISNULL(dbo.Frames.[Cast/Ctrl Ops], '') AS [Cast/Ctrl Ops] FROM dbo.Frames INNER JOIN dbo.Models ON dbo.Frames.Model = dbo.Models.modelsID INNER JOIN dbo.Holding ON dbo.Frames.[S/N] = dbo.Holding.SN WHERE (dbo.Frames.[Start Date] > GETDATE() - 60) AND (dbo.Frames.Dealer = N'stock') AND (dbo.Models.Frames <> N'Machine Accessories') AND (dbo.Holding.[Hold For] IS NULL) AND (dbo.Models.Models <> N'TL-3') AND (dbo.Models.Models <> N'MDC') AND (dbo.Models.Models <> N'EC-300') AND (NOT (dbo.Models.Models LIKE N'%CE')) AND (NOT (dbo.Models.Models LIKE N'%HE')) AND dbo.Models.Models = @varModel ORDER BY dbo.Models.Models, dbo.Frames.[Start Date] FETCH NEXT FROM curModels INTO @varModel END CLOSE curModels DEALLOCATE curModels SELECT * FROM #tmpTable ORDER BY #tmpTable.Model Drop TABLE #tmpTable Billy Pang wrote On 5/26/2004 2:22 PM: > How about... > > SET NOCOUNT ON > DECLARE @ttt TABLE(THE_ID INT NOT NULL IDENTITY(1,1), THE_GROUP > CHAR(1), THE_VALUE INT); > > INSERT INTO @ttt VALUES('A',1); > INSERT INTO @ttt VALUES('A',3); > INSERT INTO @ttt VALUES('A',5); > > INSERT INTO @ttt VALUES('B',2); > INSERT INTO @ttt VALUES('B',4); > INSERT INTO @ttt VALUES('B',5); > > SELECT X.THE_GROUP > , (SELECT TOP 1 B.THE_VALUE FROM @ttt B WHERE B.THE_GROUP = > X.THE_GROUP ORDER BY B.THE_VALUE) AS THE_FIRST_VALUE_FOR_THIS_GROUP > , (SELECT TOP 1 C.THE_VALUE FROM @ttt C WHERE C.THE_GROUP = > X.THE_GROUP AND C.THE_ID NOT IN (SELECT TOP 1 D.THE_ID FROM @ttt D > WHERE D.THE_GROUP = X.THE_GROUP ORDER BY D.THE_VALUE) ORDER BY > C.THE_VALUE) AS THE_SECOND_VALUE_FOR_THIS_GROUP > FROM @ttt X > GROUP BY THE_GROUP; > > > Billy > >> From: Francisco H Tapia >> Reply-To: dba-sqlserver at databaseadvisors.com >> To: dba-sqlserver at databaseadvisors.com >> Subject: [dba-SQLServer] Top two of each group >> Date: Tue, 25 May 2004 12:44:15 -0700 >> >> I have a little select statement, which gives me a grouping of >> >> Model1 Frame and Week1 >> Model1 Frame and week2 >> Model1 Frame and Week3 >> Model2 Frame and Week1 >> Model2 Frame and week2 >> Model2 Frame and Week3 >> Model2 Frame and Week3 >> Model3 Frame and week2 >> Model3 Frame and Week3 >> ... etc >> >> I'm blanking out on collecting the TOP 2 of each model, instead of >> seeing the entire model list, How would one just collect the TOP two >> of each model type? >> >> I can think of how to do this in a cursor, but I'd like to avoid that >> if at all possible. >> >> -- >> -Francisco >> -- -Francisco From rl_stewart at highstream.net Thu May 27 14:02:50 2004 From: rl_stewart at highstream.net (Robert L. Stewart) Date: Thu, 27 May 2004 14:02:50 -0500 Subject: [dba-SQLServer] Re: Top two of each group In-Reply-To: <200405271700.i4RH0dQ08417@databaseadvisors.com> Message-ID: <5.1.0.14.2.20040527140143.01752430@pop3.highstream.net> I do not have it with me or I would send it. But, check out teh book "The Guru's guide to Transact-SQL" He has a non-cursor solution for it. At 12:00 PM 5/27/2004 -0500, you wrote: >Date: Wed, 26 May 2004 15:21:38 -0700 >From: Francisco H Tapia >Subject: Re: [dba-SQLServer] Top two of each group >To: dba-sqlserver at databaseadvisors.com >Message-ID: <40B51872.4050109 at verizon.net> >Content-Type: text/plain; charset=ISO-8859-1; format=flowed > >I did this with a cursor in the end... :( I'm sure there IS a way to do >this otherwise, but I haven't invested more time into it, plus this >makes it usable it returns the recordset in under 3 seconds so it seems >fine, tho I would prefer a NON-CURSOR approach. :\ oh well. > >Here is the syntax that I used.. > From my.lists at verizon.net Thu May 27 15:30:19 2004 From: my.lists at verizon.net (Francisco H Tapia) Date: Thu, 27 May 2004 13:30:19 -0700 Subject: [dba-SQLServer] Re: Top two of each group In-Reply-To: <5.1.0.14.2.20040527140143.01752430@pop3.highstream.net> References: <5.1.0.14.2.20040527140143.01752430@pop3.highstream.net> Message-ID: <40B64FDB.9090805@verizon.net> Thanks, I'll need to look this info up Robert L. Stewart wrote On 5/27/2004 12:02 PM: > I do not have it with me or I would send it. But, check out teh book > "The Guru's guide to Transact-SQL" He has a non-cursor solution for it. > > At 12:00 PM 5/27/2004 -0500, you wrote: > >> Date: Wed, 26 May 2004 15:21:38 -0700 >> From: Francisco H Tapia >> Subject: Re: [dba-SQLServer] Top two of each group >> To: dba-sqlserver at databaseadvisors.com >> Message-ID: <40B51872.4050109 at verizon.net> >> Content-Type: text/plain; charset=ISO-8859-1; format=flowed >> >> I did this with a cursor in the end... :( I'm sure there IS a way to do >> this otherwise, but I haven't invested more time into it, plus this >> makes it usable it returns the recordset in under 3 seconds so it seems >> fine, tho I would prefer a NON-CURSOR approach. :\ oh well. >> >> Here is the syntax that I used.. >> > > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > -- -Francisco From artful at rogers.com Fri May 28 15:42:05 2004 From: artful at rogers.com (Arthur Fuller) Date: Fri, 28 May 2004 16:42:05 -0400 Subject: [dba-SQLServer] Cross-Posted: Windows 2003 Server In-Reply-To: <40B64FDB.9090805@verizon.net> Message-ID: <025401c444f4$3ca12800$6601a8c0@rock> I realize that this question is slightly off-topic, but it DOES concern my database server, which is running Win2K Advanced Server (for multiple processors). I just got Windows 2003 Server, whose installation program immediately told me that it does not support multiple servers. Did I get the wrong version? Or did MS stop supporting multiple servers? If the former, what is the exact name of the product I need? (I searched some MS sites and got no satisfactory answer.) In short, it sounds like an upgrade is going to result in a downgrade. Am I missing something? TIA, and I hope this isn't too off-topic. Arthur From cfoust at infostatsystems.com Fri May 28 17:21:19 2004 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Fri, 28 May 2004 15:21:19 -0700 Subject: [dba-SQLServer] Cross-Posted: Windows 2003 Server Message-ID: Multiple "server" or multiple "processors"? There's a big difference. Charlotte Foust -----Original Message----- From: Arthur Fuller [mailto:artful at rogers.com] Sent: Friday, May 28, 2004 12:42 PM To: dba-sqlserver at databaseadvisors.com; Dba-Tech-Bounces Subject: [dba-SQLServer] Cross-Posted: Windows 2003 Server I realize that this question is slightly off-topic, but it DOES concern my database server, which is running Win2K Advanced Server (for multiple processors). I just got Windows 2003 Server, whose installation program immediately told me that it does not support multiple servers. Did I get the wrong version? Or did MS stop supporting multiple servers? If the former, what is the exact name of the product I need? (I searched some MS sites and got no satisfactory answer.) In short, it sounds like an upgrade is going to result in a downgrade. Am I missing something? TIA, and I hope this isn't too off-topic. Arthur _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From artful at rogers.com Fri May 28 17:24:32 2004 From: artful at rogers.com (Arthur Fuller) Date: Fri, 28 May 2004 18:24:32 -0400 Subject: [dba-SQLServer] Cross-Posted: Windows 2003 Server In-Reply-To: Message-ID: <027d01c44502$8ce18ea0$6601a8c0@rock> Multiple CPUs, which I think I specified pretty clearly :) Arthur -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Friday, May 28, 2004 6:21 PM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer] Cross-Posted: Windows 2003 Server Multiple "server" or multiple "processors"? There's a big difference. Charlotte Foust -----Original Message----- From: Arthur Fuller [mailto:artful at rogers.com] Sent: Friday, May 28, 2004 12:42 PM To: dba-sqlserver at databaseadvisors.com; Dba-Tech-Bounces Subject: [dba-SQLServer] Cross-Posted: Windows 2003 Server I realize that this question is slightly off-topic, but it DOES concern my database server, which is running Win2K Advanced Server (for multiple processors). I just got Windows 2003 Server, whose installation program immediately told me that it does not support multiple servers. Did I get the wrong version? Or did MS stop supporting multiple servers? If the former, what is the exact name of the product I need? (I searched some MS sites and got no satisfactory answer.) In short, it sounds like an upgrade is going to result in a downgrade. Am I missing something? TIA, and I hope this isn't too off-topic. Arthur _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From artful at rogers.com Fri May 28 17:27:07 2004 From: artful at rogers.com (Arthur Fuller) Date: Fri, 28 May 2004 18:27:07 -0400 Subject: [dba-SQLServer] Top two of each group In-Reply-To: Message-ID: <027e01c44502$e91c1780$6601a8c0@rock> It seems to me that your solution only works if you know the groups beforehand. The problem remains, what if you don't? I'm working on a solution so I may reply to my own reply :) Arthur -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Billy Pang Sent: Wednesday, May 26, 2004 5:23 PM To: dba-sqlserver at databaseadvisors.com Cc: my.lists at verizon.net Subject: RE: [dba-SQLServer] Top two of each group How about... SET NOCOUNT ON DECLARE @ttt TABLE(THE_ID INT NOT NULL IDENTITY(1,1), THE_GROUP CHAR(1), THE_VALUE INT); INSERT INTO @ttt VALUES('A',1); INSERT INTO @ttt VALUES('A',3); INSERT INTO @ttt VALUES('A',5); INSERT INTO @ttt VALUES('B',2); INSERT INTO @ttt VALUES('B',4); INSERT INTO @ttt VALUES('B',5); SELECT X.THE_GROUP , (SELECT TOP 1 B.THE_VALUE FROM @ttt B WHERE B.THE_GROUP = X.THE_GROUP ORDER BY B.THE_VALUE) AS THE_FIRST_VALUE_FOR_THIS_GROUP , (SELECT TOP 1 C.THE_VALUE FROM @ttt C WHERE C.THE_GROUP = X.THE_GROUP AND C.THE_ID NOT IN (SELECT TOP 1 D.THE_ID FROM @ttt D WHERE D.THE_GROUP = X.THE_GROUP ORDER BY D.THE_VALUE) ORDER BY C.THE_VALUE) AS THE_SECOND_VALUE_FOR_THIS_GROUP FROM @ttt X GROUP BY THE_GROUP; Billy >From: Francisco H Tapia >Reply-To: dba-sqlserver at databaseadvisors.com >To: dba-sqlserver at databaseadvisors.com >Subject: [dba-SQLServer] Top two of each group >Date: Tue, 25 May 2004 12:44:15 -0700 > >I have a little select statement, which gives me a grouping of > >Model1 Frame and Week1 >Model1 Frame and week2 >Model1 Frame and Week3 >Model2 Frame and Week1 >Model2 Frame and week2 >Model2 Frame and Week3 >Model2 Frame and Week3 >Model3 Frame and week2 >Model3 Frame and Week3 >... etc > >I'm blanking out on collecting the TOP 2 of each model, instead of >seeing >the entire model list, How would one just collect the TOP two of each model >type? > >I can think of how to do this in a cursor, but I'd like to avoid that >if at >all possible. > >-- >-Francisco > > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > _________________________________________________________________ MSN Premium includes powerful parental controls and get 2 months FREE* http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU =http://hotmail.com/enca&HL=Market_MSNIS_Taglines _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From jmoss111 at bellsouth.net Fri May 28 17:33:09 2004 From: jmoss111 at bellsouth.net (JMoss) Date: Fri, 28 May 2004 17:33:09 -0500 Subject: [dba-SQLServer] Cross-Posted: Windows 2003 Server In-Reply-To: <027d01c44502$8ce18ea0$6601a8c0@rock> Message-ID: Are they Pentium IIs or Pentium Pros? If so it's possible that 2003 won't recognize them. -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Arthur Fuller Sent: Friday, May 28, 2004 5:25 PM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer] Cross-Posted: Windows 2003 Server Multiple CPUs, which I think I specified pretty clearly :) Arthur -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Friday, May 28, 2004 6:21 PM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer] Cross-Posted: Windows 2003 Server Multiple "server" or multiple "processors"? There's a big difference. Charlotte Foust -----Original Message----- From: Arthur Fuller [mailto:artful at rogers.com] Sent: Friday, May 28, 2004 12:42 PM To: dba-sqlserver at databaseadvisors.com; Dba-Tech-Bounces Subject: [dba-SQLServer] Cross-Posted: Windows 2003 Server I realize that this question is slightly off-topic, but it DOES concern my database server, which is running Win2K Advanced Server (for multiple processors). I just got Windows 2003 Server, whose installation program immediately told me that it does not support multiple servers. Did I get the wrong version? Or did MS stop supporting multiple servers? If the former, what is the exact name of the product I need? (I searched some MS sites and got no satisfactory answer.) In short, it sounds like an upgrade is going to result in a downgrade. Am I missing something? TIA, and I hope this isn't too off-topic. Arthur _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From accessd at shaw.ca Fri May 28 18:07:03 2004 From: accessd at shaw.ca (Jim Lawrence (AccessD)) Date: Fri, 28 May 2004 16:07:03 -0700 Subject: [dba-SQLServer] Cross-Posted: Windows 2003 Server In-Reply-To: <025401c444f4$3ca12800$6601a8c0@rock> Message-ID: Hi Arthur: Check out the following site to see if you choose the right XP Server 2003 version: http://www.microsoft.com/windowsserver2003/evaluation/features/compareeditio ns.mspx HTH Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Arthur Fuller Sent: Friday, May 28, 2004 1:42 PM To: dba-sqlserver at databaseadvisors.com; Dba-Tech-Bounces Subject: [dba-SQLServer] Cross-Posted: Windows 2003 Server I realize that this question is slightly off-topic, but it DOES concern my database server, which is running Win2K Advanced Server (for multiple processors). I just got Windows 2003 Server, whose installation program immediately told me that it does not support multiple servers. Did I get the wrong version? Or did MS stop supporting multiple servers? If the former, what is the exact name of the product I need? (I searched some MS sites and got no satisfactory answer.) In short, it sounds like an upgrade is going to result in a downgrade. Am I missing something? TIA, and I hope this isn't too off-topic. Arthur _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From andrew.haslett at ilc.gov.au Sat May 29 03:12:37 2004 From: andrew.haslett at ilc.gov.au (Haslett, Andrew) Date: Sat, 29 May 2004 17:42:37 +0930 Subject: [dba-SQLServer] Cross-Posted: Windows 2003 Server Message-ID: "Or did MS stop supporting multiple servers?" ;=) -----Original Message----- From: Arthur Fuller [mailto:artful at rogers.com] Sent: Saturday, 29 May 2004 7:55 AM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer] Cross-Posted: Windows 2003 Server Multiple CPUs, which I think I specified pretty clearly :) Arthur -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Friday, May 28, 2004 6:21 PM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer] Cross-Posted: Windows 2003 Server Multiple "server" or multiple "processors"? There's a big difference. Charlotte Foust -----Original Message----- From: Arthur Fuller [mailto:artful at rogers.com] Sent: Friday, May 28, 2004 12:42 PM To: dba-sqlserver at databaseadvisors.com; Dba-Tech-Bounces Subject: [dba-SQLServer] Cross-Posted: Windows 2003 Server I realize that this question is slightly off-topic, but it DOES concern my database server, which is running Win2K Advanced Server (for multiple processors). I just got Windows 2003 Server, whose installation program immediately told me that it does not support multiple servers. Did I get the wrong version? Or did MS stop supporting multiple servers? If the former, what is the exact name of the product I need? (I searched some MS sites and got no satisfactory answer.) In short, it sounds like an upgrade is going to result in a downgrade. Am I missing something? TIA, and I hope this isn't too off-topic. Arthur _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com IMPORTANT - PLEASE READ ******************** This email and any files transmitted with it are confidential and may contain information protected by law from disclosure. If you have received this message in error, please notify the sender immediately and delete this email from your system. No warranty is given that this email or files, if attached to this email, are free from computer viruses or other defects. They are provided on the basis the user assumes all responsibility for loss, damage or consequence resulting directly or indirectly from their use, whether caused by the negligence of the sender or not. From artful at rogers.com Sat May 29 07:31:37 2004 From: artful at rogers.com (Arthur Fuller) Date: Sat, 29 May 2004 08:31:37 -0400 Subject: [dba-SQLServer] Cross-Posted: Windows 2003 Server In-Reply-To: Message-ID: <037b01c44578$e2f36310$6601a8c0@rock> You hit the nail squarely on the head. My server is old and has a pair of 400 Mz PIIs. I suppose I can go ahead and install it anyway, losing support for one of the CPUs. It's only a home machine so it's not as if I actually need the two chips. Thanks. Arthur -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of JMoss Sent: Friday, May 28, 2004 6:33 PM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer] Cross-Posted: Windows 2003 Server Are they Pentium IIs or Pentium Pros? If so it's possible that 2003 won't recognize them. From artful at rogers.com Sat May 29 07:32:06 2004 From: artful at rogers.com (Arthur Fuller) Date: Sat, 29 May 2004 08:32:06 -0400 Subject: [dba-SQLServer] Cross-Posted: Windows 2003 Server In-Reply-To: Message-ID: <037c01c44578$f4033720$6601a8c0@rock> You got me! -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Haslett, Andrew Sent: Saturday, May 29, 2004 4:13 AM To: 'dba-sqlserver at databaseadvisors.com' Subject: RE: [dba-SQLServer] Cross-Posted: Windows 2003 Server "Or did MS stop supporting multiple servers?" ;=) -----Original Message----- From: Arthur Fuller [mailto:artful at rogers.com] Sent: Saturday, 29 May 2004 7:55 AM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer] Cross-Posted: Windows 2003 Server Multiple CPUs, which I think I specified pretty clearly :) Arthur -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Friday, May 28, 2004 6:21 PM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer] Cross-Posted: Windows 2003 Server Multiple "server" or multiple "processors"? There's a big difference. Charlotte Foust -----Original Message----- From: Arthur Fuller [mailto:artful at rogers.com] Sent: Friday, May 28, 2004 12:42 PM To: dba-sqlserver at databaseadvisors.com; Dba-Tech-Bounces Subject: [dba-SQLServer] Cross-Posted: Windows 2003 Server I realize that this question is slightly off-topic, but it DOES concern my database server, which is running Win2K Advanced Server (for multiple processors). I just got Windows 2003 Server, whose installation program immediately told me that it does not support multiple servers. Did I get the wrong version? Or did MS stop supporting multiple servers? If the former, what is the exact name of the product I need? (I searched some MS sites and got no satisfactory answer.) In short, it sounds like an upgrade is going to result in a downgrade. Am I missing something? TIA, and I hope this isn't too off-topic. Arthur _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com IMPORTANT - PLEASE READ ******************** This email and any files transmitted with it are confidential and may contain information protected by law from disclosure. If you have received this message in error, please notify the sender immediately and delete this email from your system. No warranty is given that this email or files, if attached to this email, are free from computer viruses or other defects. They are provided on the basis the user assumes all responsibility for loss, damage or consequence resulting directly or indirectly from their use, whether caused by the negligence of the sender or not. _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From tuxedo_man at hotmail.com Sat May 29 11:26:11 2004 From: tuxedo_man at hotmail.com (Billy Pang) Date: Sat, 29 May 2004 16:26:11 +0000 Subject: [dba-SQLServer] Top two of each group Message-ID: Not really... if you look at it more closely, you can have more groups without needing to modify the code. This is because there GROUP BY clause that will get the distinct values of the groups from your list and the subqueries will get you your top 1 and top 2 values for each group respectively. >From: "Arthur Fuller" >Reply-To: dba-sqlserver at databaseadvisors.com >To: >Subject: RE: [dba-SQLServer] Top two of each group >Date: Fri, 28 May 2004 18:27:07 -0400 > >It seems to me that your solution only works if you know the groups >beforehand. The problem remains, what if you don't? > >I'm working on a solution so I may reply to my own reply :) > >Arthur > >-----Original Message----- >From: dba-sqlserver-bounces at databaseadvisors.com >[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Billy >Pang >Sent: Wednesday, May 26, 2004 5:23 PM >To: dba-sqlserver at databaseadvisors.com >Cc: my.lists at verizon.net >Subject: RE: [dba-SQLServer] Top two of each group > > >How about... > >SET NOCOUNT ON >DECLARE @ttt TABLE(THE_ID INT NOT NULL IDENTITY(1,1), THE_GROUP CHAR(1), > >THE_VALUE INT); > >INSERT INTO @ttt VALUES('A',1); >INSERT INTO @ttt VALUES('A',3); >INSERT INTO @ttt VALUES('A',5); > >INSERT INTO @ttt VALUES('B',2); >INSERT INTO @ttt VALUES('B',4); >INSERT INTO @ttt VALUES('B',5); > >SELECT X.THE_GROUP >, (SELECT TOP 1 B.THE_VALUE FROM @ttt B WHERE B.THE_GROUP = X.THE_GROUP >ORDER BY B.THE_VALUE) AS THE_FIRST_VALUE_FOR_THIS_GROUP >, (SELECT TOP 1 C.THE_VALUE FROM @ttt C WHERE C.THE_GROUP = X.THE_GROUP >AND >C.THE_ID NOT IN (SELECT TOP 1 D.THE_ID FROM @ttt D WHERE D.THE_GROUP = >X.THE_GROUP ORDER BY D.THE_VALUE) ORDER BY C.THE_VALUE) AS >THE_SECOND_VALUE_FOR_THIS_GROUP >FROM @ttt X >GROUP BY THE_GROUP; > > >Billy > > >From: Francisco H Tapia > >Reply-To: dba-sqlserver at databaseadvisors.com > >To: dba-sqlserver at databaseadvisors.com > >Subject: [dba-SQLServer] Top two of each group > >Date: Tue, 25 May 2004 12:44:15 -0700 > > > >I have a little select statement, which gives me a grouping of > > > >Model1 Frame and Week1 > >Model1 Frame and week2 > >Model1 Frame and Week3 > >Model2 Frame and Week1 > >Model2 Frame and week2 > >Model2 Frame and Week3 > >Model2 Frame and Week3 > >Model3 Frame and week2 > >Model3 Frame and Week3 > >... etc > > > >I'm blanking out on collecting the TOP 2 of each model, instead of > >seeing > >the entire model list, How would one just collect the TOP two of each >model > >type? > > > >I can think of how to do this in a cursor, but I'd like to avoid that > >if at > >all possible. > > > >-- > >-Francisco > > > > > >_______________________________________________ > >dba-SQLServer mailing list > >dba-SQLServer at databaseadvisors.com > >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > >http://www.databaseadvisors.com > > > >_________________________________________________________________ >MSN Premium includes powerful parental controls and get 2 months FREE* > >http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU >=http://hotmail.com/enca&HL=Market_MSNIS_Taglines > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > _________________________________________________________________ MSN Premium with Virus Guard and Firewall* from McAfee? Security : 2 months FREE* http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines From subs1847 at solution-providers.ie Mon May 31 02:56:56 2004 From: subs1847 at solution-providers.ie (Mark L. Breen) Date: Mon, 31 May 2004 08:56:56 +0100 Subject: [dba-SQLServer] Error Trapping and temp tables Message-ID: <000a01c446e4$dc0b6a80$0101a8c0@D8TZHN0J> Hello All, I am developing a db and intend to use a temp table. Before use I create it and after use I drop it. However, because I fear it may somehow remain in the system, I would prefer to do a If exists (table name) drop table name But it is not that easy with temp tables, as you know, so I was considering using a vb function that attempts to drop the table, I can catch the error in vb, I hope, and ignore it. Have you guys any better suggestions how to do this. Basically, I want to check for the existence of a temp table and drop it if it exists. Thanks in advance, Mark From subs1847 at solution-providers.ie Mon May 31 10:38:08 2004 From: subs1847 at solution-providers.ie (Mark L. Breen) Date: Mon, 31 May 2004 16:38:08 +0100 Subject: [dba-SQLServer] Error Trapping and temp tables References: <000a01c446e4$dc0b6a80$0101a8c0@D8TZHN0J> Message-ID: <003301c44725$4fb91c30$0101a8c0@D8TZHN0J> Hello All, A guy called OJ gave me the answer it is if object_id('tempdb..#tmp','U') is not null print '#tmp exists' Thanks Mark ----- Original Message ----- From: "Mark L. Breen" To: Sent: Monday, May 31, 2004 8:56 AM Subject: [dba-SQLServer] Error Trapping and temp tables Hello All, I am developing a db and intend to use a temp table. Before use I create it and after use I drop it. However, because I fear it may somehow remain in the system, I would prefer to do a If exists (table name) drop table name But it is not that easy with temp tables, as you know, so I was considering using a vb function that attempts to drop the table, I can catch the error in vb, I hope, and ignore it. Have you guys any better suggestions how to do this. Basically, I want to check for the existence of a temp table and drop it if it exists. Thanks in advance, Mark _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From martyconnelly at shaw.ca Mon May 31 12:39:10 2004 From: martyconnelly at shaw.ca (MartyConnelly) Date: Mon, 31 May 2004 10:39:10 -0700 Subject: [dba-SQLServer] Error Trapping and temp tables References: <000a01c446e4$dc0b6a80$0101a8c0@D8TZHN0J> Message-ID: <40BB6DBE.2030909@shaw.ca> You should create temp tables in a temp mdb. Saves on bloat among other things. See Tony Toews method http://www.granite.ab.ca/access/temptables.htm Mark L. Breen wrote: >Hello All, > >I am developing a db and intend to use a temp table. Before use I create it and after use I drop it. > >However, because I fear it may somehow remain in the system, I would prefer to do a > >If exists (table name) drop table name > >But it is not that easy with temp tables, as you know, so I was considering using a vb function that attempts to drop the table, I can catch the error in vb, I hope, and ignore it. > >Have you guys any better suggestions how to do this. > >Basically, I want to check for the existence of a temp table and drop it if it exists. > >Thanks in advance, > >Mark >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > > > > -- Marty Connelly Victoria, B.C. Canada