May 20, 2015 at 11:28 am
I am trying to get an old SQL2000 DB to run on at least SQL2005. Can't move it up to SQL2008 because it uses deprecated features in the SQL procs (old *= and *= type joins). 🙁
I have a couple views that won't bind because the tables don't exist. The SQL in them is:
CREATE VIEW [dbo].[IN_RP_ISTD_VENDA4] (ITEMNUM, VENDORID) AS
SELECT ITEMNUM, VENDORID FROM IN_RP_ISTD_VEND##14
UNION SELECT ITEMNUM, VENDORID FROM IN_RP_ISTD_VEND##24
GO
Tables IN_RP_ISTD_VEND##14 and IN_RP_ISTD_VEND##24 do not exist, nor are they other views, or even functions. Anyone have any idea what they could be?
Any insight would be appreciated.
Thanks
Lori
May 20, 2015 at 11:43 am
May 20, 2015 at 11:52 am
FYI, the =* and *= can easily be converted to Outer Joins so you could upgrade to SQL 2008 or higher.
For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]
May 20, 2015 at 11:53 am
Wow. That's just rude and unhelpful. You know nothing about me, my level of experience, my situation, or what I have done prior to getting to this point. I totally understand sarcasm, but your response is unprofessional and uncalled-for. Perhaps you should practice putting a filter on your thoughts before committing them to public.
Let me clarify that my first, second and third conversations with my boss and user about this project was this is not a good idea, we should be investing the money required to either get this application up to current versions, or replace it with a newer product. However, they want to try this approach first. Also, I am doing this on a dev server, which is not being used anymore, but hasn't been removed from our environment just yet. So.....
Anyone have something helpful to say?
Lori
May 20, 2015 at 12:01 pm
the suggestion to check for synonyms is solid; i did not think that was sarcastic at all; it would have been my first guess as well.
there's an excellent chance that what you are seeing is an artifact and that it's legacy code that doesn't work at all.
can you actually select from the view in the original SQL2000 or 2005 source?
it's certainly possible to have invalid objects, where the object was created, but then the underlying tables it depends on were removed. that's what i think is probably happening here.
in the case of the view, if the table was removed or renamed, but the view wasn't updated, i'd expect an invalid object reference that you are encountering.
Lowell
May 20, 2015 at 12:02 pm
Sorry - Luis - I was responding to your tag line, and not your comment.
Still....
This is code in a purchased app. I am not comfortable changing it. Just trying to get it to work or to prove that we cannot run it on a newer version without a newer version of the code.
But I have to be able to explain to the user specifically why they will need to shell out $$ when they don't want to.
I don't think it is a synonym or alias, as it will gives a binding error when I run sp_refreshvw.
Lor
May 20, 2015 at 12:03 pm
oops
For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]
May 20, 2015 at 12:14 pm
Reactions like this make me wonder if I should change my signature.
Those questions are there because some people just copy, paste and execute code without analysing what they do. I'm sorry for the bad taste they leave, but I feel obligated to prevent people from bad options (which might come from me).
Lowell might be correct on guessing that the objects might not exist anymore and the view is part of some legacy code. You might want to check if the application uses this view anywhere or anytime.
May 20, 2015 at 1:06 pm
Luis Cazares (5/20/2015)
Reactions like this make me wonder if I should change my signature.Those questions are there because some people just copy, paste and execute code without analysing what they do. I'm sorry for the bad taste they leave, but I feel obligated to prevent people from bad options (which might come from me).
Lowell might be correct on guessing that the objects might not exist anymore and the view is part of some legacy code. You might want to check if the application uses this view anywhere or anytime.
You could reword it. Instead of asking the question, you could remind everyone to test before using.
Just an idea. I won't bill you for that $0.03 😎
For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]
May 20, 2015 at 4:05 pm
I am trying to get an old SQL2000 DB to run on at least SQL2005. Can't move it up to SQL2008 because it uses deprecated features in the SQL procs (old *= and *= type joins). 🙁
Actually, this shouldn't be as big of a concern. You should be able to upgrade to SQL Server 2008 R2 and still be able to use the old join syntax. You might have to keep the compatibility level of the database at 80 but it should work. The feature is deprecated, not removed.
Deprecated Database Engine Features in SQL Server 2008 R2
Joie Andrew
"Since 1982"
May 20, 2015 at 4:53 pm
Luis Cazares (5/20/2015)
Reactions like this make me wonder if I should change my signature.Those questions are there because some people just copy, paste and execute code without analysing what they do.
I like your signature line and the message; it's good advice. I would not let a little misunderstanding cause you to change it. That's my $0.02.
-- Itzik Ben-Gan 2001
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply