How Can I Enter A User Input Into 2 Tables Simultanously?

Oct 25, 2004

I'm running asp.net on an XP machine with MSDE 2000 as the database. I want to create a user table with a userid and password. I have a second table that contains details about the user such as home address and phone number etc. When the user first signs up, I want their userid to go into the user table and the user detail table. In my SQL insert command, I can't get @userId to go into both tables. So my question is how do I get the userID to go into both tables or is there a better way of doing this altogether?





Thanks,


Tom

View 1 Replies


ADVERTISEMENT

Possible For User To Enter A Range Of Date

Nov 24, 2014

I have been asked to write a query on SBO.It requires (among other) a reference to a budget, which does not exist anywhere now.It is a yearly budget that changes quarterly.I suppose I could add a table and update the no. each quarter - but will the history be kept?What would you recommend?Also, they require a quarterly comparison (all in the same report) is it possible for the user to enter a range of date (for sales data, for example) and also receive the data for that range only last year's?

View 5 Replies View Related

PRompting The User To Enter Dates

Apr 21, 2008



Is it possible in Reporting Services to prompt a user for dates that can then be used to do calculations?

View 4 Replies View Related

Can't Enter User&&password For Integration Services

Oct 27, 2006

I'm about to start using Integration Services in Mgmt Studio 2005.

But, when I try to register a server for Integration Services,
the option for choosing between Windows authentication and SQL Server
authentication is greyed out, and it's set to Windows.
My domain user is automatically filled in, but greyed out. I can't enter
my password since this field is also greyed out.
Is this some installation problem? (Connection to a Database Engine works fine.)

View 3 Replies View Related

How To Restrict User To Enter Phone Number In Word

Dec 5, 2014

I am designing wepage using Asp.net with Sql server as database. I have used Multiline textbox in which user has to enter their family detail. Like number of brother and sister family status, source of Earning for family.

But User do not have to enter his/her phone/contact number. For that I restricted the user to enter any nuberic digit through asp.net Regex. But User is too smart now they are entering his/her contact number in words.

Suppose somebody's Contact number is 533445928 as they can not enter numberic digit because of asp.net regex which allows the user to enter only alphabets. Now they are entering their contact number in words like five three three four four nine two eight seven. I would like to restrict the user to enter contact detail in words also.

View 1 Replies View Related

How Do You Allow Users To View Reports Without Having To Enter User/password?

May 31, 2007

Ideally, I'd like to have the reports use windows authentication, ie grab current user/password so long as user does not have to enter it manually. If that is not possible, then how do I make it so user does not have to enter this info manually? My theory is that I have IIS set up incorrectly for doing this, but I'm not familiar enough with either reporting services or IIS to find out.

View 1 Replies View Related

SQL Server 2012 :: SSRS - Display A Message When User Enter Wrong Parameter?

Mar 12, 2015

Issue #1 I have a report that takes 8 character parameter, A error message needs to popped out if user enters parameter less than 8 character.

Issue #2 I have a report with Tablix. A message needs to display if Tablix returns no Rows.

View 1 Replies View Related

Basic Webpage To Enter Data Into Multiple Tables?

Apr 27, 2015

Make a few simple pages to enter data into multiple tables in my SQL DB.

I have the DB designed and IIS setup but I am trying to wrap my head around the php connection to the DB and then relating the tables/columns in the "Input" page.

After this is done I will use SRS to use these entries to show reports hourly.

View 4 Replies View Related

Enter Default Values For All Columns In All Tables Except Primary Keys

Jul 23, 2005

How can i enter Default Values of " " to all the columns of type characterof all the tables (excluding system tables) and Default Values of 0of all columns of type numbers. Excluding all primary key columns.Thank you

View 1 Replies View Related

User Input

Aug 14, 2002

Hi all,
Can anyone tell me about how to prompt a user to type when running a sql statement through query analyzer.
thanks
Jay

View 1 Replies View Related

User Input

Apr 23, 2008

I have created a query that has a "When" and an "And" function.

I know need to make the query run on user input, i want it to ask for the date, then name to run the query

View 2 Replies View Related

User Input With Sql...

Nov 1, 2006

Afternoon...
I have a database for a pretend dvd hire company and need to create a query that uses user input as part of the query.

Ie, select * from dvd where actor = 'Tom Cruise';

The 'Tom Cruise' part of the query needs to be user input every time the query is ran... Can you help?

