Im A Noob And I Need To Make Cell Editable In Studio

Jul 10, 2007

 I have created a table in sql studio and i need to make cell editable and be able to update them to the server. I have looked around here but all i can find is code for the site side, i need a way to do it in studio if possible. BTW im very new to this so im sorry in advance

View 3 Replies


ADVERTISEMENT

Custom Dataflow Component: How Do You Make Properties Editable?

Feb 13, 2007

I have a custom component that takes in unicode stream and converts it to ascii text. However I would like to make my default string length and code page editable in the standard GUI editor. Right now I can set the default to 1000 characters, but when I try to change it, it says "Property value is not valid"

Any ideas?

Thanks!

View 1 Replies View Related

Shortcut To Insert New GUID Into Uniqueidentifier Cell In MSSQL Management Studio Express?

Jul 15, 2006

Hi,

anyone knows if there's an easy way to insert new GUIDs into uniqueidentifier cells when editing data in table on Management Studio Express? or Visual Studio 2005 Server Explorer? I can't find a shortcut, and copying from external tools is pain..

I suppose it's possible to build a VB macro in Visual Studio, would it work when editing table data?

Thanks in advance!

View 8 Replies View Related

Copying An Ntext Cell From One Cell Into Another (destination Row Already Exists)

May 6, 2004

Hi!

What I'd like to do is:

UPDATE table1
SET
A_TEXT_COLUMN = (SELECT another_text_column
FROM table2
WHERE table2_id = @precomputed_id_1)
WHERE table1_ID = @precomputed_id_2

Since the cells are text, this does not work. Since the cell to be updated is in an already exitant row, it's not possible to simply use insert.

I'd like to do something like (PSEUDOcode):

WRITETEXT(table1.A_TEXT_COLUMN, READTEXT(@textptr_initialised_to_point_at_target_c ell))

But the *actual* synatx of WRITETEXT and READTEXT seem totally inappropriate for any such trick...

Any hints or pointers HUGELY appreciated... THANX

View 1 Replies View Related

Is There A Way To Do Mass Formatting Of Cells In A Table Instead Of Cell By Cell?

Oct 5, 2007



Hi,
I'm working with MRS and I've got a table with a lot of entries. For each value in the table I'm trying to get the text colour to be set to 'red' when the value of the cell is less than 0. Otherwise remain black.

I can do this by setting the colour property cell by cell. But I have a lot of cells in the table. Is there a way to set the statement to apply to ALL cells in the table?

Basically I'm asking if there is a way to set the property in bulk instead of going through tediously cell by cell.

Any help would be much appreciated. Thanks!

View 4 Replies View Related

READ EXCEL DATA CELL BY CELL FROM SP

Jul 20, 2005

HI,I HAVE AN EXCEL SHEET WITH SOME DATA, I WANT TO IMPORT THAT DATA (CELLBY CELL WITH MANIPULATION) INTO THE SQL SERVER TABLES BY USING STOREDPROCEDURE(IF POSSIBLE).IF ANYBODY HAVE DONE SIMILER TYPE OF JOB OR KNOWING ABOUT IT, PLS. LETME KNOW.THANKS IN ADV.T.S.NEGI

View 4 Replies View Related

How Do I Use The Visual Studio 2005 To Make A Data Base Column Unique?

Jun 14, 2007

I am sorry if this is the wrong forum for this question but I can not find better fit.
I am using Visual Studio 2005 to write an asp.net web site which includes an SQL data base. In the databaseI have a table called 'ACCOUNTS' which has primary key column called 'ID' and a nvarchar column called 'Name'.
I want the values in the 'Name' column to be unique in the table so that all accounts have unique names. I don't want to make the 'Name' column the primary key because I want people to be able to change the name of their account after it has been created.
It seems to me there must be some way to add such a constraint to the table but I can find none. I have searched the documentation and seen loads of references to unique columns but I can't find any way to set a column to unique thru the IDE (or any other way). Can anyone help me?
Thanks in advance for any help. 
 

View 2 Replies View Related

Integration Services :: How To Make SSIS Prompt For Connection Values When Running A DFT Or Package From Visual Studio

Jul 15, 2015

Our project is on SSIS 2012 and we are using the project deployment model. We have parameter the connection managers, created environments, environment variables and configured the references. Hence, when we deploy the solution to higher environments, the connection strings are picked from the environments and not the ones stored in the connection manager.

