Hi all,
I'm trying to understand the code below, with (+). Comming from MS-SQL server, I never seem this before. Can some explain what the (+) does?
thanks
SELECT
tblA.FIRST_NAME,
tblA.lAST_NAME,
tblA.STREET_NUMBER,
btlA.CITY
FROM
tblA,
tblB
WHERE...
Not sure about the condition join, but I would do a union
select field1, field2, field3
from OOMM
inner join SER
on comm.userid=ser.userid
where comm.type='SER'
union all
select field1, field2, field3
from OOMM
inner join EMP
on comm.userid=emp.userid
where comm.type='EMP'
Hi all,
I need to generate a report to show all current user(s) login the Active Directory. Anyone have the script, or point me to the right direction? This is a Windows 2003 Domain server.
thanks
select patID, txtCode into #table1 from (
select
547385 as patID, '001' as txtCode
union all
select
547385 , '002'
union all
select
547385 , '01B'
union all
select
547385 , '026'
union all
select
1094870 , '001'
union all
select
1094870 , '002'
union all
select...
SELECT O.FILEID,
O.OFFICE,
I.INVOICEID,
(CASE
WHEN I.STATUS = 'closed' THEN 'Invoie
Finalized'
ELSE 'Invoice Not Finalized'
END) INVOICESTATUS
FROM ORDERS O
LEFT JOIN INVOICE I
ON O.FIELID = I.FILEID
WHERE O.STATUS = 'closed'...
Base on the code below, this is how I came up with the result, however this involve with temp table...which taking a bit to return the resolved. Anyone have any other suggestions on how to do this.
thanks
--table UTIL_NUMS is a number base from 1 to 5,000,000
select 1 id,150000 as qty_in...
something like this?
select dateadd(month,datediff(month,0,datefield),0) as [month],
count(groupmember) as [Auth Count]
from table
group by groupmember, dateadd(month,datediff(month,0,datefield),0)
order by dateadd(month,datediff(month,0,datefield),0)
Using sql2005....
SELECT a.* FROM (
SELECT customerID, OrderDate, ROW_NUMBER() OVER (PARTITION BY customerID ORDER BY OrderDate DESC) AS RecID FROM Orders
) AS a WHERE RecID = 1
Check the permission of the Account that ran the xp_cmdshell. I have the same problem with Delete...found out the network shared drive did not have the right permission for the the Account that ran the xp_cmdshell.
thanks
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.