Many thanks in advance!?

View 14 Replies View Related

User Input

May 14, 2007

Is it possible to allow user input via a Reporting Services Report? What I mean is could a report be created that would allow someone using the report to enter a number that would be written to the SQL database?

View 1 Replies View Related

How Do We Determine Which User Database Tables Are Mostly Retrieved By User Or Modified By User?

May 22, 2008



Hi,
Please give the T-SQL script for this ? Thanks

Shanth


View 4 Replies View Related

User Input - SQL Paramaters

Dec 18, 2007

 Hi, Just wondering if I could make sure that "hackers" don't tamper with my querystring - which is a parameter for a SQL query. i.e...  Dim ListOfValues as string = request.querystring("listOfValues")

'Output would be this: 324234,5445,554654,45632,SQL command :  Delete From table where product_id IN (@ListOfValues)

cmd.paramaters.addwithvalue("@ListOfValues", ListOfValues ) 



How can I validate it so that hackers can't add any characters other than 'numbers' and ' , ' to the sql parameter? I have tried to tryparse the 'ListOfValues ' as an integer - by replacing "," with "" but an integer overflow occured. Any questions or ideas? Thanks   

View 6 Replies View Related

User Input In SQL Query

Nov 24, 2004

Hi,

I am new to ASP.NET so pordon me if my questions seems to be stupid.

I was given an assign to develop a ASP that would return results from a SQL server.

The problem is that part of my query to the SQL server comes from the webform


