Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Newb with SQL in school learning - class project help Expand / Collapse
Author
Message
Posted Saturday, February 16, 2013 9:32 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Saturday, February 23, 2013 9:28 AM
Points: 8, Visits: 14
Okay here is my situation, I have a database that I had on my website and I want to use it for my class project. Well I'm sure it was MySQL not SQL but with some time I have gone in and fixed a lot of the code.

Here is my problem being new to the whole SQL I am missing some of the basics and I have searched on the forums and Google but I don't think I'm asking the right question. I'm hoping you can help me understand what it is that I'm doing wrong.

When I uploaded the .sql file it had 23,000 lines of code I am 50% done with fixing the issues but I saved the project and now I have no idea how to open all the lines of code. I know it has to be with New Query but how do I get everything. so I can see all the errors that it is creating and I can go in and fix them.

Please ask me questions its the only way I can learn and understand the basics better.

Thanks
KC
Post #1420940
Posted Saturday, February 16, 2013 9:47 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Saturday, February 23, 2013 9:28 AM
Points: 8, Visits: 14
I must have missed it but if a moderator would move this in to the Newbie section would be great...
Post #1420942
Posted Sunday, February 17, 2013 6:11 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Monday, July 28, 2014 4:35 AM
Points: 2,901, Visits: 2,927
Hi, there is a "Parse" button in ssms which tells you some incorrect syntax of the t-sql.
For tracking what you've changed you can use a SVN, e.g.: http://www.simple-talk.com/dotnet/.net-framework/tortoisesvn-and-subversion-cookbook-part-9-server,-repository,-and-statistics/
Download link http://tortoisesvn.net/





Igor Micev,
SQL Server developer at Seavus
www.seavus.com
Post #1420972
Posted Sunday, February 17, 2013 11:25 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Today @ 4:43 PM
Points: 955, Visits: 2,899
Hi

If I've understood your question, you've saved your code using 'Save solution'. If your SQL was copied into a new query window then you would have been prompted for a file to save to. This will generally go to 'User Directory\My Documents\SQL Server Management Studio\Projects'. You should also be able to get to it from the 'Recent' drop down menu in the 'File' menu.

Personally for large SQL scripts I try to break them up into smaller more manageable chunks and merge them back together to run if necessary. Most of the time this isn't necessary though.

Micky
Post #1420998
Posted Monday, February 18, 2013 6:53 PM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Today @ 7:28 AM
Points: 452, Visits: 849
If this is MySQL then this isn't really the right place, this site is for Microsoft SQL Server, but the first question I would ask you are what tools are you using? How did you 'upload a file'?

Most website management systems would give you access to something like PHPMyAdmin or some other web based tool for running queries and managing your MySQL Database. If it's SQL Server, are you using SQL Server Management Studio, or some other software?

When you say you 'uploaded a .sql file' it makes me think that you haven't actually run the code against the database so it is not really saved within your database. Maybe you've uploaded the .sql file to your webserver? (which would do nothing)

MySQL and SQL Server don't store .sql files as part of their schema, you run the SQL script and it then makes changes to the database. For example if you are creating a procedure or function, it will store that object and its definition in the database itself, not as a separate file. Maybe you know that.

It sounds to me like you are struggling with how the tools work, not with the SQL Language.
Post #1421401
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse