Prompt For User Input In Criteria Field Of View

Apr 12, 2006

In Access, I use [Enter Date] in the Criteria field of the Query. I tried the same thing in SQL Server in the Criteria field of the View and it does not recognize this. Is there a comparable command in SQL to get user input into the Criteria field of a view?

View 4 Replies


ADVERTISEMENT

Prompt User For User Name And Password

Apr 14, 2008

Hi guys,

My users are unable to view reports on server A. When trying to access it shows up as users have no access to the reports.
We have another server B which also deploys the same set of reports,to the same set of users as Server A.Users are able to view the reports on Server B.
Both server B & A are used for deploying reports that are created on another development server.I am very new to the concepts of IIS and report administration.Could someone tell me what I can start checking on? What are the settings that I can compare on both server ?

If I am not very clear on the problem explained above.Do let me know I would be glad to explain futher.

View 4 Replies View Related

View 2 Tables With A Certain Criteria

Aug 28, 2000

Is it possible to to view 2 tables with a common field name and display it in the following way

Name telephon no.

John 123-4567
789-4561
987-6543
Peter 159-7536
654-9874
896-3214
456-9874
without repeating the name in each row.
Thanks

View 1 Replies View Related

View Criteria: Only One Instance

Nov 3, 2006

I have a table with 500 stores. (StoreNumber, StoreZip, StoreOpenClosed [999 if store is closed, 1 if store is open])

I have a view that only selets the open stores

SELECT *
FROM tblStores
WHERE StoreOpenClosed <> 999

This selects all the open stores. There are 2 instances where there are two stores in the same zip code.

EX StoreNumber: 3452 Zip: 02192
EX StoreNUmber: 5325 Zip: 02192

I only want to select ONE store per zipcode. Maybe even select one of the two stores randomly. How could I do this with out hardcoding anything?

Thanks
Dynasty

View 2 Replies View Related

Date Criteria In View Not Filtering

Mar 19, 2007

I am using BETWEEN '02/01/2007' AND '2/01/2006' in the criteria of a VIEW and have tried <= '02/01/2007' AND >='2/01/2006' but both are not filtering the dates correctly. Is there another way? What am I missing?

View 4 Replies View Related

Prompt User For Data

Oct 20, 2006

I need to prompt a user for start and end dates as well
as start and end times using a specific format for the
date and time.

I am having difficulty constructing the query.

So far I have...

DECLARE @StartDate DATETIME
DECLARE @EndDate DATETIME
DECLARE @StartTime DATETIME
DECLARE @EndTime DATETIME

SELECT I.IncidentId,
I.CFScompanyname,
I.New_created_time,
E.createdon

FROM dbo.IncidentExtensionBase I
INNER JOIN dbo.IncidentBase E on I.IncidentId = E.IncidentId

WHERE E.createdon >= @StartDate AND
E.createdon <= @EndDate AND
E.createdon >= @StartTime AND
E.createdon <= @EndTime;

Could someone please let me know how I prompt the user for this data.

Thank you very much.

View 5 Replies View Related

User Report Prompt

Oct 15, 2007

I'm a very basic user to VSS 2005 and I've created a simple report to display our customer master table. The problem is that we have 1000's of customers, but the report must scroll page by page.

I'd like to prompt the user with:

"Customer code starts with:"

Can you tell me how to do this using the field:


=Fields!custnmbr.Value

View 1 Replies View Related

Prompt For User Credentials For Database

Jun 18, 2007

Hello friends,
In my web application I have saved my connection string into web.config file. Now I have to send this web application to the client in the form of web set up. The issue is that on the client side, user credentials for the database will be different. So can we do some setings that the web application whenever will run should ask for the server name, username & Password. If this can be done then the application can be run anywhere considering all compatibilities.
Please let me know how this can be done.
Thanks & RegardsGirish Nehte

View 2 Replies View Related

Prompt User From Stored Procedure?

Feb 7, 2006

I have a stored procedure that moves specific data from several tables from a database on one server to several others (using a bunch of openrowset queries). I don't have an app to call this procedure - it's usually runs from the query analyzer and the parameter values for the procedure are passed in from there.

The procedure currently skips over recipient tables that are already populated with the data that's being moved. I want the ability to either skip the table or delete the existing records from the recpient table data based on the user's response. Therefore, I somehow need to prompt the user to get a response when the data already exists in the existing table.

Is there any way to prompt the user from a stored procedure, or do I have to re-develop the procedure in DTS or write and application?

View 2 Replies View Related

Select Same Field Twice For Different Criteria

Mar 11, 2005

I need a little insight on how to select the same field from the same table, but for different criteria.

here are example tables...

Categories
CATSUBCATNAME
10MainTitle
11SubTitle #1
12SubTitle #2
20Section
21Section #1


DataTable
CATSUBCATINFO
11Detail Information for subtitle #1
12Detail information for subtitle #2

