Since the problem keeps evolving as I try to get through this, here's a small update. Now my problem seems to be sharing the datagrid variable. It is defined like this in Controls\File.aspx.cs:
public System.Web.UI.WebControls.DataGrid dgDataGrid;
Now in the regular OtherFile.aspx.cs, I...
Hello Everyone,
I have a datagrid that pulls a query from the database, which consists of goals and each goal has an id # in the database.
So, the page displays something like this:
[checkbox] Goal1
[checkbox] Goal2
[checkbox] Goal3
And an "Update" button.
So, let's say I check Goal1 and...
Hiya,
Here's the problem. I have a stored procedure which will contains output variable. It will be called from my .cs file, something like this:
String sqlString = "Exec getEmployeeInfo ';"
but now the stored proc. is expecting output variables, so I declared some and called it like this...
Thanks to both of you. Good to know I was pretty close! I'll reply in detail later on tonight to your post, SQLSister.
Is there a way to print the @var variable so I can see that it's collecting the correct data?
So hello all!
I'm learning about stored procedures. Right now, I'm in the process of creating two of them, but having trouble with the syntax (I'm guessing).
So, first I have this one stored procedure:
CREATE PROCEDURE dbo.getEmpIDAndSSNFromHR
@SSN char(9),
@EmpID char(4) OUTPUT
AS
select...
gm,
you were correct. I tweaked your suggestion and am now using a left outer join which gives me the correct data set:
Select y.last_name, y.first_name
From database2.dbo.table2 y
Left Outer Join db1.dbo.table1 x
On y.ssn = x.ssn
Where X.emplid = '0'
Order By last_name...
SQLSister, thanks for the link. I will be playing around with all these join commands :)
gmmastros--I tried your first suggestion, i.e.:
Select y.last_name, y.first_name
From database2.dbo.table2 y
Inner Join (
Select x.ssn from db1.dbo.table1 x
where x.emplid = '0'...
Hi all,
I'm new here and this is my 2nd post. I already got tremendous help and hope someone can help me as I learn sql (took mysql two years ago). I am REALLY rusty, so I appreciate any tips/help.
Database 1:
table 1. Contains ssn, id.
Database 2:
table 2. Contains ssn, id, last_name...
gmmastros,
makes perfect sense now. I might run into more problems later (when I start developing this project). Guess I need to read up on dbs again and constructing queries with the appropriate.... 'commands' I suppose.
have a great day, gm!
Hello gmmastros,
thanks so much for the help. I am now getting the results that I need. I did a bit of a lookup on left join, and here's a clear explanation I found:
"The LEFT JOIN operation is used to create a left outer join and includes all of the records from the first (left) of the two...
Hello Everyone,
First post here. I've taken a databases course (mysql) about 2 years ago and now I'm using MSSQL and having trouble recalling all that I had learned.
I'm trying to do something fairly simple here. Let me explain:
Database 1:
Contains a table with column SSN.
Database 2...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.