select a.invnum, a.invdate, a.duedate, a.invamt,a.payamt from vpshead a inner join vendors
b on (a.vendnum = b.vendnum) where (a.vendnum = " & user.text & " ) and (b.vendpass = "
& Pass.text & " ) and (a.payflag <> 'V') and ( (a.invamt <> 0) or (a.payamt <> 0) )and (a.chkno = '') order by a.invdate"



As your can tell I am using the user.text and Pass.text in my query which will come from the web form.

I know this is wrong but how else can I do it?

Thanks

View 3 Replies View Related

User Input Conversion

Feb 19, 2005

To: All,

well here's a problem that I encountered, i got a textbox that is used to store the Date of Birth of a user. So when user keys in something, it is store as a string. However i wish to convert it into a datetime so that i can store it into my database. Anybody know of a way to help? i've tried countless methods but doesn't seem to work. Please give me a hand guys.... Thanks

From: iaciz

View 2 Replies View Related

User Input Data In T-sql

Aug 20, 2005

Hi there

I want to give dynamic input to the t-sql code in sql analyzer.how do i do that....

Like adding 2 numbers

declare @a integer,@b integer,@c integer
--I dont want to give like this
--set @a = 5
--set @b = 10
set @c = @a + @b

can anyone help me with this

regards
Vic

Vicky

View 3 Replies View Related

Need To Get Input In Parameter From End User

May 24, 2007

Hi,

I am trying to make a simple stored procedure which I want to take input on every run from end user:

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
declare @sku varchar(20)

insert into skua (sku,SumOfQtyNum)
(select sku,sumofqtynum from sku where @sku = sku.sku)

it is working but not asking parameter values

(I want to use passthrough query after that in Access)
thanks




AA

View 2 Replies View Related

User Input In SQL2000

Jul 23, 2005

Hello. I'm using SQL query analyzer to run some queries against anSQL2000 DB. Unfortunately, my previous SQL experience is some OralceSQL I took in school.To put it simply, I'm trying to write a query to pull records thatmatch a variable input. In Oracle, I'd use a substitution variablelike this...SELECT * FROM jobs WHERE jobid = &job_id_to_query;Is this possible under SQL2000? Is this only a feature of SQL*Plus?TIARich

View 8 Replies View Related

How To Get User Input In Query

Nov 30, 2006

I m new to SQL Server. Before this I was using access. In access one can have user inputs easily .. for example

where receivedate=[enter date]



how I can get userinputs in SQL server Query....



Forgive me if it is a dumb question

View 6 Replies View Related

Pull Between 2 Dates From User Input

Feb 14, 2007

 I want to pull dates from my database that are between to set dates i have written a query that does this which looks like this:
"SELECT OCH_ID, empno, Selected_OCD, Start_Time, End_Time, Selected_OCDay, Selected_DOM, Selected_Month, Selected_Year FROM dbo.ICT_On_Call_Hours                           WHERE (CONVERT (datetime, LEFT (Selected_OCD, 2) + '/' + SUBSTRING(Selected_OCD, 4, 2) + '/' + RIGHT (Selected_OCD, 4)) >= CONVERT (datetime, LEFT ('12/02/2007', 2) + '/' + SUBSTRING('12/02/2007', 4, 2) + '/' + RIGHT ('12/02/2007', 4))) AND (CONVERT (datetime, LEFT (Selected_OCD, 2) + '/' + SUBSTRING(Selected_OCD, 4, 2) + '/' + RIGHT (Selected_OCD, 4)) < CONVERT (datetime, LEFT ('14/02/2007', 2) + '/' + SUBSTRING('14/02/2007', 4, 2) + '/' + RIGHT ('14/02/2007', 4)))"
This works when the dates are included in the statement but when i try and use parameters to pull them in like this:
"SELECT OCH_ID, empno, Selected_OCD, Start_Time, End_Time, Selected_OCDay, Selected_DOM, Selected_Month, Selected_Year FROM dbo.ICT_On_Call_Hours                           WHERE (CONVERT (datetime, LEFT (Selected_OCD, 2) + '/' + SUBSTRING(Selected_OCD, 4, 2) + '/' + RIGHT (Selected_OCD, 4)) >= CONVERT (datetime, LEFT ('@Choice1', 2) + '/' + SUBSTRING('@Choice1', 4, 2) + '/' + RIGHT ('@Choice1', 4))) AND (CONVERT (datetime, LEFT (Selected_OCD, 2) + '/' + SUBSTRING(Selected_OCD, 4, 2) + '/' + RIGHT (Selected_OCD, 4)) < CONVERT (datetime, LEFT ('@Choice2', 2) + '/' + SUBSTRING('@Choice2', 4, 2) + '/' + RIGHT ('@Choice2', 4)))"
I then recieve the following error message why is this?
ERROR ------------------->  Syntax error converting datetime from character string.
Any Help would be greatly appreciated thanks

View 2 Replies View Related

Search Based On User Input

Jul 25, 2007

I have a search page that allows users to type/select values contined within the entry they're looking for. My SELECT statement returns columns in a table that get compared to the user input. So if someone selected Status (Open) then all of the 'Open' Request entries should populate the search page. How do I phrase the SELECT statement to compare values if the user gives them, but ignore the fields where no data was input when it's searching? So a search where no values were entered would return every Request Entry instead of an error; no entry.
Thanks!

View 2 Replies View Related

User Input In Query Analyzer

Jul 15, 2004

Hi folks, i am lookin for an option in the QA to take user input while executing a query. just like we do in SQLPLUS:
SELECT * FROM dept WHERE deptno=$abc
here it would ask me for the deptno. I guess it's a very handy feature and we could test our variables and calculations withing the procedures etc.

Is there a way, or any substitute?


Howdy!

View 14 Replies View Related

Code To Chage User's Input:123, 234 To '123','234'

May 3, 2008

I need to convert user's input to SQL statement.
How to code to chage user's input:123, 234 to '123','234'

View 4 Replies View Related

How To Update Values From The User Input?

Jun 2, 2008

Hi I have a table(tblA) as follows

Col1--------------col2---------col3-----col4
London------------1131---------299------Barking
Didicot-----------3451---------429------Dansdon
Barking/ASton-----1131---------345------Singleton
Vander/ADon/cam---3907---------299------derby
Null or Blank ---1131---------423------Addington

Expecting the Data should display look like below

London------------1131---------299------Barking
Didicot-----------3451---------429------Dansdon
Barking/ASton-----1131---------345------Singleton
Vander/ADon/cam---3907---------299------derby

But when user change the col2 value (1131) to 113999, this should be changed to all values where col2 is 1131. Please Help

View 2 Replies View Related

Get Newest Input For Each User From Table

Nov 20, 2014

I dont know how to get the newest input for each user from one single table.

Should be a very simple task but i cant work it out.

The table looks like this:

ID (A_I), userID, ip, date(timestamp)

Here is a SQL Fiddle Link with some data also: [URL] ....

I have tried a lot querys like this one:

SELECT userID, ip FROM userips GROUP BY userID ORDER BY ID DESC

But this one does not give me the latest ip which was entered by a user.

View 2 Replies View Related

Running Query From User Input

Jan 11, 2006

I would like to setup a query where the user is firstly prompted to input the information e.g. if they are trying to locate a particular person from a telephone database they would be prompted to enter the surname for that person.

View 4 Replies View Related

User Input During Report Generation.

Nov 30, 2007



Hello,

I'm trying to do something simple that has turned out to be a frustrating problem. I have a field in my report that needs to be populated by user input. Based on this user input, I will use the field in a calculation. The simple solution to me, was to create a custom assembly that has a function that uses Console.Write("Input Data") and Console.readline() to assign the input to a string, and then return that string to the report. This works fine in a test console application, but when I copy and paste the code to my custom assembly, it returns #Error to the report. I've debugged, and found that when I hit F10 on Console.Write("test"); it skips right over it, and nothing happens. It also skips over Console.readline(); with nothing happening. This makes me unable to take the user input and set the textbox equal to that value.

Am I doing this completely wrong? Is there something I'm missing, or just not understanding correcly? It seems like reporting services has to have this option. I'd really appreciate some advice. Thanks!

-Paul

View 3 Replies View Related

Need To Pass User Input Through To SQL Query

May 20, 2008

Hello Everybody,

I am sure this has been asked a thousand times before in a thousand different ways, but here goes...

I am in need of the ability to prompt users for a From Date and To Date to insert into a WHERE clause in SQL queries. What is the easiest least painful way of accomplishing this? A great many of our customers utilized SQL Server Express or MSDE, so they do not have the full gambit of SQL tools handy. Believe me when I say that I have searched high and low across the internet for this solution. I was hoping I might be able to accomplish this through VB Script or J Script. Or, anything reasonable.

Thanks in advance for your time and patience,

Rocky Mountain Tech

View 1 Replies View Related

How To Basically Copy Tables With New Names Rather Than Create Similar Tables From Similar Manual Input.

May 26, 2007

I have a table that I am basically reduplicating a couple of times for each part of this database that I want to create.Each table basically has the same data: The tables will be called motherTable, fatherTable, sonTable, daughterTable and so on.I am pretty much using the following in each column: UserID, MotherID(or FatherID or SonID, etc., etc. and so on for each unique table), FirstName, LastName, MiddleName, BirthPlace, Photo, Age.I don't see an option to copy a table and just modify the second ID part and rename that table accordingly.How can I make this an easier way of creating these similar tables without retyping all these columns over and over again?Thanks in advance. 

View 4 Replies View Related

Dynamic WHERE Operator Based On User Input

Oct 17, 2007

Let's say I have a table with 3 fields: an ID field (primary key, set as an id field, etc.), a Name field (nvarchar50), and an Age field (int). I have a form that has three elements:
DropDownList1: This drop down list contains 3 choices- "=", ">", and "<".
Age: This text box is where someone would enter a number.
Button1: This is the form's submit button.
I want someone to be able to search the database for entries where the Age is either equal to ("="), greater than (">"), or less than ("<") whatever number they enter into TextBox1.
The code-behind is shown below. The part I'm confused about is that if I load this page, the query works the -first- time. Then, if I try to change the parameters in the form and submit it, I get the following error:
"The variable name '@Age' has already been declared. Variable names must be unique within a query batch or stored procedure."
Any help would be appreciated.
Here is what I'm using in my code behind:
    protected void Button1_Click(object sender, EventArgs e)    {        System.Text.StringBuilder sb = new System.Text.StringBuilder();        sb.Append("SELECT * FROM People WHERE Age ");        switch (DropDownList1.SelectedValue)        {            case "=":                sb.Append("= ");                break;            case ">":                sb.Append("> ");                break;            case "<":                sb.Append("< ");                break;        }        sb.Append("@Age");        SqlDataSource1.SelectCommand = sb.ToString();        SqlDataSource1.SelectParameters.Add("Age", TypeCode.Int32, Age.Text);    }

View 7 Replies View Related

Using User Input As Part Of A SELECT Statement

Jun 16, 2004

I know this is an easy one and I know I've read it somewhere, but I can't seem to write the correct format to run correctly. I am trying to build a SELECT statement base on the selected values of a dropdown list on a webform. The selected values will be part of the Table name.. ("client_info" & location_option.selecteditem.value) Can someone show me the correct syntax for adding a form variable into a SELECT statement? Thanks

View 1 Replies View Related







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