However, we face issues when in development environment, we need to run the same package but by entering the values manually in the connection manager. Even though the connection details are correct, when we execute the package from Visual Studio, SSIS is not able to connect to the database. Is there any way to have SSIS prompt for the connection details after we have click on "Execute Task" or "Start" from Visual Studio? 

View 6 Replies View Related

Fully Editable Datagrid

Nov 10, 2005

I have been trying to formulate a fully editabe datagrid for a couple of days with no luck.  I have used code from 4guys and some other sites and am at the point where I can render the datagrid correctly (as a bouncolumn and template column-textbox) but when I try to update the database it all falls apart.  I am getting "input string was not in a correct format" and the error references ...Dim id as Integer = Convert.ToInt32(sls.DataKeys(dgi.ItemIndex))I suspect the problem lies in the area of primary indexes and such.  The table I am using is a simple two-column table with usernames, passwords.  Username is the primary field. Here is the actual code I am using...<code><%@ Page Explicit="True" Language="VB" Debug="True" %><%@ Import Namespace="System.Data" %><%@ Import Namespace="System.Data.OleDb" %><html>
<script runat="server">Dim Connect As OleDbConnection = New OleDbConnectionDim Adapter As OleDbDataAdapter = New OleDbDataAdapterDim DS As DataSet = New DataSetDim ConnectString, SelectStatement As String
Sub Page_Load(Sender As Object, E As EventArgs)
If Not IsPostBack Then SelectStatement = "Select * From Table"ConnectString = "Provider=SQLOLEDB;UID=;PWD=;" & "Data Source=;Initial Catalog=;"
Connect.ConnectionString = ConnectStringAdapter.SelectCommand = New oleDbCommand(SelectStatement, Connect)Adapter.SelectCommand.Connection.OpenAdapter.Fill(DS, "Items")sls.Datasource = DS.Tables("Items")Page.DatabindConnect.Close()End IfEnd Sub
Sub Click(sender As Object, e As EventArgs)  Dim myConnection as New OleDbConnection(ConnectString)Dim updateSQL as String = "UPDATE Table SET password = @Password WHERE Username = @ID"Dim myCommand as New oleDbCommand(updateSQL, myConnection)
Dim dgi as DataGridItemFor Each dgi in sls.Items  'Read in the Primary Key Field  Dim id as Integer = Convert.ToInt32(sls.DataKeys(dgi.ItemIndex))  Dim password as String = CType(dgi.FindControl("txtPass"), TextBox).Text
        'Issue an UPDATE statement...    myCommand.Parameters.Clear()  myCommand.Parameters.Add("@ID", id)  myCommand.Parameters.Add("@Password", password)
  myCommand.ExecuteNonQuery()Next
    End Sub
</script><body><form runat="Server">
<asp:datagrid id="sls" runat="server" AutoGenerateColumns="False" datakeyfield="Username">   <Columns>    <asp:BoundColumn HeaderText="UserName" datafield="Username"/>
         <asp:TemplateColumn HeaderText="Password">      <ItemTemplate>        <asp:TextBox runat="server" id="txtPass" Columns="10"              Text='<%# DataBinder.Eval(Container, "DataItem.Password") %>' />      </ItemTemplate>    </asp:TemplateColumn>
  </Columns> </asp:datagrid><asp:button id="Update" text="Update All" runat="Server" onclick="Click"/></form></body></html></code>Anyone have any idea as to why the id variable (error message above) is causing problems?

View 2 Replies View Related

Editable Textbox On The Report

Jun 11, 2007

Hello,



I want to put a textbox on the report such that the end-user can type in that textbox and then the text entered in the textbox could be captured by the report and could be used for further processing. Any pointers to this??



Thanks,

RS-2005

View 1 Replies View Related

User-editable Fields In A Report - How?

Sep 10, 2007

Is it possible to set up a report so that there's a column where the user can insert data of their own, which then gets saved to the underlying database?

What I'm thinking of is the ability to have a drop-down box at the end of each row of data in the report, whereby the user can select an option to specify the action they have taken in response to the data. Is this possible, and if so, how exactly would I achieve this?

View 9 Replies View Related

Trouble With Editable Data Grid In A Web Page

Apr 12, 2004

