Elam, Debbie
DElam at jenkens.com
Tue Feb 3 07:50:49 CST 2004
One method I have used is to have a stored procedure with parameters. I can make a query that calls the stored procedure and gives the parameter. (This is not ADP compatible) I use the pass through query builder off of Dev Ashish's site to put the correct parameter into the query. This just builds the query I want with the correct parameter each time I use it. Debbie -----Original Message----- From: John W. Colby [mailto:jwcolby at colbyconsulting.com] Sent: Saturday, January 31, 2004 8:28 PM To: Access Developers discussion and problem solving Subject: [AccessD] was SQL Server queries - appending strings Thanks both of you. I have a client that purchased SQL Server and so it's time to get off the dime and learn this stuff. The client uses A2K. Now that I am changing to SQL Server I have to get the server doing more of the work - the whole point is of course to speed things up. For technical reasons (a whole SLEW of reasons) going to an ADP is NOT an option any time in the near future, if at all. I have a main tabbed form which uses a multi-table join to get live data from a client / claim . The client wanted it that way so that the user could edit fields in either table. Views appear to be similar to tables, i.e. I can link to them and they show up in the table window. Is there a way to pass parameters to them? "Where LastName like col*" etc? ATM, I pull the whole recordset and then filter down to a single record. Not fast, but after the initial pull the filter proceeds at a reasonable rate. I can then "filter" to a specific claim reasonably fast. I would like to change this to actually ask SQL Server for a view of exactly one record each time they want to see a claim. Thus avoiding the "pull the entire recordset across the net, now pull the index, etc. This must be editable so AFAIK I cannot use stored procedures which would allow passing parameters. Because this is A2K AFAIK I cannot assign a recordset to the form's recordsource property. What are my options here? Do I have any? John W. Colby www.ColbyConsulting.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Stuart McLachlan Sent: Saturday, January 31, 2004 8:59 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] SQL Server queries - appending strings On 31 Jan 2004 at 20:44, John W. Colby wrote: > In Access I often do things in queries like: [LastName] & ", " & [FirstName] > > This appears to be bad syntax in SQL Server. Is there an equivalent? > Lastname + ', ' + FirstName Text delimiters are single quotes. String concatenation uses "+". "&" performs an AND logical bitwise comparison. -- Lexacorp Ltd http://www.lexacorp.com.pg Information Technology Consultancy, Software Development,System Support. _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com - JENKENS & GILCHRIST E-MAIL NOTICE - This transmission may be: (1) subject to the Attorney-Client Privilege, (2) an attorney work product, or (3) strictly confidential. If you are not the intended recipient of this message, you may not disclose, print, copy or disseminate this information. If you have received this in error, please reply and notify the sender (only) and delete the message. Unauthorized interception of this e-mail is a violation of federal criminal law. This communication does not reflect an intention by the sender or the sender's client or principal to conduct a transaction or make any agreement by electronic means. Nothing contained in this message or in any attachment shall satisfy the requirements for a writing, and nothing contained herein shall constitute a contract or electronic signature under the Electronic Signatures in Global and National Commerce Act, any version of the Uniform Electronic Transactions Act or any other statute governing electronic transactions.