Before you insert the new card into the db, just run the folowing update statement:
UPDATE SigCardTable SET status = inactive
WHERE docnum IN (
SELECT SigCardTable.docnum
FROM SigCardTable INNER JOIN KeyWordsTable
ON SigCardTable.docnum = KeyWordsTable.docnum
WHERE CIFKey =...
Hi,
just write the if statements complete in the stored procedure:
SELECT Column1
From Table
WHERE Column2 = 0
<cfif someVar = 3>
AND Column3=0
</cfif>
becomes:
if (@someVar = 3)
BEGIN
SELECT Column1
FROM Table
WHERE Column2 = 0
AND Column3=0
END
ELSE
BEGIN
SELECT Column1...
Hi there,
if you would run the inner select statement
SELECT MIN([employeeID]) FROM table_name
GROUP BY column1, column2
on let's say the folowing table
employeeID [tab]column1 [tab]column2
1 [tab]John [tab]Smith
2 [tab]Marc [tab]Jones
3 [tab]John...
Replace the first query with
"SELECT count(*) FROM email INNER JOIN members ON email.senderID = members.id WHERE recipientID = '" & session("ID") & "' AND delete_flag <> '" & session("ID") & "' AND folder='inbox' order by emailID;"
and see if you still get a rowcount of 6
cheers
Johpje
BobbaBuoy,
There isn't anything wrong with your query. The fact is that there actually exist 2 grades for the given rosterid.
Please verify this by running following query:
SELECT * FROM Grades WHERE RosterID = 2441
I'm quiet sure this will return two records with grade 10 and 11.
cheers...
globalstrata,
TOP is used to return only a part of the total result set.
You have to specify a number. In your case:
CREATE PROCEDURE dbo.sp_GetRandomProduct
@RecordAmount int out
AS
SELECT TOP 1 @RecordAmount=dbo.Product.ProductID
FROM dbo.Product
ORDER BY NEWID()
specify...
shannanl,
if you change following lines in both procedures:
SET @Shift1_End = 601
SET @Shift2_End = 961
SET @Shift3_End = 1441
that should do the trick.
Sorry for the late reply!
shannanl,
Using some plain old numbers ans some basic matematics, you can come to a quite simple solution:
CREATE PROCEDURE CalculateShifts
@Offset_in int, @Offset_out int, @Shift1 int OUTPUT ,@Shift2 int OUTPUT , @Shift3 int OUTPUT
AS
DECLARE @Shift1_End as int
DECLARE @Shift2_End as int...
davidste,
you should use table aliases for each diferent instance of t_users:
SELECT t_proj.f_proj_id, t_proj.f_name, t_manager.f_forename,
t_manager.f_surname, t_sponsor.f_forename, t_sponsor.f_surname
FROM t_proj INNER JOIN t_users t_manager ON t_proj.f_manager_id = t_manager.f_user_id...
Why don't you just execute
SELECT [name], phone, product FROM TableX ORDER BY [name], phone
Then when you fill whatever visual control you are using, just check when name and/or phone number change to create another parent object.
regards,
Johan
TimBiesiek,
Theorecicaly you do not NEED the company link in the Property or the Meter table. Because as you mentioned yourself you can run an SQL to link from Meter table back to a Company.
However, as r937 already mentioned, if for example the Meter-Company reference is frequently accessed...
Is it realy necesary to have a tab per record? If not you maybe could only show one record at a time adding next and previous buttons or something to navigate.
You could read all records in a array (or collection) to not have to access the file over and over?
regards
Johpje
First of all, it seems a little unnecesary to do a For Each every time you wantto change the size of a control, can't you just call it directly by name? After all you do call them by name in some cases, like:
<CODE>
grid.Width = Me.fraCustomerView.Width - 50
grid.Height =...
Hi,
Best to make a Stored Procedure where you create a cursor
SELECT duplication_id, item
FROM Table2
INNER JOIN Table1
ON (Table1.[id] = Table2.[id])
Then you do an insert (with new id) for each record in the cursor.
Not recomended because the 500 is fixed that way, but for the...
Hi all,
I'm making a COM object in VC++, but I have a problem with a method returning a string.
the code in the COM class is goes like this:
STDMETHODIMP CCOMCLASS::get_String(/* [out/retval] */BSTR *pVal){
_bstr_t tmp;
tmp = _bstr_t(XXX);
*pVal = tmp;
return S_OK;
}
when i call the...
Blaises,
When you make your table, just put these options for your id field:
Data Type: bigint (any integer is ok, but if you start with 5 digits, you better keep it a bigint)
Identity: Yes
Identity Seed: 10000
Identity increment: 1
Regards,
Johpje
Hi there,
I'm developing an ASP.NET app. that requires a login with userID and Password. I would like the last userID that succesfully logged in to appear in the userID.
At the moment it works, but only if i keep the same session open. If I, for example, completely close my browser and get back...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.