I try to find the way to create editable data grid (a view from MySQL database) in a web page. So, user can edit, add, or delete from one page instead of having switch edit, insert pages, one field in the view only. Any script I need to write or any special server behavior I can use?

Thanks a lot any one can help with.

Ann

View 1 Replies View Related

Editing Underlying Boolean Data Without Making Cells Editable

Oct 5, 2007

I'm having a real hard time coming up with a solution to this problem.  I created a custom gridview control from Dino Esposito's "Extending Gridview" article which autogenerates a checkbox column that allows for multiple record selection.  Once a user checks a box, the entire row gets selected.  I added a dropdown list on the top of the page that has only two options, "Yes" or "No".  What I'm trying to do is update a boolean column called "contract" (I'm using the Pubs sample database) for all selected rows (via checkboxes checked) depending on whether the user selects "Yes" or "No" from the drop down menu.  For example,1)  the user selects "No" in the dropdown2) The user checks all rows in the checkbox column for which he wants the  all the values"contract" field set to "No"3) The user then clicks on a button called "Submit" and all selected records get updated to "No" under the "contracts" column.  The idea is to allow the user to change the boolean values from a field for multiple records.  Hence, making individual cells editable is pointless.  Anybody have an idea how to go about this?

View 3 Replies View Related

Reporting Services :: Export Server Report Chart To Excel As Editable Chart

Jul 17, 2014

When I export the report in excel format the chart is displayed as picture. I want it to be displayed as editable chart.Does Office Writer work in this situation and did anyone use Office Writer to accomplish same type of problem.Is there any other method or product we can use instead of the office writer.

View 2 Replies View Related

T-SQL Noob!!!

Dec 21, 2005

In VB, I have this code...


lSQL = "SELECT * FROM OPENQUERY(liorder,'SELECT a.KF_ORDER_NO AS OrdNo, f.KU_NAME AS Customer, " & _
"a.KF_ORDER_POS AS Pos, a.KF_SCHEIB_NR AS Pane, a.KF_QTY AS Qty, d.BREITE*d.HOEHE/1000*a.KF_QTY AS SQM, " & _
"a.KF_QTY*d.SUM_NETTO AS Val, a.KF_FERT_QTY AS Done, d.BREITE*d.HOEHE/1000*a.KF_FERT_QTY AS DoneSQM, " & _
"a.KF_FERT_QTY*d.SUM_NETTO AS DoneVal FROM LIORDER.AUF_KOPF c, LIPROD.KAPA_AUS_FERT a, LIORDER.KUST_ADR f, " & _
"LIORDER.AUF_POS d WHERE (f.KU_VK_EK = 0) AND (a.KF_SCHR_NR = 12) AND (c.AUF_NR = a.KF_ORDER_NO) AND " & _
"(c.KUNR = f.KU_NR) AND (a.KF_ORDER_NO = d.AUF_NR) AND (a.KF_ORDER_POS = d.AUF_POS) AND (f.KU_NAME IS NOT NULL) " & _
"GROUP BY a.KF_ORDER_NO, f.KU_NAME, a.KF_ORDER_POS, a.KF_SCHEIB_NR, a.KF_QTY, d.BREITE, d.HOEHE, a.KF_FERT_QTY, d.SUM_NETTO')"
Set RS = New ADODB.Recordset
RS.Open lSQL, DB

Do While Not RS.EOF
Select Case RS!Pane
Case "0" Or "1"
glassSQL = "SELECT IDNR, GL_BEZ FROM OPENQUERY(liorder, 'SELECT a.IDNR, a.GL_BEZ FROM LIORDER.GLAS_DATEN a, LIORDER.AUF_POS b " & _
"WHERE a.IDNR = b.GLAS1 AND b.AUF_NR = " & RS!OrdNo & " AND b.AUF_POS = " & RS!Pos & "')"
Set glassRS = New ADODB.Recordset
glassRS.Open glassSQL, DB

