Lowyat.NET Forums

Welcome Guest ( Log In | Register )

 
RSS feedBump TopicReply to this topicStart new topicStart Poll

Outline · [ Standard ] · Linear+

> SQL - User input, How to capture user input?

trex
post Jun 14 2006, 01:02 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #1


Getting Started
**

Group: Junior Member
Posts: 212
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Nov 2004





Hi,

I want to output data from a table based on data input from user such as date range or even doc no. range. I need to know how to write the data capture part that has a display screen. Anyone can help? THanks.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
bobtiang
post Jun 14 2006, 01:42 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #2


I live in a 6 STARS Hotel
******

Group: Senior Member
Posts: 1,597
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jan 2003
From: 冰城





not really understand your requirement.
so, you want to get what user enter in a form, by storing them in SQL DB and then retrieve it back?

and you don't have any preference for the programing language?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
trex
post Jun 14 2006, 02:17 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #3


Getting Started
**

Group: Junior Member
Posts: 212
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Nov 2004





hmmm.. please bear with me as i am not a com sci person. Database already have the records and there is already a flexql report that can extract data out from the database. Flexql report is using SQL.

I already got the commands to extract the whole data out but I want to select according to say a date range. So I require an user input field commands too to include. As for programming language, i guess its SQL rite?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
bobtiang
post Jun 14 2006, 02:19 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #4


I live in a 6 STARS Hotel
******

Group: Senior Member
Posts: 1,597
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jan 2003
From: 冰城





ok, so is there already a form or anything existing that allow the user to enter the date range for the report?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
trex
post Jun 14 2006, 02:50 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #5


Getting Started
**

Group: Junior Member
Posts: 212
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Nov 2004





nope... there is nothing... i was hoping someone got a user input command out there and i can mod it to be used wink.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
anthony_yio
post Jun 14 2006, 03:21 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #6


........
Group Icon
Codemasters

Group: Elite
Posts: 1,794
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jan 2003





QUOTE(trex @ Jun 14 2006, 02:50 PM)
nope... there is nothing... i was hoping someone got a user input command out there and i can mod it to be used wink.gif
*


nope, you can't use SQL to get user input cause SQL is a database query language.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
bobtiang
post Jun 14 2006, 03:32 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #7


I live in a 6 STARS Hotel
******

Group: Senior Member
Posts: 1,597
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jan 2003
From: 冰城





oh i see... but I am afraid I cant help you cause it's Flexql which I am not familiar with smile.gif

guess you need to open up the report editor and put a few text box or date picker to allow user to enter the value. from what I read in the product page, the report design is the concept of WYSIWYG.
so, it wont be so hard.

This post has been edited by bobtiang: Jun 14 2006, 03:34 PM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
trex
post Jun 14 2006, 04:12 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #8


Getting Started
**

Group: Junior Member
Posts: 212
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Nov 2004





anthony_yio : Yes i believe i can coz there is another sql report written as such.

bobtiang : my version is a darn old DOS based one... sad.gif

hmmm... basically like this, display a screen that shows date range from:[date1] to: [date2]. Then based on this input, input date1 into say a temporary database and call it input.date1 and date2 into input.date2. Then basing on date1 and date2, do a range display.



This post has been edited by trex: Jun 14 2006, 04:46 PM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
bobtiang
post Jun 14 2006, 05:17 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #9


I live in a 6 STARS Hotel
******

Group: Senior Member
Posts: 1,597
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jan 2003
From: 冰城





ok, from my experience, the default view is either blank or the day itself when you first call up the report if the report require a date range parameter.

so, for your case, it is actually quite simple, no temporary database or table needed to store the date.
what you need to do is, design your report to be able to take the date1 and date2 value.
then in the SQL query you just need to get the value for these dates, and add another 2 line of WHERE clause to restrict the result set within the date.

something like
SELECT ord_nbr, ord_qty, ord_dt, chng_dt, cre_dt
FROM customer_order
WHERE ord_dt BETWEEN @date1 AND @date2
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
anthony_yio
post Jun 14 2006, 08:18 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #10


........
Group Icon
Codemasters

Group: Elite
Posts: 1,794
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jan 2003





QUOTE(trex @ Jun 14 2006, 04:12 PM)
anthony_yio : Yes i believe i can coz there is another sql report written as such.

bobtiang : my version is a darn old DOS based one... sad.gif

hmmm... basically like this, display a screen that shows date range from:[date1] to: [date2]. Then based on this input, input date1 into say a temporary database and call it input.date1 and date2 into input.date2. Then basing on date1 and date2, do a range display.
*


That is because it is using some application customizable forms and other automated tools to get the user input. (which I think is the FlexQL)

What you need to find out is what FlexQL capable of doing in conjunction with SQL statement. SQL statement again, is just a database Structured Query Language. It does not have forms by itself.

Like Ms Access, it support SQL but the user input part are done in Access VBA (Access Visual Basic scripting) plus some Access built in forms/report generator which only specific to Ms Access the application and not SQL.

