I am trying to create a UDF. My code is attached.
For each row retrieved by the SELECT statement there will be 2 values.
What is the corret syntax to access both retrieved values? Wh...
Dear Experts,
Is it possible to search all fields' content in a database for specific word?
for ex. I want to search a word about 'London City abc'
the query will search all fields in all...
I am new to SQL triggers, and need to write one for when a new record is added to a table.
I have two tables, say, TableA and TableB. The trigger will be on TableB.
When a new record ...
What is the general method to incorporate an SQL script (.sql file) into an Excel VBA module? At this point, I have to run the SQL script using SQL*XL to get the data into an Excel worksheet. ...
I have the following query that connects dattbl_Case with dattbl_Policy
dattbl_Policy sometimes has more then one row. When this occurs I need my query to merge both of the POL_NUM column r...
We've been working on hardening our web site which is written in .asp and uses SQL 2000 on the back-end. We've had a few SQL injection attacks and we're trying to decode what is being passed....
Need help with the REPLACE command. After running this SELECT :
SELECT CATEGORY, QTY_STK, ACTIVE
FROM ITEMS
WHERE (CATEGORY = '166') AND (QTY_STK = 0) AND (ACTIVE = 'T')
...
Hi
I want to use an IF statement to check if a SELECT statement returns values. If the SELECT returns values I want to do one thing, and if it does not return any values I want to do anothe...
I'm running a VBScript that connects to an ODBC data source. The database, in this instance, is on a SQL 2000 server.
I have chosen to use ODBC and to execute an SQL command as I will be ru...
I currently have an access database with a query that I need to tweak. The existing query is:
SELECT ssUsers.custom1 AS Location, Sum(DateDiff("d",[CheckIn],[CheckOut])*[rooms]) AS ActualR...
I have to add 511 blank spaces into a sql query that outputs to a file. The file has to have each query line show up in exactly the right character spot. I have to create blank spaces for the ...
I have a select statement in access shown in the snippet,
how do i add no lock
Hello,
I am trying to implement the following Trigger into a table in SQL Server 2005
http://jamesewelch.wordpress.com/2007/09/04/tracking-database-record-changes-at-the-field-level/
I...
I have the following codes that look for the common records of two tables and join the caseIDs for these common records as one string:
With CurrentDb.OpenRecordset("SELECT tbl_A.* FROM tbl_...
I have a listbox with 3 columns.
I have a textbox.
I have tblTicketReason with 4 elements:
-ID
-FormID
-MajorReasonID
-MinorReasonID
I want to add the textbox value to the ID fiie...
hI,
I have the following line of code in a VB6 project
SQLStmt = " INSERT INTO Recipes_West_Table " & _
"Values( " & Form1.Text1.Text & " , " Form1.txtVal1.Text & "," & Label2.Caption...
Hi
I've got an upload script that writes to a database when a user uploads a file, that part of the script is working fine. I've since added an extra field to the database (web_name) and a...
I have a stored procedure that will insert a user into our database...and then well costomize settings for him.
We realised after much fustration that our procedure was failing since the u...
Hi,
I am using MSSQL 2000
In MS SQL I have to substring the middle integer from the string
For Example
If String is AS-00200-1
I want result as 200
If String is AS-00200-1
...
Hello!
About my environment:
I have a hosted web database that I don't have access to other than with classic ASP and an ODBC connection that thankfully gives me both read and write access...
I want to update the values in one table based on the city they are in which is located in another table. When I try to join the tables in my update command I get the following error message:...
This is my Sql statement which appears on a datareport in vb6. In the database, paymentmethodID is formatted as a number, yet it appears in the database as a string not a number. So when I ad...
I have a source table with a primary key column that is a guid and is set as rowguid when the table was created. I want to duplicate this table using a select-into command and then perform so...
Hi,
What do I need to do to the following Access code to convert to using SQL Server 2005?. I have got so far but am now stuck with the INSERT statement parameters & on adding the current...
I have an extensive search page (ASP/SQL Server) which uses similar code to this - with many optional search parameters. I am trying to use only stored procedures to prevent sql injection atta...