SQL = "INSERT INTO PendingLamination (OrdNo, Customer, Pos, Code, GlassDesc, Qty, SQM, Val, Done, DoneSQM, DoneVal) " & _
"VALUES ('" & RS!OrdNo & "', '" & Apostrophe(RS!Customer) & "', '" & RS!Pos & "', '" & glassRS!IDNR & "', '" & glassRS!GL_BEZ & _
"', '" & RS!Qty & "', '" & RS!SQM & "', '" & RS!Val & "', '" & RS!Done & "', '" & RS!DoneSQM & "', '" & RS!DoneVal & "')"
DB.Execute SQL
Case "2"
glassSQL = "SELECT IDNR, GL_BEZ FROM OPENQUERY(liorder, 'SELECT a.IDNR, a.GL_BEZ FROM LIORDER.GLAS_DATEN a, LIORDER.AUF_POS b " & _
"WHERE a.IDNR = b.GLAS2 AND b.AUF_NR = " & RS!OrdNo & " AND b.AUF_POS = " & RS!Pos & "')"
Set glassRS = New ADODB.Recordset
glassRS.Open glassSQL, DB

SQL = "INSERT INTO PendingLamination (OrdNo, Customer, Pos, Code, GlassDesc, Qty, SQM, Val, Done, DoneSQM, DoneVal) " & _
"VALUES ('" & RS!OrdNo & "', '" & Apostrophe(RS!Customer) & "', '" & RS!Pos & "', '" & glassRS!IDNR & "', '" & glassRS!GL_BEZ & _
"', '" & RS!Qty & "', '" & RS!SQM & "', '" & RS!Val & "', '" & RS!Done & "', '" & RS!DoneSQM & "', '" & RS!DoneVal & "')"
DB.Execute SQL
Case "3"
glassSQL = "SELECT IDNR, GL_BEZ FROM OPENQUERY(liorder, 'SELECT a.IDNR, a.GL_BEZ FROM LIORDER.GLAS_DATEN a, LIORDER.AUF_POS b " & _
"WHERE a.IDNR = b.GLAS3 AND b.AUF_NR = " & RS!OrdNo & " AND b.AUF_POS = " & RS!Pos & "')"
Set glassRS = New ADODB.Recordset
glassRS.Open glassSQL, DB

SQL = "INSERT INTO PendingLamination (OrdNo, Customer, Pos, Code, GlassDesc, Qty, SQM, Val, Done, DoneSQM, DoneVal) " & _
"VALUES ('" & RS!OrdNo & "', '" & Apostrophe(RS!Customer) & "', '" & RS!Pos & "', '" & glassRS!IDNR & "', '" & glassRS!GL_BEZ & _
"', '" & RS!Qty & "', '" & RS!SQM & "', '" & RS!Val & "', '" & RS!Done & "', '" & RS!DoneSQM & "', '" & RS!DoneVal & "')"
DB.Execute SQL
End Select

ProgressBar1.Value = ProgressBar1.Value + 1

If ProgressBar1.Value = 800 Then
ProgressBar1.Value = 0
End If

RS.MoveNext
Loop

...and I'm planning to use the same flow of logic in the SQL Server Agent using T-SQL. Is there any way I can do it?

View 6 Replies View Related

Noob: How Do I Run Pl/sql On Ms Sql?

Feb 9, 2004

Hi experts,

I'm using MS SQL 2000. The closest i could get to having pl/sql within ms sql was tru its stored procedures feature.

I created a new stored procedure within the built-in Northwind database. I pasted the following inside:

-----------------------------------------------------------------
declare

vname Employees.firstname%TYPE;

begin

SELECT firstname INTO vname FROM Employees
WHERE firstname = 'Nancy';

dbms_output.put_line ('Name is ' || vname);

EXCEPTION

when NO_DATA_FOUND then
dbms_output.put_line ('no data found');

when TOO_MANY_RECORDS then
dbms_output.put_line ('too many records');


END;

-----------------------------------------------------------------


I checked the syntax and i get some error about the employees table.
Error 155: 'Employees' is not a recognized cursor option

Any idea?

Thanks..

View 1 Replies View Related

SQL Noob Needs Help

Aug 25, 2005

Mike writes "I have a string, >!~[99DC# 4.12$2251.% 1.63& 3.58'2150.(-2050.>/~]

and I would like to extract parts of it and send it to a SQL database. here is the layout and data that should be in each column. The Data column will be filled in automatically, but once that happens I would like the other columns to get their data from the Data column.

Data = >!~[99DC# 4.12$2251.% 1.63& 3.58'2150.(-2050.>/~]
Display_Address = 99
CE = 4.12
TPK = 2251
Si= 1.63
C = 3.58
TPL = 2150
TPS = 2050

Can anyone tell me how to do this?"

View 1 Replies View Related

Noob Needs Help!

Jun 7, 2007

/* hi people im doing a task and im not sure about some things. could u check if what im doing is good plz.*/

The task is:
Produce a list of all female employees who earn more than the average salary of the male employees in the company. Display employee number, first name and last name.

The table: emp
Attributes: EMPNO, FIRSTNAME, LASTNAME, SEX, SALARY

What i came up with:
selectempno, firstname, lastname
fromemp
whereavg(salary)>any(selectavg(salary)
fromemp
wheresex='M')
group by sex
havingsex = 'F'

View 3 Replies View Related

Noob SQL Help

Aug 7, 2007

Here is my code to connect, any help would be appreciated. I am a total noob at this.

############### Code

<?php
$host="localhost"; // Host name
$username=""; // Mysql username
$password=""; // Mysql password
$db_name="orderofb_test"; // Database name
$tbl_name="orderofb_test.members"; // Table name

// Connect to server and select databse.
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");

// username and password sent from signup form
$myusername=$_POST['myusername'];
$mypassword=$_POST['mypassword'];

$sql="SELECT * FROM $tbl_name WHERE username='$myusername' and password='$mypassword'";
$result=mysql_query($sql);

// Mysql_num_row is counting table row
$count=mysql_num_rows($result);
// If result matched $myusername and $mypassword, table row must be 1 row

if($count==1){
// Register $myusername, $mypassword and redirect to file "login_success.php"
session_register("myusername");
session_register("mypassword");
header("location:login_success.php");
}
else {
echo "Wrong Username or Password";
}
?>


This is the error message I receive.

############### Code

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/orderofb/public_html/php/checklogin.php on line 11
cannot connect


I changed all the permissons to 777 and I still receive this error.

$tbl_name="orderofb_test.members"; // Table name

Is this the correct table name? Here is a pic of my phpmyadmin

http://mnetcs.com/thumb/storage/b3583134.JPG

View 2 Replies View Related

SQL Noob Help Required

Sep 26, 2007

I am trying to create a script that will return information from 4 different tables in a database using different where clauses.

This is working correctly, however the primary table the query uses has multiple entries for different people and i only want to return the last row per person.
I have got this to work using a MAX(t.column) statement, but when used in conjunction with all the where clauses things go wrong.

This is what i have


Code:

CREATE VIEW Firereport1 AS

select max(t.punch_id) as punch, e.EMPLOYEE_FIRSTNAME, e.EMPLOYEE_LASTNAME, c.CLOCK_NAME, t.PUNCH_TIME, d.DEPT2_DESCRIPTION

FROM TM_PUNCH t, EMPLOYEE e, COMM_CLOCK c, DEPT2 d

WHERE t.PUNCH_EMPID = e.EMPLOYEE_ID
and e.EMPLOYEE_ONCLOCK <> 'False'
and e.EMPLOYEE_LASTTIMELOC = c.CLOCK_ID
and e.EMPLOYEE_LASTDEPT2 = d.DEPT2_ID

group by e.EMPLOYEE_FIRSTNAME, e.EMPLOYEE_LASTNAME, c.CLOCK_NAME, t.PUNCH_TIME, d.DEPT2_DESCRIPTION

GO



This returns multiple entries because there are multiple unique entries for t.punch_time.

What i was thinking is i need a where statement on t.time_punch, d.dept2_description, c.clock_name
that says something along the lines of where return t.punch_time where t.punch_id=punch (**substitute correct column names**)

This is a sample of the tm_punch table


Code:



PUNCH_ID PUNCH_SEQNR PUNCH_EMPID PUNCH_DATE PUNCH_TIME PUNCH_MODIFIED PUNCH_PC PUNCH_CLOCKID PUNCH_DATA1 PUNCH_DATA2 PUNCH_DATA3 PROJECT_ID
141 0 52 2007-07-05 00:00:00 603 -1 0 0 0 0 0 NULL
142 0 52 2007-07-05 00:00:00 909 -1 0 0 0 0 0 NULL
143 0 52 2007-07-05 00:00:00 911 -1 0 0 0 0 0 NULL
144 0 52 2007-07-05 00:00:00 914 -1 0 0 0 0 0 NULL




If the query works correctly what should be returned is just the line with id 144

can anyone point out where i'm going wrong

View 3 Replies View Related

A, B And C Are The Same But At Least D Or E Are Different (was Noob Question)

Aug 23, 2006

hi,

just wanted to ask the most efficient way to query for the following:
say i have a table with the following columns A, B, C, D, E.
i want to find the records whose A, B and C are the same but at least D or E are different and then display all the columns (A to E) for these records.
thank you!

g11DB

View 8 Replies View Related

Total Sql Noob Help

Nov 19, 2007

Hi Everybody.

So as the subject states, I'm a total sql noob. I have a database in SQL 2k5 that was transfered over from an acces DB. In the sql db there are a few fields using nvarchar(255) but the data held is actually dates and times. I need to convert these over to datetime format but do no know how. Also, not all rows have a full mm/dd/yyyy hh:mm format. some hold only the date and can be seen as either m/d/yyyy or full out mm/dd/yyyy format. If anyone can help with this that would be great.

Thanks

View 2 Replies View Related

Noob Question

Dec 14, 2007

Hi

I installed sql sever 2005 enterprise edition in my computer.Where is the management studio? Is it a different program? Can I install the express edition of the management studio?Help please.

View 6 Replies View Related

Noob SQL Question

Mar 1, 2008

Ok so i have something like this for a simple quary,

select avg(reorderlevel)/ (avg(QOH)/(avg(reorderlevel)*2)) as "Needed qty",ItemCategory from item
group by ItemCategory



What I basicly need to do is to output the quantity needed for QOH to be 2 times the amount of reorderlevel. then grouped by diffrent catagories.

Anyways I have the formula done and it should work except for some reason "(avg(QOH)/(avg(reorderlevel)*2))" gives me 0 when in fact it should give me 0.728383 or w/e. Im wondering if its omiting the decimals or what??

Because if i run that code it tells me i cant divid by zero

Sorry im new at this and might be doing this all wrong so go easy on me =/

Thanks a lot

View 7 Replies View Related

Noob On Security But...

Apr 30, 2008

Apologies first up -I dont do security so slapped wrists all round, but I have a little situation that I need to take seriously so I thought I'd try do the job right for a change.
Scenario: I have a stored procedure that I want one, and only one, 'thing' to have access to. The 'thing' will be one and only one SSIS package invoked by external scheduling software so basically a call to the dtexec utility to run the package stored in the file system. At runtime therefore, this package has an ExecuteSQL task which connects to the server and runs the sproc. Given windows authentication how do I ensure that the ONLY user allowed to execute the stored procedure is whatever user happens to invoke the package but that this same user can never log in to sql server and execute the stored procedure. In even simpler terms, I want nothing on earth to run that stored procedure nor select the data from the table other than this package when it runs, regardless of who runs it, it is only internal processing by the package that gets the data.

View 1 Replies View Related

Total Noob Can't Get Db Connection......

May 9, 2007

My background is networking with a lot of SQL Server 6.5-2000 dba/sql code thrown in.  I've written some straight ASP pages, some Access DB frontends to SQL etc and I just can't get this .Net stuff.
 I'm trying to work my way thru the getting started vids here and can't get a db connection to the membership db.  I ran the aspnet_regsql.exe to create the db on my sql dev box, and it won't connect.  I've added the code from http://aspnet.4guysfromrolla.com/articles/120705-1.aspx to the web config. 
I erased the connection strings from the web config....I installed SQL 2005 express on my local machine and STILL CAN'T get anything other than can't connect to data store, data store doesn't exit, click here to crash....blah blah blah.
There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store. The following message may help in diagnosing the problem: Unable to connect to SQL Server database. 
blah blah 
Test  the AspNetSqlProvider and get
Could not establish a connection to the database. If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider.
again.
I know the machine itself is fine.  It built the db on both the local machine and the remote sql server.  I can connect to the local and remote sql servers using sql management studio.
Can someone help a brother out?

View 2 Replies View Related

Case Sensitive SQL - Pls Help A Noob

Feb 5, 2005

I just created my first Asp.net app. I had to install it to a corporate server. What I found is that the corporate SQL Server 2000 was case sensitive in the stored procedures while my installation was not!
How can I set my SQL Server 2000 to be case sensitive as well?

View 1 Replies View Related

Please Help A Noob Out In Stored Procedure!

Jul 14, 2005

Hi All,
    I'm a newbie in stored procedure programming. I wanted to learn how to perform keyword(s) search with stored procedures.   Take the Pubs database for example.  How can i create a stored procedure which takes in a string of keywords and return the title_id, title and notes column ?  like if i pass in "computer easy" as keywords then the stored procedure should return all the rows with ANY of these keywords in those 3 columns.  Can anyone give me some ideas on how to do this? like do i have to use dynamic sql?, any tutorials or sample codes? Thanks in advance!regards

View 16 Replies View Related

Noob Question For Msde2000

Apr 20, 2004

looks like a noob question but how can i manage msde2000...i can see sql is runnin but how can i create database , attach/detach database, write functions and so on...

thanx alot for the reply :)

