December 18, 2009 at 9:49 am
Hi,
I am learning SQL and could use help. I have an intranet web site (ASP.NET) with VB.NET as the code behind. The db is SQL Server 2005. There are 7 tables in the db. In the web site the user can add a project. The new project may insert into 1, 3, or 4 tables, depending on the amount of input.
What I want to do is query the table(s) to verify the inputted information posted to the tables and then provide a notification to the user of the successful addition of a new project. My stumbling block is the SQL. Should it be an inner join, outer join, cross join, a union join, etc?
What kind of syntax? How do I verify a successful query of the db table(s) so that I may initialize VB.NET functions/routines?
Thanks,
John
December 18, 2009 at 9:58 am
Is there a relationship between the tables? Can you join them? you'd need to provide more info about the tables DDL and what's inserted. Or what's required. It could be 4 separate queries.
December 19, 2009 at 4:21 am
Hi,
I'll have to reply on Monday. The db is at my place of work and I'm snowed in for the weekend.
Thank you very much.
John
December 21, 2009 at 11:58 am
Mr. Jones,
There are a total of 6 tables and 2 databases. I have 4 tables in my database. I have access to the other 2 tables in another database. The contents are shown in the attachment. The Project table has a PK, Project_ID. The other 3 tables has Project_ID as a FK.
If you require more information please let me know.
Thank you,
John
December 22, 2009 at 2:13 am
Hi,
what kind of query you want. depending on the requirement we can proceed to help any more. the following link will help u in writing joins statement in SQL server. All basic syntax provided here
let me know, if ur requirement is not fullfil, i will try my level best to help u.
ok bye
http://javanullpointer.blogspot.com/2009/08/joins-examples-in-sql-server-2005.html
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply