We have a batch script running on our server that we have no idea why its running. It was something that was written before the current techs took over and would like to find what is the name of the file that keeps opening the cmd window and running something.
Is there any way to catch this or...
i would like my data to show a 1 if PlayerID exists in GameRoster and a 0 if it doesn't
my currently working script returns null if the playerid doesnt exist.
using the if exists it crashes.
i went with the long way on doing this, inserting, selecting the id then updating. Its not the way i wanted to but it works for now and im going to look into bborisov's method in the future to clean it up.
Thanks for the help
I have a table that contains ArchiveID (PK, AutoIncrementing) and FileName. When inserting an item into the database i would like to insert the filename originally spreadsheet.xls as spreadsheet141.xls where the 141 is the archiveid that is given on insert. is there a way to append this before...
im trying to restrict my query to the first 5 record but its not working it keeps returning all records.
// Performing SQL query
$query = 'SELECT GameID, Date(GameDate) AS GameDate, G_Time, R_Name,
(SELECT Concat(Team.SchoolName,\' \',Team.Mascot) FROM Team WHERE Team.TeamID=A_TeamID) AS...
ok i think this would work but i keep getting syntax error near keyword ON
why?
SELECT AdditionalStatus.LoanID, Max(AdditionalStatus.DateAdded) as DateAdded, AdditionalStatus.StatusValue
FROM AdditionalStatus INNER JOIN (SELECT Distinct LoanID
FROM R_IFS_AdditionalStatus)
ON...
Basically this sql statement is returning all the results i need. From here i need to take the max(dateadded) for each LoanID where the date is less then a specified date from @EOM_Date.
SELECT AdditionalStatus.LoanID,
AdditionalStatus.DateAdded,
AdditionalStatus.StatusValue
FROM...
SELECT Loan.LoanID, Max(A.DateAdded2) AS DateAdded, A.StatusValue
FROM Loan INNER JOIN (SELECT Loan.LoanID,
Max(AdditionalStatus.DateAdded) AS DateAdded2,
AdditionalStatus.StatusValue
FROM Loan INNER JOIN AdditionalStatus ON Loan.LoanID=AdditionalStatus.LoanID
INNER JOIN...
...DateAdded
Status
EXAMPLE
001 2/15/06 ABC
001 2/17/06 GHI
002 2/18/06 ABC
in the above example the first one would not be selected because the max date for loan 001 is on 2/17/06. I hope this is clear enough.
My current SQL statement.
Select * from AdditionalStatus order by LoanID, DateAdded
insert into iProf_Status_History (LoanID, StatusDate, UserName, StatusCode) Values (a,b,c,d)
a,b,c will be coming from a specific table (MortPayoffCalc) where Approved=1
b is a varchar that has datetime vaules. I need to convert them to datetime for the new table.
a : Mortpayoffcalc.LoanID
b...
In the beginning of my proc i want to drop the temp table if it exists. in mysql it would be...
DROP TABLE IF EXISTS Temp_Table
how do i do it in MSSQL?
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.