Re: [lampsoftware-8] Microsoft SQL syntax question

From: user 4.
Sent on: Friday, January 11, 2008 5:17 PM
Re: [lampsoftware-8] Microsoft SQL syntax question Thanks, this backs up some non-authoritative websites that I found.  Gotta love MS ...

Chris






On 1/11/08 10:39 AM, "Robert Gonzalez" <[address removed]> wrote:

I believe the syntax in MS SQL is [database].[table] so it would be something like

SELECT * from [my_table] where [column_name] LIKE '%foobar%';

Not sure about the quotes around the like. It has been years since I have touched anything MS SQL. Sorry.

Robert

On Jan 11,[masked]:31 AM, Chris Verges <[address removed]> wrote:
Hey all,

I apologize for tainting this LAMP list with a Microsoft SQL question, but
it's driving me nuts and I need some help.  Under MySQL, I'm able to form
queries like:

    SELECT * from `my_table` where `column_name` LIKE '%foobar%';

The tables and columns are delineated by a tick (`).

This doesn't seem to work in Microsoft SQL, however.  Does anyone know what
the corresponding delineated syntax is?  And more importantly, is there a
common syntax which will work for both?  (Leaving out the delineator mark is
not an option, as we have some table/column names which can conflict with
built-in keywords for the DBMS.)

Thanks for the help!
Chris




--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed]  <mailto:[address removed]> )
This message was sent by Chris Verges ([address removed]) from The Silicon Valley LAMP Meetup Group.
To learn more about Chris Verges, visit his/her member profile: http://lampsoftware.meetup.com/8/members/4884520/
To unsubscribe or to update your mailing list settings, click here: http://www.meetup.com/account/?tab=comm

Meetup.com <http://Meetup.com>  Customer Service: [address removed]
632 Broadway New York NY 10012 USA

Our Sponsors

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy