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

    combine in a single SP several SP’s

    This may well be more of a Crystal question than a SQL question. If you can execute your current stored procedures outside of Crystal (say, in SSMS) and they perform well, then this is more of an issue of how the report is constructed than the sp(s). Also don't know how, in Crystal, a stored...
  2. sblocher

    Does VFPOLEDB use IDX files for optimization?

    That makes sense. If the table header has no knowledge of any IDX files that are built against it, then it certainly can't use it. Is there any other way to tell VFPOLEDB about an IDX file, such as thru a config file? Thanks
  3. sblocher

    Does VFPOLEDB use IDX files for optimization?

    ...But my tests do not concur. I do NOT have control over the Foxpro data; I CANNOT add an index or modify one or anything. I can only read the data. Sample query run from SQL Server Management Studio: select * from openquery(FOXDATA,'select ssn, lastname from employee where...
  4. sblocher

    SQL 2005 Export to Access?

    No quick and dirty way that i know of short of scripting out the database and running the script against Access -- as i've suggested. The wizard takes care of data only. It won't even handly indexes and other such structure You may want to try the SQL Server Programming forum, as your...
  5. sblocher

    SQL 2005 Export to Access?

    You can execute Access DDL commands from T-SQL code to create the indexes in the Access mdb. You'll need to create a linked server to the mdb. Then you can execute DDL commands against that linked server. For example, you can run this command from SSMS, where the linked server name is...
  6. sblocher

    Query Performance

    SQLSister, not sure i agree that "Joins are significantly faster than subselects. MS suggests that SQL will optimize them in the same way, assuming ALL ELSE IS EQUAL. For example, if i put these two queries together and run them, then Execution plans are the same: select productcode from...
  7. sblocher

    Question about record numbers

    ...the query. And if you wanted "records 10 thru 20" based on the current data, then use a derived table query with ROW_NUMBER(), like this: select * from ( select top 20 ROW_NUMBER() OVER(ORDER BY RECNO) AS 'CurrentRECNO', * from table Order by RECNO ) DerivedTable where CurrentRECNO between...
  8. sblocher

    Insert into openquery( MySql)

    Never done this against MySQL, but i've had explicitly type the source fields before. Not sure what type you need to map correctly to the "text" type in MySQL, but you can try a couple. Like this: insert into openquery(Archer,' select Orig_Alarm_ID,ProbableCause,Item from...
  9. sblocher

    Find data in comma-delimited lists

    ...my "tool kit" of helpful query examples, with one small improvement in case the comma-delimeted values contain extra spaces anywhere: Select Distinct A.* From TableA As A Inner Join TableB As B On ',' + replace(B.List,' ','') + ',' Like '%,' + Convert(VarChar(10), A.Id) + ',%'
  10. sblocher

    Find data in comma-delimited lists

    Good point, George. katelhol suggests that she has control of the design. So i'll amend my comments to add: "And sometimes business priorities do not allow revising existing designs as part of a defined project." But my point is appropriate, I think. Good discussion, although maybe not an...
  11. sblocher

    Get data from several Access and SQL databases

    ...data. For example, if you have a linked server called MDB1 you could use either of these queries to get the data from a table called XYZ: select * from openquery(MDB1,'select * from XYZ') select * from MDB1...XYZ If your in SQL 2005, you can also do EXECUTE ('select * from XYZ') at MDB1 If...
  12. sblocher

    Find data in comma-delimited lists

    SQLDenis, do you live in the real world? For those of us that do, we are constantly working with and integrating to databases and systems that we don't "own" and thus do not have the luxury of redesigning as you suggest. Perhaps you could provide sample queries that katehol could use to put...
  13. sblocher

    Find data in comma-delimited lists

    Can you give a couple example rows of data in each table? The right solution may depend on what the data looks like and how much data there is (especially in TableA). Might be able to create a udf and do this with one query. Or perhaps a cursor to run thru each row in TableA looking for the...
  14. sblocher

    How to count records in a sproc

    @@rowcount returns the number of rows retrieved by a SELECT, or updated by an UPDATE, etc. So, for example: SELECT .... FROM ... if @@rowcount > 0 BEGIN -- Do whatever you want here END Be careful, @@rowcount is only good for the previous statement, so if you need other statements before...
  15. sblocher

    Can 2205 IS Connect to a Pervasive Database?

    Yes, we do it. We use an ODBC Data Source, then OLE DB for ODBC. We use a linked server, but you wouldn't have to.
  16. sblocher

    How to remove a "Validation Rule" via DDL

    Thanks. Is there an MS KB article that lists the properties you cannot get to or modify with DDL?
  17. sblocher

    Export results to file

    BFT1303, to do this in an automated approach, you'll have to use Integration Services, which is how SQL wants you to move data from one type of repository to another.
  18. sblocher

    SQL ACCESS error

    You can create "views" in Access. They end up as "Queries", but same thing, just different name. Try this: CREATE VIEW ML_CUST (FirstName, LastName, Phone) AS SELECT CUSTOMER.FirstName, CUSTOMER.LastName, CUSTOMER.Phone FROM CUSTOMER WHERE...
  19. sblocher

    How to remove a "Validation Rule" via DDL

    Does anyone know how to use a DDL command to remove or change a field's "Validation Rule" in an Access table? I have an existing MDB (2002) with a table that was created using the Access table designer. Table is named 'GlidePath', with a field named 'DaysOnly'. The 'Validation Rule' property...

Part and Inventory Search

Back
Top