| Author |
Topic |
|
mortoleeuk
Starting Member
5 Posts |
Posted - 2005-09-08 : 11:34:39
|
| [code]SELECT * FROM tbl_customers WHERE customer_fname = 'Lee' && customer_lname = 'Morton'[/code]I think you can probably tell what I want from that, but how do I do it? that && doesnt work, tried "AND" and "&" also. |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
mortoleeuk
Starting Member
5 Posts |
Posted - 2005-09-08 : 11:42:52
|
Yeah i just want it to work in query anal at the momenti get this error for SELECT * FROM tbl_customers WHERE customer_fname = 'Lee' AND customer_lname = 'Morton' Server: Msg 208, Level 16, State 1, Line 1Invalid object name 'tbl_customers'.But, if I run my insert code it for the table it works |
 |
|
|
mortoleeuk
Starting Member
5 Posts |
Posted - 2005-09-08 : 11:57:03
|
actually its doing it on the insert code... why does one problem just lead to another, check out the jpg  |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-09-08 : 11:59:30
|
Case sensitive database?if not try this to see if the table has a different ownerSELECT TABLE_SCHEMA + '.' + TABLE_NAMEFROM INFORMATION_SCHEMA.TABLESORDER BY TABLE_NAME, TABLE_SCHEMA Kristen |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-09-08 : 12:00:30
|
| Scratch that, your screen shot shows that you are in the "master" database,type USE [ComputerMOTdb](is there a space in there? I can't see it clearly)Kristen |
 |
|
|
homebrew
Posting Yak Master
114 Posts |
Posted - 2005-09-08 : 12:14:57
|
| Sounds like a D'OH is in order !! :-) |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-09-08 : 12:20:08
|
| "Sounds like a D'OH is in order"mortoleeuk's first post. For all I know s/he only started using SQL today!Kristen |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2005-09-08 : 12:23:16
|
| Reminds me of a time I sent a t-sql script to modify a production database.Prod DBA: " Your script failed"Me: " Are you sure, I tested in several environments before I sent to you"Prod DBA: "Nope it failed, it say invalid object"Me: " Are you running in the the Tax Database?SilenceI use "USE" All the time now at the beginning of every release script.Brett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-09-08 : 12:32:28
|
"Silence"That's the sound of a DBA trying to work out how to reverse a script I expect the thinking goes like this:Did I back up the TAX database before I started? YupSo what *$%(*!& database am I in? And possibly: "And what did the script manage to change?" Kristen |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-09-08 : 12:35:46
|
... now full of SProcs doing nothing useful, and having an Eppy with sysdepends ... Kristen |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-09-08 : 13:44:04
|
"He's no longer with us"Nor your Sprocs in master, I dare say I've just found a dead wasp in my glass of wine - Yuck!a) Clearly the bottle was open too long and b) my answers may deteriorate for the rest of the evening until Margareta-ville overtakes me!Kristen |
 |
|
|
|