Combining Rows

I have a database used by another application, i want to be able to manipulate the data stored in the database, the problem is that the way the information is stored its awkward(assume this is purposely so), but i cannot change the db structure at all, so heres my problem: Each Person in this database will have multiple comments stored against them:

ID | CommentCode | LineNum | ValueData
1234 COMM1 1 Something about thi
1234 COMM1 2 s person seperated ov
1234 COMM1 3 er multiple lines
1234 COMM2 1 Something else about
1234 COMM2 2 them

What i want to do is circle through the recordset and combine the multiple lines of the same comment, any ideas/examples?

View Replies


ADVERTISEMENT

Combining An AND With An OR

I have this query that isn't working for me. This is a simple phonebook (first name and last name) form. Trying to accept wildcards. Here is the statement as I see it: Code:

Query = "SELECT cn,telephonenumber,mail FROM 'table' WHERE (cn = '" & FName & "' OR cn = '* " & FName & "') AND (cn = '" & LName & "' OR cn = '* " & LName & "')"

But this isn't working. Where am I messing up the syntax?

View Replies View Related

Combining 2 Sql Strings

I have 2 SQL strings:

SELECT *
FROM NK_editie " & MM_whereConst & " " & whereClause & "
ORDER BY editie desc

And

SELECT *
FROM NK_editie INNER JOIN NK_edities ON NK_editie.editieid = NK_edities.ID
ORDER BY editie desc

Now I want to combine those 2 to one string.

I have problems to set it up in working order.
My tryout:
SELECT *
FROM NK_editie INNER JOIN NK_edities ON NK_editie.editieid = NK_edities.ID &
" & MM_whereConst & " " & whereClause & "
ORDER BY editie desc

It shows al the records which are joined, only the second string " & MM_whereConst & " " & whereClause & " is not working.

View Replies View Related

Combining Values

I've created a web form with multiple textfields for acquiring somes date of birth (i.e. textbox for DD, textbox for MM, textbox for YYYY), now what I'm trying to do is grab the values from these objects and combine into 1 session variable, which later on is inserted into an ACCESS database.How do I append these values together to be one value in a session variable (i.e 23122004). I have a input mask inside the ACCESS database, so it needs to go in this format. I assume once I have captured these 3 fields, I need to convert them to integer, and then merge?

View Replies View Related

Combining Two Sql Queries

I need to take two seperate queries and put them in a single html table, but i want to combine the sets of data 'while selecting them' so i can use the SQL sort by command to arrange the whole table by date..

sorting the two queries independantly then dumping them to the table results in both queries being sorted independantly, ie the most recent entry(by date) of the second set of data ends up in th emiddle of the table.. any ideas?

View Replies View Related

Combining 2 Variables In A ASP Form

It's regarding an ASP FORM for the credit card process:

I'm collecting credit card information on my secured server. When collecting the Month and Year values (for the expiration date of the card) with Select/Option tags, I don't have a way to concatenate them together prior to submitting the form so I can post them in the format the gateway asked me for (e.g. "mmyy" or "mmyyyy")

Do you have a way where I can submitt those variables togehter in such format? Code:

View Replies View Related

Edit Combining Data

I am trying to edit data from this form in ASp/HTML but because both the field that I am editing is in the text box that has the same name, it is combining the data from both the field and updating in the table. Is there a way I can change the name of the text box progammically?

View Replies View Related

Combining Index Server And SQL Server Search Results

I'm just about to start a project that needs to combine the results of a SQL
Server query with the results of an Index Server query. The basic idea is
that the user enters/selects a bunch of search criteria on a form.

Most of
the criteria selected by the user will be used to select records from the
database - standard WHERE clause stuff - but the user can also enter
free-text that should be searched for in associated uploaded documents.

The
documents are sitting in the file-system with file-name pointers only stored
in the database (not the document). Only records where the associated
free-text is found in the documents should be returned. I'm new to Index
Server and am wondering how is this done. Any good references/tutes?

View Replies View Related

Max Rows

Does any one know a good site where I can go to learn how to let the user determine how many rows they want to display?

View Replies View Related

[ASP] Sequence Rows

In the table MYSQL I have this sequence of rows:

CODE===========NAME
610=============ASSI
610=============ASSI
610=============ASSI
610=============ASSI
619=============ASSI-9
619=============ASSI-9
619=============ASSI-9

