Can someone tell me why this is allowed:
update
(select su.sec_usr_id,su.is_enbl_ind,t.asn_usr_id,t.stat_typ_cd,su.lst_updt_dt
from sec_usr su, tsk t
where su.is_enbl_ind = 0
and su.sec_usr_id = t.asn_usr_id
and t.stat_typ_cd = 'OPEN')u
set u.stat_typ_cd = 'CLOSED';
but this is not...
Sorry, one more question. The DBA gave me this below but to me it looks like it finds the unique sec_usr_id's and then updates the stat_typ_cd. Isn't this way pretty inefficient to use? This is my last question and then I'm going to get a cup of coffee and bang my head against the wall. His...
I have been working on an UPDATE query that will update one column based on results from a join select query.
[highlight #FCE94F]I am looking to update the column "stat_typ_cd='OPEN'" to "stat_typ_cd='CLOSED'".[/highlight]
At the bottom of the page is the SELECT query that pulls the data that...
Just a note for anyone that uses this thread in the future. The timer function works great but if you are going to use another app to schedule the script then it is unesscessary. I used the code below to just subtract 30 minutes from the date/time in order to get my variables for my SQL query. I...
I figured it out. I was running the script every 15 minutes and the timer was set to every 30 minutes (1800). Once I changed the interval the script runs it sorted itself out. I also had to change the "n" of the datepart to be "-15" to ensure it was not checking for a date that didn't exist yet...
Geates, I've had a hard time adjusting the timer part of the code to just do the last 30 minutes of data. The time change really messed it up since it is Pacific time zone and the database it pulls from is central time. I will assume there really isn't a way to automatically adjust for the time...
I hate to keep this thread going but I seem to have an issue with this part of code. The script seemed to be working fine but now it is sending the email saying that the data is empty. I checked it and it is hitting the code below. If I try to remove the code it gives an error saying that BOF or...
Just so the thread isn't left unfinished. Here is the final script in all its glory. Thanks again PHV and Geates. If you see anything wrong or code that can be improved please let me know. I'm a newbie and appreciate all of the insight.
Dim strCon
Dim SQLArray
theDate = date()
newDate =...
Here is PHV's. It returns 10 about six times. This is actually the correct SUM. Thanks PHV and Geates for all the help.
for i = 0 to ubound(SQLArray,2)
wscript.echo sum(SQLArray)
If sum(SQLArray) = 0 then
....code here....
Wscript.quit
else
strRows = strRows & "<TR...
Ok, here is what I have right now. It is returning the number 20 in an endless loop.
for i = 0 to ubound(SQLArray,2)
wscript.echo sum(SQLArray,0)
If sum(SQLArray,0) = 0 then
....code here....
Wscript.quit
else
strRows = strRows & "<TR style=WORD-BREAK:BREAK-ALL;><TD NOWRAP><center>" &...
Well...it contains the count. I would assume that SQL creates numbers when it does a count, correct? Below is an example output. It also works for SQLArray(0,i) and SQLArray(1,i) but not for SQLArray(2,i).
TO_CHAR(LG.LOGTIME,'HH24') TO_CHAR(LG.LOGTIME,'MI') COUNT
10 15 1
10 19 2...
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.