SQL, T-SQL, Or DTS To Combine Several Data Fields?
I want to take the contents of many fields of various datatypes (varchars
and text) and combine them into a single "junk" field that I will perform
SQL Server free text searching upon, e.g.:
tblArticles
Title
Subtitle
ArticleText
CombinedField [Title, Subtitle, and Article text smashed together]
Is it possible to create a query or T-SQL stored proc that would do this? Is
SQL Server DTS a better approach? It needs to be built for each row in the
table, and it needs to happen regularly.
View Replies
ADVERTISEMENT
What I try to do is to combine 2 fields in one directly in a form before the 'submit' button. I use Access and Dreamweaver MX ( ASP VBscript).
In the form, the fields to combine are 'Course' and 'Schedule' to one field 'Course+Schedule'.
I know that we can combine fields in Access. But I need to combine them before to submit the form.
View Replies
View Related
I am using asp to submit a form I've created in asp. I was wondering if there was a way to output the vlaues of three listbox menus.
1. User selects hour
2. user selects minute
3. user selects am/pm
This is now outputting into my strBody as seperate entries. I'd like to combine them into one entry within the strBody.
Please reference strStartTime, I've tried to incorporate this into the email strBody, but am unable to accomplish this. Any help would be appreciated. Thanks Everyone!!!
Here is the asp code for the form: ......
View Replies
View Related
My problem is this: This database has a field called "b_name" which contains the first, middle (if any) and last names of registered users. The table also has corrosponding other demographics pertaining to each registered user.
I've used the code below to parse the full names in "b_name" in the original table and put the names in another new table which has 3 fields, "FirstName" "MiddleName" & "LastName".
My problem is the fact that the way the names are stored in the original table and the parsed names in the new table do not correspond. Code:
View Replies
View Related
I'm writing ASP/mysql apps, and I'm almost clueless about mysql. Can someone tell me how to insert data into fields using ASP? Code:
View Replies
View Related
What i am trying to do is Update data in a table with data in another table but i want to update 2 fields in the destination table with data from 1 field in another table.
These are the table i have and their fields:
*CUPFirstRound* - Table1
GameId
GameDate
Home
Away
HomeScore
AwayScore
Winner
There are 8 rows in this table, thereofre the GameID's go from 1 to 8 Code:
View Replies
View Related
i have a table which has many field, they go across and are named as a1a2a3a4a5a6-a16 the next row will be b1b2b3b4b5b6-b16 the last row is g1g2g3g4g5g6-g16 and so on.
now in the first column i.e which would be a1 b1 c1 d1 e1 f1 g1, the user enters a part number what i want to do is prevent him or her entering the same part no.
twice if this the case the two filds with same part no should be cleared.i.e if user enter p45 in a1 then p45 in d1 then both a1 and d1 should be cleared would be better if the later was only cleared but any method would do. Code:
View Replies
View Related
I have announcements down the left hand column of a site and want to display contact info if it is available - if it is entered into the database. So I only want to display a space plus the data if there is data in the field. Code:
View Replies
View Related
I am creating a form that has 5 steps/pages. Each page contains about 20 fields. But I don't want to write them until they submit on the last page. I figured out that I can use hidden fields to carry the data from the previous forms forward. If should bascially work like this:
Page 1 Page 2 Page 3 Page 4 Page 5 Page 6
20 Fields 20 Fields 20 Fields 20 Fields 20 Fields 100 Hidden
20 Hidden 40 Hidden 60 Hidden 80 Hidden Write to DB
But the problem I am having is when I submit page 4 page 5 won't load. No error, it just won'tload. It seems to be overburdened. Is there a max on the number of fields it can pass? Is there a better way to go about doing this that someone can suggest? Or a suggestion that someone can make to fix this problem?
View Replies
View Related
I am trying to display a random background image for a webpage. I found this code to do it
<%
'Defines the number of background images you have
Const NUMBER_OF_IMAGES = 2
'Initiates the randomize function
Randomize
'Sets a variable: this will be used to hold the
'random generated value
Dim intImageNumber
'This is where we create the random number
intImageNumber = Int((NUMBER_OF_IMAGES * Rnd) + 1)
%>
Modify the body tag to accept the random number. In this case we are going
to place it within the image so as to facilitate the selection of a random
image. Code:
View Replies
View Related
Right now i have multiple record sets. Im using the following Select statements:
How can I combine ClaimNbrSQL, ClaimCovSQL, and ClaimantSQL to pull data based on ClaimdraftSQL.
They have different Where_parts because one field is not accounted for in the innerjoins for the the last 3 selects. Anyone know of a better way of doing this? The problem is the queried table is not matched up correctly. For example if there are 2 rows where dft_mirco_ecd_nbr are blank, the ClamiantSQL is off by 2 rows. Code:
View Replies
View Related
I want to let users select one or more of my 5 choices in checkbox format, but also want to have a choice that is "all 5 choices". When "all 5 choices" is selected, I want to make sure they can't check any of the 5 choices. Is this possible?
View Replies
View Related
May I know how to combine the text that get from textfield with the "strings" and insert it into database? Can anyone help me to check whether example below is correct or not. Any syntax error?
userid= request.form("userid")
emailaddress=userid + "@xxx.com"
insertsql= "insert into database(email) VALUES( '"&emailaddress&"')"
View Replies
View Related
I have this code that will combine month day and year for some reason it puts the data in the database as January9,2005 February, 22,2005 . I need a space after the first month and I cannt figure out where the c
DateCovered1 = request.form("DatesCoveredMonth1") & " " & request.form("DatesCoveredDay1") & "," & request.form("DatesCoveredYear1")
DateCovered2 = request.form("DatesCoveredMonth2") & " " & request.form("DatesCoveredDay2") & "," & request.form("DatesCoveredYear2")
View Replies
View Related
I'd like to combine if possible these two statements drawing from a total of 3 tables.
sql = "SELECT p.Sub_ID, p.Cat_ID, p.Sub_Name, COUNT(c.Sub_ID) as ct FROM
Subs p LEFT JOIN Links c ON p.Sub_Id = c.Sub_Id GROUP BY p.Sub_ID, p.Cat_ID,
p.Sub_Name ORDER BY p.Sub_Name"
sql = "select * from Subs inner join Cats on Cats.Cat_ID=Subs.Cat_ID ORDER
BY Sub_Name"
Is it possible? Am I totaly screwed up for even trying? The goal is to count the relations ships in the Subs and Links table based on Sub_ID, to display needed data from the Subs table, and to display the Cat_name table from the Cats table in relationship to the Cat_ID in both the Cats and Subs Table.
View Replies
View Related
Is it possible to recall a variable with the combination of text + rs.field? i want to recall the variable "speler1", at the place weher rs("speler") is 1. It's probably again easy.
View Replies
View Related
I have 2 store procedure, I need to pass both into the asp page, and combine the result set of two. What is the syntax or the approach to do this.
View Replies
View Related
i have two numbers that i need to combine and then depending on the result i need to write different instructions to the browser. Code:
View Replies
View Related
I have several (three) CSV files each with different columns and dissimilar data. The only common column is transaction date. What I'd like to do is combine the data chronologically. I can't do a join query because the transaction dates do not line up from file to file and no other columns will match either.
I just want all the rows from the three different files put in chronological order in one place understanding that my columns wont line up since the source columns are different. I've exhausted every effort on the SQL side to combine these, but I'm thinking maybe there's a way to do it with FSO or something else.
View Replies
View Related
I have used thecode which is below to get x characters on to display
<%= LEFT(rsName.Fields.Item("columnname").Value,50)%>
It works fine but when I use this same code to get x characters plus display it using VBCRLF, with the <br> with writing the code :
<%=Replace LEFT
(Recordset1.Fields.Item("Detail").Value,VbCrLf,"<br><br>",50)%>
it gives me error so please can you tell me how can i trim the characaters and at the same time use VBCRLF. why does this above code with LEFT + vbCrLF doesn't work.
View Replies
View Related
I have several text files on my server and I would like to combine them into one text file by just appending each file to the end of the combo file. I know this should be possible, I just don't know how to approach it. Some combination of OpenTextFile and CreateTextFile?
View Replies
View Related
I have two variables:
UserLastName = request.cookies("UserLastName")
UserFirstName = request.cookies("UserFirstName")
and I'm trying to create a third variable that would strip the first letter of each of the above variables and combine them to create initials. Eg. if FirstName is John and LastName is Doe, the UserInitial variable would be "JD".
View Replies
View Related
I've got a site managed in Frontpage and a forum in phpBB/MySQL. I'd like to grab the most recent posts from the Announcements Forum and embed them in the site's homepage. I got the idea from http://pocketpcthoughts.com/ . All of their homepage posts are fed from their FrontPage Archive Forums.
Right now, I'm using a phpBB mod called FetchAll to do the job. It works great except for one thing: I have to do it via an inline frame because I can't include a PHP file in an ASP page, and I have to use ASP because the site is in Frontpage (project requirement; FP is essential to the non-forum part of the site). Code:
View Replies
View Related
I have added a db driven marquee to my site and need to combine the global asa's to 1 global asa file. Code: ......
View Replies
View Related
I have 2 fields in my database. One is startDate one is endDate. I want to display records according the current date. So far I can select all records where the startDate is greater or equal to now by using
Code:
SELECT *
FROM items
WHERE itemDateStart >= now
It seems the BETWEEN claus only accepts value, not fields.
So basically I want to select * from items between itemDateStart and itemDateEnd
View Replies
View Related
I have a need to be able to identify which fields within a database are key fields.I did find the Attributes property of the Field object contains information for a field in a recordset. One of those values for the Attributes property is identified as adFldRowId which should identify whether the field is used as a key, but it doesn't seem to work. I'm currently reading off an Access database.Does anyone have any insight in being able to identify key fields within a recordset?
View Replies
View Related
I have set up my database with 4 fields (num1, num2, num3, sum), and have created a form with 3 fields to insert 3 numbers. That part is easy.My problem is when i submit these 3 numbers (5, 7, 6) i want the form/script to add these numbers together and insert it into the 4 field "sum".
View Replies
View Related
I have a database table and I am building a search-like page which is supposed to pull information from the database based on the following. "Get records where field1 is 30% (or more) higher than field2 within a specific time period". Should these records be chosen by the SQL query itself?
Or should I get all the records within the time period using GetRows, and loop through them checking whether or not it fits the criteria? While I certainly feel more capable of the second approach than the first, I am not sure if its the best way when large numbers of rows are involved.
View Replies
View Related
I want to create an order form for prints online... I will have up to 200 prints to be selected. What I am thinking is that I will have an HTML Form that has all the 200 thumbnails with a check box next to them. They select the ones they want and push next. Then I would like it to create a set of options for each one they selected.
That basically says the image name then has a check box for 5x7, 8x10 and a text box for the amount for each... I do I create the page what creates these selections and how to I incorporate that into a mail form going to the next page?... it seems like a simple enough idea. Am wondering how the reality of it will be.
View Replies
View Related
Say I have to different recordsets that have the fields:
rsA.Fields.Item("A").Value ,rsB.Fields.Item("B").Value
How would I add those to fields? It may be my inexperience but when I
tried something like
rsA.Fields.Item("A").Value + rsB.Fields.Item("B").Value
didnt work because one of the fields was a empty value. I have about
6 fields i need to add together if a value exists in any of them.
Suggestions?
View Replies
View Related
I have a loads of records in an Access database relating to publications. The publications come in 3 forms, pdf, Word or .htm so I have fields for each called PDFurl, Wordurl and Publink. What I want to do is, if any of those fields contain a value then display an appropriate icon (which will link to the publication).
I'm ok with the latter part but how do I determine if any of the fields have a value and if so display the relevant icon? Rather than do a load of if then statements I was wondering is there a quicker way of doing this, perhaps using a Case?
View Replies
View Related
how would you join the two felds from a table in the database so it can show the image from joining the two fields to know wherethe image is coming from
Quote:
<img src="<%=(rs_lprojects.Fields.Item("image_folder_path").Value)%><%=(rs_lprojects.Fields.Item("image_src1").Value)%>" />
View Replies
View Related
I have been writing out the general steps
I want to do in plain english before writing ASP.
The values come from a customised data grid (not in .NET) that is
generated according to what fields need to be recorded for that record.
What I want to try and do is as follows:
- Read form fields into input array (skip first three values :
savevalues, userid, productcode) - Save last value of every row (add to
quantity for extra info) - rest of processing
Is the first one even possible using plain ASP? I remember being able to
do it using Javascript, but I couldn't get it to work properly.
I have tried to use Arrays in ASP before, but without much success.
View Replies
View Related