View 2 Replies View Related

Complete Noob Needs A Lot Of Advice

Dec 15, 2005

I was given the task of writing a new website for my boss.
problem being he wants the ability have a custom user signup form and then a picture gallery of service with comments listed off each one.
I was also asked to produce this in .aspx with SQL.
only one small glitch, never worked with either of them....
I have designed most of the database requirements off of examples I found online but have not found how to post data from the users signup form to the database correctly and retrieve it for the customers profile.
any suggestions????
all help on this will be greatly appreciated

View 9 Replies View Related

Noob: Why Does This Query Work?

Jul 23, 2005

I'm wondering how/why this query works. Trying to get my head wrappedaround SQL. Basically the Query deletes from the Import table allrecords that are already in FooStrings so that when I do an insert fromthe FooStringsImport table into the FooStrings table, then I won't getprimary key violations.DELETE FROM FooStringsImportWHERE EXISTS(SELECT * FROM FooStringsWHERE FooStringsImport.FooKey = FooStrings.FooKey)It seems to work fine, but I'm wondering about how the EXISTS keywordworks.(SELECT * FROM FooStringsWHERE FooStringsImport.FooKey = FooStrings.FooKey)This part is going to return only records from FooStrings correct? Ordoes it do a cartesian product since I've specified more than one tablein the WHERE statement?I wonder if it only returns records in FooStrings, then I don't see howa record from FooStringsImport would "EXISTS" in the records returnedfrom FooStrings.The reason I wondered about the cartesian product is because, if onlyFooStrings is specified in the FROM part of the SELECT statement, thenI was thinking it is only going to return FooString records. Theserecords would then be returned by the select statement to the WHEREEXISTS, which would look for FooStringImport records, but would findnone because the select statement only returned FooString records.I'm guessing maybe because it has to do a cartesian product to evaluatethe WHERE Pkey's equal, then the "SELECT *" just goes ahead and getsALL the fields, and not just those in FooStrings.FooStrings and FooStringsImport are identically structured tables,where the FooKey is set as the primary key in each table:CREATE TABLE [dbo].[FooStrings] ([FooKey] [bigint] NOT NULL ,[Name] [char] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,[StartDate] [datetime] NULL ,[EndDate] [datetime] NULL ,[Code] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL) ON [PRIMARY]GOThanks in advance. I'm so appreciative of the help I've gotten here,as I've been able to write several very useful queries on my own nowafter everyones help and plus lots of reading on my own.

