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 strongm 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. jms8222

    Read current SET option statuses

    If you are looking for the connection-level options, then you would want to use EXEC sp_dboption @dbname='YourDB' This lists all the options currently on. If you want to look at a specific option, add the parameter @optname='arithabort'.
  2. jms8222

    Read current SET option statuses

    Try "EXEC sp_configure" and see if that is what you are looking for.
  3. jms8222

    Writing to Oracle Database Using Linked Server

    I agree with mrdenny and that using a temp table may be the way to go. I have run into this exact same problem but it was with SQL 2000 not SQL Server 7. So if your situation requires that you must use a trigger, then you can try the steps I took. Keep in mind, however, they may not give you...
  4. jms8222

    XP_Sendmail with @Query

    Check in master under extended stored procedures.
  5. jms8222

    Im having a bit of problem regarding XML output

    You probably want to check the order by in your SQL statement that is returning your XML ORDER BY [Rei!1!Hotel], [products!2!ReiknID] If you run your union query without using 'FOR XML EXPLICIT', do the rows come back in the order you want?? Once you've got them ordered correctly, the XML...
  6. jms8222

    xp_cmdshell not creating a file

    Are you looking for the file on your local drive, or on the server's C drive? I know that if I run the code against a test table on our server, it creates the file on the server's C drive. Just a thought.
  7. jms8222

    DTS output how to put it in a log file

    Right-click in the whitespace of your DTS package and choose "Package Properties" If you click on the logging tab, you have the option to write your output to a log file.
  8. jms8222

    Linked server error

    I have FINALLY been able to find the solution to this error!! In the end, it turns out that the solution was right before me all along (DOH!) First, I needed to update the registry settings (as per Microsoft knowledge base article 280106), but I had to adjust it slightly because we are using...
  9. jms8222

    Linked server error

    Yes it is. Stopping it causes this error: MSDTC on server 'myServerName' is unavailable.
  10. jms8222

    Linked server error

    I've seen this error posted in the archives, but none of the solutions I've read have helped me thus far. I have created a linked server in SQL 2000 to Oracle. I can successfully execute a SELECT and UPDATE from Query Analyzer, however, if I put the UPDATE statement into a SQL trigger, I get...
  11. jms8222

    XP password reset deletes remote servers list. MS fix didn't work.

    We are experiencing this same problem. Wondering if anyone knows of a solution beyond the MS knowledgeBase article.
  12. jms8222

    Top 10 on a Count

    Does this get you what you're looking for: select TOP 10 field1,field2 from table where field1 <>'co' and (not(datefield is null)) group by field1,field2 order by field1 compute count(field1)
  13. jms8222

    Root element with FOR XML

    If using "FOR XML AUTO, ELEMENTS" does not get you what you want, then you will probably have to use "FOR XML EXPLICIT". You would then have to re-write your query using UNION. Here is an example: SELECT 1 As Tag, NULL As Parent, [tableA.id] As [MyRoot!1!MyId!element]...
  14. jms8222

    Running DTS Package on remote server from foxpro

    Keep in mind that you could always run the DTSRUN command from a DOS Prompt just to make sure that the information is valid. Keep in mind that the Package GUID String changes when modifications are made to your package. It is not necessary if you are providing /N (Package Name), so I would...
  15. jms8222

    XML Explicit

    Does this get you what you want: select 1 As Tag, NULL As Parent, f2 As [LogFiles!1!Path!element], NULL AS [Files!2!Files!hide], NULL AS [File!3] from #t2 union select 2, 1, NULL, NULL, NULL from #t2 union select...
  16. jms8222

    Puzzling SQL

    If you want to establish yesterday's date to pi_type_code=240, then you need to move a paren. Change it from: (piVisitor.pi_type_code = 240 AND glossary.system_table_name <> 'PHYSICIANS') AND SUBSTRING(event.dttm_rcd_added, 1, 8) >= CONVERT(char(26), DATEADD(dd, - 1, GETDATE())...
  17. jms8222

    Puzzling SQL

    I'm trying to make sense of your where clause. You've got the one statement repeated twice (first on line 21, then on line 25): SUBSTRING(event.dttm_rcd_added, 1, 8) >= CONVERT(char(26), DATEADD(dd, - 1, GETDATE()), 112) Could you need to move the end paren for your OR from after the...
  18. jms8222

    SQL Table Linking

    You're going to want to use a join. You can find more about joining tables in Books on Line (BOL). Your query also seems to have an error in it. You reference a supp table in the where clause, but I assume you are referring to the contsupp table. See if this works for you: select key1 as...
  19. jms8222

    Puzzling SQL

    Could it be as simple as you have in your query: glossary.system_table_name <> 'PHYSICIANS' and it should be: glossary.system_table_name <> 'PHYSICIAN'
  20. jms8222

    count bit field

    Someone else may know a better way to deal with bit fields, but this is how I've worked with them in the past: select convert(char(10), SomeDate, 120) as SomeDate, sum(CAST(chk1 as tinyint)), sum(CAST(chk2 as tinyint)), sum(CAST(chk3 as tinyint)) from yourTable group by...

Part and Inventory Search

Back
Top