I'm a user interface designer working for a small development shop in a government agency. My boss feels it would help our team out if I learned a bit more programming (I'm on that already in VS2k8, VB.NET), and some general database theory and practical knowledge. The more I learn about programming, the more my utter ignorance of databases proves to be an obstacle. We use SQL2k5, so I've decided to cut my teeth on that; I don't have the free time to learn something simpler and then graduate to SQL, so it is what it is.
So, I'm looking for a "Dumb Even for a Dummy" guide to database fundamentals, with a strong emphasis on SQL in particular. I slogged through the first 30 pages of this forum and found a couple of MSDN resources but nothing stuck me as being basic enough. I'm hoping someone can provide me with some "Go here, newb" resources to get me started.
I'm almost embarassed to ask such a simple question but I'm pretty new to SQL and want to the do the following SQL select. I have two tables:
WORK ORDER HEADER DETAILS (WORKH) WorkOrderNumber | CustomerNumber | StartDate | EndDate
WORK ORDER LINES (WORKD) WorkOrderNo | Service
I want to select all customer numbers that have a work order that includes a line with the service code XXXXX and a start date of YYYYYY and end date of ZZZZZZ. Note that the first field in each table contains the same data but is named differently. It's this that's causing me a headache.
I just downloaded and installed Visual Basic Express Edition and SQL Server Express Edition. All I have in the Start menu is SQL Configuration Tools. My absolutely stupid question is, how do I get started with this?
I know a little bit about SQL from using SQL command line in Oracle, and I've built small databases before using Access. Where does this program fit into all of that? And what do I use and how can I get started with this program?
Can my program with SQL database run correctly on another com using win xp home edition, with only C# 2005 EE installed? Is it compulsory for every table in a database to have a primary key? Can I extract a data from a specific cell in a database table(click button get data)? How do I go about doing it (the simplest n straight forward method)?
Hello there... Pending receiving the full version from the higher powers at my work, I have downloaded the Evaluation version of SQL 2000, and set up an instance on my desktop machine. This was set up on an administrator account, and works fine. My main aim with SQL 2000 is to upsize all the companies piddling little Access 97 databases into an SQL backend and keep the 97 frontends. I have migrated some of the tablesets into SQL, and linked to them in Access 97 and they work fine. However, the problems are when I try and set up ODBC. When I enter ODBC as a different user on the server itself, the ODBC list of available SQL Servers shows me the correct server information - my PC ID no, followed by the server name. However, when I try and connect with another machine on the network, it only displays the PC ID no of the server, and not the server name. When I attempt to add the server with just the PC name, it doesnt find the server - same when I add the name of the database to the end of the PC ID no. I'm sure there is something really basic I have not done, but I'm totally stumped now. I am using Windows Auth, and have set up the login of the other PC I am trying to connect, as an authorised user. Please help me - I am just a doofus, please feel free to laugh at me...
i am learning SQL basic commands ( like , where, having, group by, order by , join ,and simple sub-query) and I got one exersice I cannot solve
table RECIPE has 3 columns , ( pizza ,ingredient,amount) each pizza could use 1 / many ingredient, each ingredient could be used by 0 / 1/ many pizza, amount means the quantity of that ingredient used in certain pizza
question: (List the ingredients, and for each ingredient, also list the pizza that contains the largest amount of this ingredient.)
============================ Raw data :
recipe ====== pizza ingredient amount -------------------------------- margarita spice 5 margarita cheese 120 ham ham 150 ham spice 5 napolitana anchovies 100 napolitana olives 75 napolitana spice 10 hawaiian ham 100 hawaiian pineapple 100 hawaiian spice 5 cabanossi cabanossi 150 cabanossi spice 10 siciliano onion 50 siciliano capsicum 75 siciliano olives 50 siciliano anchovies 50 siciliano spice 15 americano salami 120 americano pepperoni 75 americano spice 10 mexicano onion 75 mexicano capsicum 75 mexicano mushroom 50 mexicano chilli 25 mexicano spice 20 seafood seafood 200 seafood spice 5 garlic garlic 25 garlic spice 10 vegetarian onion 50 vegetarian capsicum 50 vegetarian mushroom 50 vegetarian peas 50 vegetarian tomato 50 vegetarian spice 5 mushroom mushroom 100 mushroom spice 5 special cheese 25 special tomato 25 special ham 25 special anchovies 25 special olives 25 special mushroom 25 special bacon 25 special egg 25 special pineapple 25 special cabanossi 25 special salami 25 special capsicum 25 special onion 25 special peas 25 special seafood 25 special spice 10 stagiony ham 75 stagiony mushroom 50 stagiony olives 50 stagiony anchovies 25 stagiony spice 10
I want to install SQLExp2K5 with Advanced Services on a standalone basis on my Dell Inspiron XPS laptop (Win XP sp2, .NET 2.0; 2gb RAM; 8mb broadband; hardware firewall/router) so that I can learn SQL/VB/VWD, and want to use SQL E 2K5 without internet connectivity (at least until I know what the hell I'm doing!)
Really confused as to what component(s), and services I should/should not install - so I've listed my questions below:
1. Service Account: As I'm not on / dont have a domain, i presume using a domain user account is not an option for me. Should I use the Local Service account ? If so, what are/can be the issues in doing so?
2. Authentication Mode: Is Windows Authentication the one to use for a standalone install?; how would I enable the "sa" account and set an "sa" password? In fact, do I even need an"sa" account / password for a standalone, non internet connected install?
3. Components at install: Is it OK to install all components first off?
4. IIS: Is it possible to install IIS and not allow it access to the internet (or is this a stupid question -bearing in mind I dont really know what IIS is/does)
5: Business Intelligence Development Suite: How do I add BIDS once (IF) I manage to install SQLExp2K5-Adv.Ser,?
6. SQLExp2K5 Books on-line: Am I right in thinking that I should install this after installing SQLExp2K5?
7: Visual Basic Express/Visual Web Developer Express: Do these need to be configured seperately to work with SQLExp2K5?
Sorry about the length of this post, but have tried to be as clear as possible. Also apologise in advance for silly/stupid questions :)
Does anyone know how I can get just one record returned from a select statement - not by doing set rowcount, but saying I want, for example the third record returned.
I'm trying to do a stored procedure that does a select of current records that will reduce the output to roughly 24 records and then get a random record from this - I need to do it all in a stored procedure.
What I have so far is :
BEGIN DECLARE @Count int DECLARE @RowCount int DECLARE @IDint
/* Randomise the Data */ SELECT @Count = Count(*) FROM MyTable WHERE fRotation = 1
SELECT @ID = Rand() * @Count
END
As you can see, @ID will hold a record no.
I cant use batch cursors as they are giving me problems - work for a short while and then they mess up.
I create the cube and KPI successfully.Now want to define the "trend" in MDX.the problem is the trend is not linear, but a quadradic function, which means the kpi target is the highest point in the function.in order to get the "trend expression", to get the "absolute value" is needed (as to measure how near to the target point).but i browsed the operators available, there is no ||.
Seems to me like microsoft mentions learning, but it's never for beginners. I haven't found a single tutorial that says how to make a simple database step by step.
Does anybody know about a tutorial focused on teaching the very basics (a kind of "hello world" application) from setting up the new database with a few sample fields to "deploying" it (making it ready to be used)?
Please let me know.
Once I'm through with these first steps there seems to be a lot of helpful learning resources meant for experienced and expert users, but I'm not there yet...
I have a table that expands and pushes down objects under it, i don't want this to happen i want my objects to use an absolute position so i can jiggle things how i want them - this doesn't seem to be an option in SSRS 2005?
when i put a table beside 2 graphs on my report, as the table expands it pushs the bottom table down ONLY when when it's displayed on the final webpage. the preview features shows it as being correct.
how do i prevent the expanding table from pushing the tables BESIDE it down? i could understand if it was a table below it, but it's not.
Hi all, I have a strange situation. I have a field in the database that has to be a string type field of around 4000 characters.
So naturally I setup the field as type: varchar length: 4000
However when I try to put any text in this field I find that I can put no more than 1023 characters of ascii text in there.
To check if this was a max record length prob I setup a test table with only 2 fields: ID: int, PK, Identity longVarchar: varchar, 4000
and tried to put some ascii text into the field called longVarchar. Again the most I could put in was 1023 characters!
Thinking that it could just be that SQL svr box that was wacky, I tried it on another one with the same result.
I have tried using other field types (nvarchar, char) and have found that they all could only hold 1023 characters max, no matter what how high I defined the size of the field.
Try it out yourselves and see if you get the same result. Any useful suggestions would really be appreciated.
Have a bit of an SQL challenge in that I need to create a well performing view in SQL2008R2 which calculates hours remaining at any given point in time. This is not a simple sum but has some absolute values included.
--------------------------------------------------------------------------------------------------- -- Basic simplified structure of maintenance and usage tables --------------------------------------------------------------------------------------------------- CREATE TABLE #Maintenance (Id int NOT NULL IDENTITY(1, 1) CONSTRAINT PK_Maintenance PRIMARY KEY, MaintenanceDate smalldatetime NOT NULL, -- When maintenance hours are reset HoursAvailable numeric(5, 1) NULL -- Available hours until next maintenance )
[Code] ....
--------------------------------------------------------------------------------------------------- -- Required output view so that at any given point in time I can determine hours remaining --------------------------------------------------------------------------------------------------- -- AtDate HoursAvailable -- '01-Jan-2015 15:00' NULL -- before first maintenance hence unknown -- '10-Jan-2015 10:00' 10.1 -- maintenance hours reset -- '11-Jan-2015 07:30' 8.9 -- subtract 1.2 -- '11-Jan-2015 11:10' 2.9 -- subtract 6.0 -- '15-Jan-2015 00:00' -0.1 -- subtract 3.0 -- '01-Feb-2015 00:00' 12.2 -- maintenance hours reset -- '02-Feb-2015 13:00' 10.0 -- subtract 2.2
I have a report that prints cards for customers. The body of the report contains an address box, letter body, followed by a table that contains all the people to be printed on the cards. If the number exceeds 6 people, another page is to be printed, with no address or letter body, but the table with the remainder of the people on it.
I have been able to get everything to work except for the location of the table on the subsequent pages. They do not appear at the bottom as they do on the first page, but at the top of the page. I've tried using a rectangle as a container for the table, with no luck.
I seem to remember doing this in the past, but as projects get shelved for an extended period of time, the technical knowledge tends to fade.
Any suggestions would be greatly appreciated. Thanks
We are facing some issues with SSIS and thought if you could be of some help.
Actually, instead of Deploying our SSIS projects we copy the SSIS files to a different server from where we execute the SSIS Packages. The reason being, we have a Core Version of the application and this is deployed to different markets and subsequent customisations are performed in the market specific version of the Packages. The problem is although we have a Package Configuration Xml File for our Connection object, the first time when we copy the Packages, we have to manually open each of the Package and change the URL of the Xml File for Configuration. I read through some of the articles on the internet and came to know that the Package Configuration does not support relative path and only absolute path is possible.
Can you please share some of your suggestions on the above problem.
I have a table with a BLOB column, and I need to populate this table including the BLOB column (image type in the database).
What I have done is:
1. use a flat file transform to read a .csv file which specifies the names of the files that store the binary contents for the BLOB column for each row.
2. use an Import Column Transform to read the binary files.
3. use an OLE DB Dest transform to dump the data into my destination table.
I got the error saying:
Error: 0xC02090BB at XXXX, Import Column [1]: Opening the file ".diagram1.bin" for reading failed. The file was not found.
I guess this is because my file "diagram1.bin" is not in the current path? (The current path can be found by "System.IO.Directory.GetCurrentDirectory() call, in my case it is "c:program filesmicrosoft visual studio 0common7IDE".)
My question is: how to determine the directory path information of the package I am running?
We have the customer requirement to display the footer of a SSRS Report fixed at the absolute bottom of a DIN A4 format page. The footer contains information like company address and stuff.
I searched quite a while on this topic and only found workarounds for SQL Server 2005 with Custom Code in the SSRS Report to calculate the size of the body content and then insert some empty lines to get the space needed to push the footer to the bottom of the page. But this won't work in SQL Server 2012. And I wasn't able to figure out how to achieve this yet.
I have MS SQL 2000 and 2005 Express install on my computer. I would like to know where I can get some good beginner's training and I also need to know how to run sql scripts and import database to both.
I have a SQL server that my web host has provided but I don't know who to set it up! I'm currently have an MS Access database on my web site and I want to change it to MSSQL using the Access upsizing wizards, can anyone talk me through it?
hi there. this is my first post on this forum. im new to SQLServer so please go easy on me. :)
i am trying desperately to call a stored procedure from within another stored procedure. if i post my code below could somebody tell me where i am going wrong. the SP i have written is executing OK but the OUTPUT parameter Id_User is coming back as null, whereas it should be giving my a value there. i have tried changing the line 'EXEC sp_User_I' for 'INSERT INTO @User_Id EXEC sp_User_I' but this wont compile.
CREATE PROCEDURE sp_Account_I] @Username varchar(16), @Password varchar(88), @Surname varchar(32), @DateBirth datetime, @Email varchar(64), @Id_Account int OUTPUT, @Id_User int OUTPUT
I've been banging my head against this issue, and I haven't managed to find a solution. I was hoping that maybe somebody here has done something similar.
I am trying to get the latest available pricing from a Rate table, which is based on the customer ID and the provided date from another table (Table1).
This is what the code looks like, essentially:
select table1.* ,table2.* ,table3.Rate
from table1 left outer join table2 on table1.Id = table2.Id left outer join ( Select Top 1 Rate from RateTable Where RateTable.date < table1.date order by RateTable.date desc ) as table3 on table3.custId = table1.custId
I understood that table1.date can't be explicitly passed into the nested join within table3, but does anybody know a work around that can achieve the above example (the environment is SQL server 2000 and inside a view not on in a stored proc)?
Hi,I am completely new to the BCP utility and fairly new to SQL ServerI am learning from a book and I am trying the following example (the serverI'm learning on is called contractor and a password has not been give to thesa)bcp pubs..authors out authors.txt -C -r -t, -U sa -P -S contractorWhen I run this in Query Analyser i get the error message..Server: Msg 170, Level 15, State 1, Line 1Line 1: Incorrect syntax near '.'.I have tried puuting quotes around the database and the table name asfollows-bcp "pubs..authors" out authors.txt -C -r -t, -U sa -P -S contractorand get the errorServer: Msg 179, Level 15, State 1, Line 1Cannot use the OUTPUT option when passing a constant to a stored procedure.Please can anybody help me to get this first bit working?Thanks in anticipation.
is there any SQL server book or online meterial for beginners?? i've checked msdn its seems not helpful at beginner level.like issues for installing and first time configuring SQL Server. and installing its clients etc.
hello all i'm new in dot net and as every one beginning in something i have some problems hope u guys can help me my first question is really easy i'm feeling silly to ask such a question i made database in sql server 2005 and i made a table and columns but i cant insert data into the table i dont know how to fill the table with data? my second question is can i convert sql server 2000 database to 2005 if i can how i cando that? that's all for now hope u can really help me thanks in advance
My company needs a database. My first thought was to do it in Access, because it's available! But I wanted to check that that was smart, what its limitations are, when it's better to move to bigger / more expensive software, etc.
It's probably going to have several hundred thousand records in and will grow by more than a hundred thousand every year. Is there a size limit?
Not that many fields, though - it's not that complicated a database.
tables with words in Italian and English. Connect1(#id,id1,id2); connecting word form Eng with Ita translation. Connect2(#id,id1,id2); same for Italian.
Is this correct? 3. normalisation? Will this work?
if i am creating an SP then i only specify output parameters if the SP is to return a single set of values. is that correct? if my SP is returning multiple rows from a SELECT statement then i would not specify any parameters on the SP. can somebody clarify this for me. thanks!