View 4 Replies View Related

Noob Having Troble With Group By Etc.

Sep 6, 2006

Well i guess it is a bit more than just group by but here we go...

General description :( background info on the problem; may or may not be needed)

I am trying to get a list of active card holders for a particular month.  A card holder is considered active if their status was active any time during that month. I have a card holder status in my  CardHolder table but that will only give me their current status.    I also have a CardHolderHistory table that saves any changes to a card holder including their status.  Using the CardHolderHistory table i can find out who was active for any month in question by using the following algorithm:

A card holder is active if they meet one or both of the following conditions;

1) The last entry before the month in question has them as active in CardHolderHistory or

2) They were set to active any time during the month in question 

The problem:

I create a temporary table and copy the card holders into the table with separate select into statements for each of the above conditions.  For the first condition, I first gather all the CardHolderHistory entries before the month in question with the following select

select EmployerName, cardholderhistory.FirstName, cardholderhistory.Initial, cardholderhistory.LastName, ChangeDate, CardHolderHistory.CardState, FKEmployerID

into #MonthlyCards from cardholderhistory left join Employer on PKEmployerID = cardholderhistory.FKEmployerID

where changedate<@datespecified
This gives me ALL of the CardHolderHistory before the month in question (@dateSpecified).
It would look something like this
 