This post has been edited by anthony_yio: Jun 14 2006, 08:33 PM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
trex
post Jun 15 2006, 09:16 AM
Show posts by this member only |This post's rating (0+, 0-) | Post #11


Getting Started
**

Group: Junior Member
Posts: 212
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Nov 2004





QUOTE(bobtiang @ Jun 14 2006, 05:17 PM)
ok, from my experience, the default view is either blank or the day itself when you first call up the report if the report require a date range parameter.

so, for your case, it is actually quite simple, no temporary database or table needed to store the date.
what you need to do is, design your report to be able to take the date1 and date2 value.
then in the SQL query you just need to get the value for these dates, and add another 2 line of WHERE clause to restrict the result set within the date.

something like
SELECT  ord_nbr, ord_qty, ord_dt, chng_dt, cre_dt
FROM      customer_order
WHERE    ord_dt BETWEEN @date1 AND @date2
*



but i want to be able to change the range of the dates. Based on the above, it seems that @date1 and @date2 is fixed.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
trex
post Jun 15 2006, 09:19 AM
Show posts by this member only |This post's rating (0+, 0-) | Post #12


Getting Started
**

Group: Junior Member
Posts: 212
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Nov 2004





QUOTE(anthony_yio @ Jun 14 2006, 08:18 PM)
That is because it is using some application customizable forms and other automated tools to get the user input. (which I think is the FlexQL)

What you need to find out is what FlexQL capable of doing in conjunction with SQL statement. SQL statement again, is just a database Structured Query Language. It does not have forms by itself.

Like Ms Access, it support SQL but the user input part are done in Access VBA (Access Visual Basic scripting) plus some Access built in forms/report generator which only specific to Ms Access the application and not SQL.
*



hmmm... yes, u r right, FLEXQL is doing the query in conjunction with SQL. In FLEXQL itself, user can just set the view size etc and not in choosing records to output. So i need to write out the program in SQL rite?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
anthony_yio
post Jun 15 2006, 10:30 AM
Show posts by this member only |This post's rating (0+, 0-) | Post #13


........
Group Icon
Codemasters

Group: Elite
Posts: 1,794
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jan 2003





QUOTE(trex @ Jun 15 2006, 09:19 AM)
hmmm... yes, u r right, FLEXQL is doing the query in conjunction with SQL. In FLEXQL itself, user can just set the view size etc and not in choosing records to output. So i need to write out the program in SQL rite?
*


Not until you know what the FlexQL capable of displaying and how it display it in conjuction with SQL.

Or else

bobtiang had already answer your request of SQL.

Bobtiang thinks the FlexQL would be smart enough to know @date1 would be warranting an input UI but apparently as you mentioned, there isn;t any. FlexQL works in a different way


What you need is a FlexQL manual on how to generate report with SQL.



This post has been edited by anthony_yio: Jun 15 2006, 10:39 AM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
trex
post Jun 15 2006, 01:02 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #14


Getting Started
**

Group: Junior Member
Posts: 212
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Nov 2004





QUOTE(anthony_yio @ Jun 15 2006, 10:30 AM)
Not until you know what the FlexQL capable of displaying and how it display it in conjuction with SQL.

Or else

bobtiang had already answer your request of SQL.

Bobtiang thinks the FlexQL would be smart enough to know @date1 would be warranting an input UI but apparently as you mentioned, there isn;t any. FlexQL works in a different way
What you need is a FlexQL manual on how to generate report with SQL.
*



thanks wink.gif for Flexql, u can call up databases and it has also a SQL window where u input codes to help extract these data. On its own, it is not possible to select the kind of data to output....
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
anthony_yio
post Jun 15 2006, 01:54 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #15


........
Group Icon
Codemasters

Group: Elite
Posts: 1,794
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jan 2003





I think there isn' t much people familiar with FlexQL here. If it is SQL alone, you can get way more help.


This post has been edited by anthony_yio: Jun 15 2006, 02:19 PM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
bobtiang
post Jun 16 2006, 09:28 AM
Show posts by this member only |This post's rating (0+, 0-) | Post #16


I live in a 6 STARS Hotel
******

Group: Senior Member
Posts: 1,597
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jan 2003
From: 冰城





aren't they provide any support for the product you bought?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
trex
post Jun 16 2006, 09:31 AM
Show posts by this member only |This post's rating (0+, 0-) | Post #17


Getting Started
**

Group: Junior Member
Posts: 212
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Nov 2004





the software co said they no longer support this...
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
bobtiang
post Jun 16 2006, 09:47 AM
Show posts by this member only |This post's rating (0+, 0-) | Post #18


I live in a 6 STARS Hotel
******

Group: Senior Member
Posts: 1,597
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jan 2003
From: 冰城





oh boy.. then good luck to your quest in looking for experience FlexQL users smile.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Bump TopicReply to this topicTopic OptionsStart new topic
 



----debug section please ignore----
Lo-Fi Version Time is now: 25th November 2009 - 01:22 PM
All Rights Reserved 2003-2009 Vijandren Ramadass (~living on a prayer~)