desired result would be:
MainTitle, SubTitle #1, Detail Information for subtitle #1
MainTitle, SubTitle #2, Detail Information for subtitle #2


Select c1.Name, c2.Name, d.info
from DataTable d, Categories c1, Categories c2
where c1.CAT = d.CAT
and c2.CAT = d.CAT
and c2.SUBCAT = d.SUBCAT

View 1 Replies View Related

WHERE Clause Not Picking Up 2nd Field Criteria

Jun 20, 2001

Hello,

I have this SP that works, except I need to add another field value for the WHERE clause. As you can see I have "WM" but I need to add "PR", and those two are definitely in the table field. I've tried a variety of syntax arrangements using the AND operator, the OR operator, the & operator, just a comma between the two, nothing between the two. Can someone please show me what I'm doing wrong. It fileters for "WM" fine, but I also need it to filter in the WHERE clause for "PR". Here is the SP:

CREATE procedure spDemoSchedule (@beginDate varchar(10), @endDate varchar(10), @storeNum int)
AS

SELECT Progstats.[Program#], Progstats.KCKOFF, Progstats.ProgramName, Progstats.Parent, Store.[Str#], Store.Status, Progstats.Dept, Store.[Program#], Product.[Item#], Product.[Item]
FROM Progstats INNER JOIN Product ON Progstats.[Program#] = Product.[Program#] INNER JOIN Store ON Progstats.[Program#] = Store.[Program#]
WHERE Progstats.KCKOFF BETWEEN @beginDate AND @endDate AND Store.[Str#]=@storeNum AND Progstats.CLASS="WM"
GO

TIA,
Bruce Wexler

View 2 Replies View Related

Criteria; Search Any Word In Field

May 26, 2004

I am trying to set up a query that will allow the user to input a string, and the search will match ANY word in that string. Currently, I have it configured so that the search will only match the exact string that the user inputs. I have google searched for the answer, but no luck yet. Any ideas?

View 9 Replies View Related

Looking For Field Name From Table On Select Criteria

Sep 19, 2006

Hari writes "Sub:- looking for Field name from table on select criteria

dear friends


I have an table [assosories] which have 100 fields. initial 10 fields have some date, varchar, int types rest 90 are bool type.

for a single row I need to know the field name which have true vaules in rest 90 fields

I need to insert this field name into another table as a row.

Thanks
HARI"

View 2 Replies View Related

Count Same Field Mutiple Times With Different Criteria

May 12, 2006

Is it possible to count the same field with different criteria. It would be something like this.

car_table
car_id
car_name
car_brand

So you would execute a statement which would count(car_brand) with two different criteria.

I am not sure if this is possible or if there is another way to approach it.

View 1 Replies View Related

Getting Details From A Row That Satisfies A Group Criteria In A Different Field

Apr 16, 2008

I know only enough SQL to be dangerous, but I'm stumped by this general task.

I need to know the method for selecting info from several fields of the records that satisfy a group function criteria on one of the fields. Example: Table contains Employees, products, amounts. If I group on Employee, and product, I can find the total amount of each product's sales for that employee.

create view prod_sales_by_emplyoee
select
employee
product
SUM(amount) as empl_prod_total
from sales
group by employee, product

But if I want to know which product made each employee the most money, I don't know how to do that, because the MAX function works on each field individually, not by row. From the above view, (or a table created from it) I want to know how to identify, for each employee, the product they made the most money selling, and what proportion of their total sales that product accounted for. Then, I'd like to use those results to eliminate the top tier, and find their second place product, etc.

I can do this in Access by sorting the table produced from the above view by empl_prod_total in decending order, joining that to a view that groups by employee only and provides a total, then using a grouped query on the joined data, I can use the "FIRST" function to find the values in each field of the record with the highest sales for that employee. However SQL doesn't have the FIRST function in its aggregate functions.

I suspect there's a standard way SQL does this, but it wasn't in my class. HELP!

View 7 Replies View Related

DB Engine :: How To Restrict A User Do Not Connect To Server From Command Prompt

Jul 20, 2015

How to restrict a user do not connect sql server from command prompt.

I want to restrict my sql server do not connect from command prompt i.e providing server ip address and server credential.

How to secure my server data base do not connect from dos command.

View 13 Replies View Related

Waiting For User Prompt When Running Report Builder Reports

Jan 2, 2007

I have created some reports using Report Builder however they autorun with default values when selected in report manager, cant think many people would want this to happen. Is there a way of getting rid of the default values in RB or preventing auto execute in RM?

View 1 Replies View Related

Inflated Number Of Records Returned When Adding Bit Field Criteria

Jul 20, 2005

When querying a bit field, I am encountering a problem with MS SQLServer returning a larger number of records for a table than theactual number of records that exist within that table.For example, my customer table has 1 million unique records, so theresults of the following query are as such:select count(customer_nbr) from customer = 1,000,000There is bit field in the customer table that denotes whether acustomer has placed an order with us called. That flag is calledorder_flagIf I run the following query:select count(customer_nbr) from customer where order_flag = 1The result is 3,000,000 records.There is no logical way that this is possible, as my table onlycontains 1,000,000 unique records and the number of customers with anorder should be a subset of this.If a run the above query with a distinct before customer number, I getthe results I want:select count(distinct customer_nbr) from customer where order_flag = 1600,000 records.So while I can get to the answer I want, I have no idea why I amreturning incorrect values if I don't select distinct.Can anyone help? I checked microsoft support and message boards buthaven't seen anything.I should note that the bit field is indexed.I am not sure if that isthe problem or not.

View 1 Replies View Related

The Best Method Of Storing Multiple Values For A Single User Criteria In The Database ?

Mar 31, 2008

Let's say you had a User table and one of the fields was called Deceased.  It's a simple closed-ended question, so a bit value could be used to satisfy the field, if the person is dead or alive.  Let's say another field is called EyeColor.  A person can have only one eye color and thus one answer should be stored in this value, so this is easy as well.
Now, let's say I want to store all the languages that a specific user can speak.  This isn't as easy as the previous examples since it's not a yes or no or a single-value answer.  I haven't had much experience with working with databases so I've come up with two possible ways with my crude knowledge hehe.
In terms of inputting the multi-answer values, I suppose I could use a multiple-selection listbox, cascading dropdowns, etc.  Now, here are the 2 solutions that came to mind.....
1) Make a field called LanguagesSpoken in the User table.  When I process the selections the user makes on the languages he knows, I can then insert into the LanguagesSpoken field a string "English, Spanish, Czech" or IDs corresponding to the languages like "1, 5, 12" (these IDs would be referenced from a separate table I guess).  I would use commas so that later on, when I need to display a user's profile and show the user's languages, I can retrieve that long string from the LanguagesSpoken field, and parse the languages with the commas I've used.  Using commas would just be a convention I use so I would know how to parse (I could have used "." or "|" or anything else I guess) the data.
2) Forget about the LanguagesSpoken field in the User table altogether, and just make a LanguagesSpoken table.  A simple implementation would have 3 fields (primary key, userId, languageId).  A row would associate a user with a language.  So I would issue a query like "SELECT * FROM LanguagesSpoken WHERE userId=5" (where userId=5 is some user).  Using this method would free me from having to store a string with delimited values into the User table and then to parse data when I need them.  However, I'm not sure how efficient this method would be if the LanguagesSpoken table grows really large since the userIds would NOT be contiguous, the search might take a long time.  I guess I would index the userId field in the LanguagesSpoken table for quicker access?
OR, I may be going about this the wrong way and I'm way out on left field with these 2 solutions.  Is there a better way other than those 2 methods?
I haven't work extensively with databases and I'm just familiar with the basics.  I'm just trying to find out the best-practice implementation for this type of situation.  I'm sure in the real world, situations like this is very common and I wonder how the professionals code this.
Thanks in advance.

View 3 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

Hoe To Input Apostrophy (&#39;) In A Database Field From Asp

Aug 16, 2000

My name is Syed Kamran Ahmed and i'm an ASP
Programmer. I've got a problem with entering values in
database from ASP page, if i use apostropy in a text
box and then passes values to Sql server store
Procedures then it will give following error:
Error Type:
Microsoft OLE DB Provider for SQL Server
(0x80040E14)
Line 1: Incorrect syntax near 's'.
my calling store procedure syntax is:
rsinsert_products.Open "exec sp_insert_products
'"&vPdescription&"',dbc,
adOpenDynamic ,adLockOptimistic .
Where vPdescription contains kamran's home.
Please tell me how i'm gonna put "'" in database from
above method.
Thanx.
Kamran Ahmed

View 1 Replies View Related

Parameters Input Field Size

Jul 2, 2007

Hi,



is it possible to change the appearence of input fields for parameters on the report server? My parameter is Multi-value with quite large amount of available values. On report server, user can (without scrolling) see only the first value. Parameter values are quite long, so user has to move alternally with both vertical and horizontal scrollbars to find the right value.



Thanks

Janca

View 1 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

Ntext Field Limiting Input To 64,999 Characters

May 24, 2002

I am having an interesting error. I have a bunch of data that I am updating to a field in my sql server 7.0 database. It updates the data, however only puts the first 64,999 characters into the field. The datatype is ntext. From what I understand, ntext datatype can hold much more than 65,000 characters. Am I right in this? The data I'm putting into the field is html tags/text. I've tried several different data sets. I'm updating the data using Coldfusion/SQL commands.

Here is my SQL syntax:

UPDATE htmltest
SET html_offline = '#form.html#'
WHERE htmlid = #form.htmlid#

View 1 Replies View Related







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