EmployerName             First      Initial     Last      Status   ChangeDate                  EmployerID
-------------------------------------------------------------------------------------------------------------------------------
.
.
.
Some Fake Company    John     P          Doe      A          2006-05-02 11:34:26.360            109
Some Fake Company    John     P          Doe      A          2006-03-28 11:14:10.520            109
Some Fake Company    Jane     T          Doe      S          2006-05-30 15:34:14.900            109
Some Fake Company    Jane     T          Doe      A          2006-03-28 12:20:03.670            109
Some Fake Company    Jane     T          Doe      A          2006-03-01 10:12:45.320            109
.
.                                 (S = suspended; A = Active)
.
 
Now I need to make sure people are only listed once and remove everyone whose status = suspended for their last change date.  That is my problem; I can€™t figure out how to remove these people.  The next step i took was to do a group by with EmployerName, FirstName, Initial, LastName, Status, Max(ChangeDate), FKEmployerID.  This removes everyone listed multiple times except if their status changes.  After the group by the list would be
EmployerName             First      Initial     Last      Status   ChangeDate                  EmployerID
-------------------------------------------------------------------------------------------------------------------------------
Some Fake Company    John     P          Doe      A          2006-05-02 11:34:26.360            109
Some Fake Company    Jane     T          Doe      S          2006-05-30 15:34:14.900            109
Some Fake Company    Jane     T          Doe      A          2006-03-28 12:20:03.670            109
 
Now I need to delete Jane completely, since her latest status is S.  I could delete where Status = €˜S€™ but that leaves her as active from 3/28.  I can€™t figure out how to completely remove Jane.  The rest I can figure out I think.  Please help me get rid of Jane for good, I don€™t like her.
 
Thanks for any help,
 
Rico

 

View 6 Replies View Related

Easy NOOB Question

Jul 22, 2006

Hi,

I'm trying to pass a parameter into a procedure and not getting the results I want.  There's probably better ways to write the procedure, and if you want to suggest one, that's ok, but I'm most interested in just getting the stupid thing to work.  I'm trying to search a bit field in a table with the bit field being the parameter that isn't working.  In the code I include below, @category is the parameter that isn't working.  For this case, "category" is a bit field in a table and I want to be able to pass in different fields and find out if they're set.  When I use the parameter @category, the result isn't right.  If I hard code the field name (for the case below, "Compensation" is the DB field name), it works.  I'm declareing the calling procedures parameter as a bit field too.  Code follows:

CALLING PROCEDURE:

DECLARE

@include int,

@Compensation bit,

@performanceBool bit

-- Find out if this category is included in the Plan Summary

-- CALLING PROCEDURE WITH PROBLEM PARAMETER IS BELOW

execute @include = dbo.PlanSummary @planId, @version, @Compensation

IF @include = 0

BEGIN

 

CALLED PROCEDURE:

ALTER PROCEDURE [dbo].[PlanSummary]

(@planId int, @version float, @category bit)

AS

-- Find out if this Category should be included in the Plan Summary

DECLARE planSummary CURSOR

 

If I hard code "@category" below as the DB field name "Compensation", it works, but using the parameter @category, it doesn't.

 

FOR SELECT DISTINCT COALESCE ((SELECT @category

FROM ProvisionsPlanSum

WHERE (PlanId = @planID) AND (Version = @version)),

(SELECT Compensation

FROM ProvisionsPlanSum AS pps

WHERE (PlanId = - 99))) AS fred

BEGIN

DECLARE @index as int

DECLARE @planSum as bit

DECLARE @id as int

SET NOCOUNT ON;

OPEN planSummary

FETCH NEXT FROM planSummary INTO @planSum

-- If the FETCH_STATUS is 0 a row was retrieved

IF @@FETCH_STATUS = 0

BEGIN

-- Find out if the Committee bool is set to true

IF @planSum = 'true'

BEGIN

RETURN (0)

END

ELSE

BEGIN

RETURN (1)

END

END

CLOSE planSummary

DEALLOCATE planSummary

END

GO

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved