[AccessD] was SQL Server queries - appending strings

John W. Colby jwcolby at colbyconsulting.com
Sat Jan 31 20:27:35 CST 2004


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





More information about the AccessD mailing list