I like to see:

ASSI

and query that counts for all rows like ASSI ...

View Replies View Related

Add Rows On Form

My idea is to have a web form that a user can add extra fields if needed.
Example would be a form that a user would add ComputerName, IP, and at least
one row of data say Application, Vendor, Contact. Then they need to add two
more rows of the same data (App,Ven,Cont). So I guess some sort of
dynamically adding more fields for more data entry. The point being you
don't have an idea how may there really are to add. Then on the database
side I would guess one table to hold the IdentNumber,ComputerName, IP and
another table for the IdentNumber, App,Ven,Cont.

View Replies View Related

How Many Rows Returned?

When I do a query that I know has 2 rows, I get rs.recordcount equals -1. Same thing when it's just one row. I need something that gives me the number of rows.

View Replies View Related

Returning Only 100 Rows

I was wondering if anybody could advise me how to return just 100 rows from a database query. In Cold Fusion I'd use the maxrows function, but not sure how to do in ASP (or can I do it in just SQL?). My code is thus :

' Retrieve last 100 records. Query then run through the query building a string
Set objRetrieve = objConn.Execute("SELECT Players_ID, Players_Name, Players_Score FROM Players ORDER BY Players_Score DESC")

View Replies View Related

Editing Many Rows At Once

We've been asked to upgrade the system and one of the common complaints is that they often have to edit just one field, but for all the students. Currently you have a list of students and you have to click each one and go to their summary page before you can edit anything.

So they've asked if there is there any way of creating a 'spreadsheet like' view of my data and allowing the user to edit and either save everything, or save each row as they go (without causing a page refresh).

I managed to get a basic idea up and running, involving lots of wee forms or one big form... but my ASP ended up creating 266 SQL queries to do the saving (one for each pupil) ... and the script would just take forever. Code:

View Replies View Related

Flashing Rows

Does anyone know how to make a table row flash in a certain colour,
depending on a DB value?

I have a helpdesk application listing statuses of Agents and the calls
queued on the system.

When a call is queued, I wish to make that Agent's Table row, flash.

Or even a cell flash.

Any ideas?

View Replies View Related

Counting DB Rows

For example:
If I had a table with the headings
ID Colour Car
1 Blue Volvo
2 Red Fiesta
3 Green Mondeo
4 Red Volvo
5 Red Fiesta
6 Blue Fiesta

How could I use asp to count how many times say the colour red appeared in the table displayed in a numeric value, i.e There are 4 red cars in the able

View Replies View Related

Counting Rows

i know that in sql you can output the amount of rows with COUNT(col_name), but what asp do i need to output this

View Replies View Related

Get Total Rows

I have a list of data in a database(access). How can I get the total rows in the database?

View Replies View Related

Put All Rows Into A String

I have a column called state with 50 rows as 50 US states. I want to display the rows as one string like TX, NY,How can I do this easily?

View Replies View Related

Add Rows To Dimensioned

Is the following assumption correct?If I setup an array with 5 rows and 8 columns.

Private invoiceItemsArray
ReDim invoiceItemsArray(4,7)

Am I stuffed if I want to add a fifth row? From what I've read I will only be able to add more columns in this instance.Is this correct? And if so is there a work-a-round. Would I need to create a new array with one extra row, use the old one to populate it and then add my new row data?

View Replies View Related

Sort Rows With SQL

When I try to sort rows of records in asp with sql I cant get them coming out right. The column I'm trying to sort has record values such as 63, 254, 98, 7 but when I try to sort them ascending I get 254, 63, 7, 98 but I want 7, 63, 98, 254. Please help because its been annoying me for ages.

View Replies View Related

Dynamic Rows

I have a Javascript function which dynamically generates rows containing a List box having fixed options. Whenever i add a new row through my function the previously selected values in List box are not getting retained. This works fine in IE6 but not in FireFox 1.0 PR. This feature i am implementing using ASP and Javascript.

View Replies View Related

Rows In Recordset

How can I determine the number of rows in a recordset? myRecordSet.Fields.Count returns only 1?

View Replies View Related

Selecing Only Rows

Is it possible in a ASP page when querying a table to only pull out the rows with data in, and not display the rows with null values?

View Replies View Related

Add Multiple Rows

I want a way to be able to add up to 99 new items into a table. I've search around but haven't found much. I think I am using the wrong word or function?

