Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. tran008

    trying to understand the code...

    Thank you very much...
  2. tran008

    trying to understand the code...

    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...
  3. tran008

    conditional join (I think) in SQL

    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'
  4. tran008

    Pseudonymisation function

    George, Any change this could product a duplicated? :)
  5. tran008

    .ldf file grown to fill disk

    Put the Recovery Model to simple instead of Full.
  6. tran008

    report of current users login AD

    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
  7. tran008

    Convert varchar to date field

    Look up convert or cast from BOL: eg select convert(varchar, DateOfReferral,120)
  8. tran008

    Return Multiple rows in single row

    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...
  9. tran008

    Query Help - Subquery/Exsists/?

    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'...
  10. tran008

    query result for Profit/loss analysis

    ...all select 2, 15, 10, 5, 15 union all select 3, 25, 12, 35, 18 union all select 4, 25, 20, 35, 25 union all select 5, 45, 25, 15, 30 select * from #tblTest SELECT IDENTITY(INT, 0, 1) AS RowID, s.ID, s.Price_in INTO #Bx FROM #tblTest AS s inner join UTIL_NUMS AS V...
  11. tran008

    query result for Profit/loss analysis

    I have the following in the table: id QTY_IN Price_IN QTY_Out Price_out 1 150000 10.01 150000 10.01 2 15 10 5 15 3 25 12 35 18 4 25 20 35 25 5 45...
  12. tran008

    sort order query

    ...'Intruder Alarm' union all select 9 , 9 , 0, 'Air Conditioning' union all select 22, 9 , 1 , 'Fans' union all select 23 , 9 , 2 , 'Pump' select * from (select *, row_number() over ( order by catid desc, subcatid asc)as rowid from @tbl1)b order by...
  13. tran008

    Turn 2 Rows into 1

    search for Pivot or have a look at this thread http://www.tek-tips.com/viewthread.cfm?qid=1479412&page=6
  14. tran008

    Stored proc with params to select a specific database?

    Select Name From master.dbo.SysDatabases
  15. tran008

    Count by Month

    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)
  16. tran008

    Pull most recent rows per customer

    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
  17. tran008

    Last FULL month

    WHERE adm_ts >= DATEADD(MONTH, DATEDIFF(MONTH, 31, CURRENT_TIMESTAMP), 0), AND adm_ts < DATEADD(MONTH, DATEDIFF(MONTH, 0, CURRENT_TIMESTAMP), 0)
  18. tran008

    xpcmdshell is enabled but won't copy MDF

    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
  19. tran008

    Checking for Constraints...

    This will give you what you wants: exec sp_help 'YourTableName'

Part and Inventory Search

Back
Top