Entry page would look like:

1. var1, var2, var3,... var10
2. var1, var2, var3,... var10
3. var1, var2, var3,... var10
4. var1, var2, var3,... var10
5. var1, var2, var3,... var10
99. var1, var2, var3,... var10

I can't do a "INSERT INTO table_blah Values()" . Should I look towards an Array? I suck at those.

View Replies View Related

How Many Rows Are There In Table

adoRS.Open "select * from table_name"

numField = adoRS.Fields.Count
response.write("Number of Filed of table_name = "&numFiled)

how will i know how many rows are there in table_name? is there a

numRows = adoRS.Rows.Count

any help with this?

View Replies View Related

Repetition Of Rows

In the code below I have the problem that I get an error if rstal("talent") doesn't exist for that record. What I want to modify is that if in the record rstal("talent") is in bof or eof or doesnt exist then just show image add.jpg. Code:

View Replies View Related

How To Delete Rows From Array?

How to delete an empty row in an multi dimenssional array? For example,

Array(1,?) LIT-361 1 3
Array(2,?)
Array(3,?)
Array(4,?) LIT-332 10 30

I want to delete row 2 and 3. How do I do it?

View Replies View Related

Insert Dynamic Rows

I've made a form on a php page, where one of the fields is automatically filled in dynamically from the page it is referred from. That part is working find, it pulls up the product model number from the page it is referred from. Now, when it is submitted it runs an asp script to send a confirmation email to them, then sends an email to me with the information collected from the form. That still works as well. So, finally, here is my problem and question:

I cannot get the variable that the form pulls up automatically using php, to be passed into the asp script and sent through the email. All other variables work.

Is that because the script that is used to send the email is asp - yeet the variable is pulled from php? I would think because it puts a dynamic figure, and submits it, that it would becomes static. I'm not sure what the issue is here.

View Replies View Related

Update Multiple Rows

Visually, the page will look somewhat like a spreadsheet. It could have
hundreds of records (rows) displayed. I want to enable the user to edit any
one or any number of records and any fields, then click a save button to
UPDATE the SQL table. I'd like to use stored procedures if possible. How is
this done? Where do I start?

View Replies View Related

How Do I Denote Rows In A Recordset?!

I hope I can make this problem clear enough - Im afraid I dont really have any specific code (yet) but im looking more for "concepts"...

I have a database (in Access) that contains a table, and this table contains lots of records. Each record can be either Case1, Case2 or Case3. Every hour, I wish for the table to be "refreshed" - i.e. a script will alter all data in the database depending on whether the record is Case1, Case2 or Case3. I have no difficulty in doing the code for each Case, but my problem lies in what method to use. I can think of two ways of doing this:

1 - To just select every record in the table (i.e. all Cases), take the first record in the recordset (of the entire table), look at its case, then depending on result run either ScriptCase1, ScriptCase2, ScriptCase3, run the script, move to the next one, look at whether its case 1, 2, or 3....run the appropriate script, move to the next and so on...........or

2 - To select all the entries in the table and put them into a recordset that are one Case - eg select everything that is case A. Run the script for Case A on the whole record set, then select all record entries that are Case B, run a script that updates this set, and so on......

To begin with, I cant decide which technique would be better, and also, for the second case I am not sure how to update a row within a record. Code:

View Replies View Related

Multiple Rows Of Data

I need to have a table with 3 fields whereby the user can input the data and insert into my database using this website. However, I need this table to be dynamic so that after the user input the info for the first row, the user can click on add another row button and another blank row comes out. then the user can input the info for the second row and so on.

I am using ASP in the end to insert the data. I need some advice on how to create this kind of table where the user can click on one button to add another row and then able to insert all data in the entire table into database using asp.

number filename filesize
1 aaa.asp 123MB

add more data

View Replies View Related

Alternating Table Rows...

How do I do alternating table rows? I'm just using the:

[vbs]

rs.movenext
loop
[/vbs]

method...so, it's in a table...I looked on ASP101, but that's the wrong kind've database setup I have...

How do I do it? It should look like:

[vbs]
<tr>
<td class="Alt1"></td>
<td class="Alt1"></td>
</tr>
<tr>
<td class="Alt3"></td>
<td class="Alt3"></td>
</tr>
[/vbs]

View Replies View Related







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