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: *

  • Users: ClayG
  • Order by date
  1. ClayG

    cvs update -A who knows?

    Seems reasonable that when you merge an earlier version and a later one, you basically end up with the later one as the result, if there are no branches involved. It probably would be different if, say, the non-Head version was a branch that contained changes not in the Head.
  2. ClayG

    sp_depends not showing dependencies

    I think its a problem of timing of the creation of objects. If A refers to B, if you define A first (which is usually allowed, eg procedure A refers to table B), then db cannot record dependency because B does not exist yet (especially because dependencies are by object IDs, not name, no object...
  3. ClayG

    Parse & Compare data in 2 files

    When I have done this sort of thing, I put the data into some kind of database engine, even a primitive one: MS-Access, or even create DBase5 files via ODBC manager. Then this sort of matching logic can be done with sql Selects with 'Like' etc.
  4. ClayG

    How to configure TextPad with SQL-Server?

    I don't use TextPad, but I assume you would need to call ISQL.exe . Or OSQL. See its parameters: isql.exe -? (in c:\program files\Microsoft SQL Server\bin\).
  5. ClayG

    Different collations on databases

    You can explicitly convert collection in an expression where you use a column, eg, where m.fullname = a.fullname collate sql_latin1_general_cp1_ci_as
  6. ClayG

    Crystal Reports Error--No Rowset was Returned for this table, query..

    Try Set NoCount On at the start of the stored procedures
  7. ClayG

    ranking by group

    I think you can do this Select GroupID, Week, Username, Wins, TBD, ( Select Count(*) from Results R2 where R2.GroupID = R1.GroupID and R2.Week = R1.Week and ( R2.Wins < R1.Wins or R2.Wins = R1.Wins and R2.TBD > R1.TBD )...
  8. ClayG

    openquery - linked database

    The only way you get any variables into OpenQuery is to make the whole statement dynamic: set @stm = 'SELECT @BeeDirectCountTransactions = Count(*) FROM OPENQUERY(sbdatabase1,''select * from ' + @TableName +''')' Seems crazy because the inner statement going to the remote server is...
  9. ClayG

    Decrypt Stored Procedures

    You could look in the SysDepends table for tables referenced by the SP. SysDepends is not always 100% correct, but usually OK for this.
  10. ClayG

    Return Values from Stored Procedures

    Are you returning you 'values' in a recordset or some other way (output variables?). Details please. Otherwise, for a wild guess, try Set NoCount On in the procedure (long story)
  11. ClayG

    String variable passed to OPENQUERY

    SELECT @cmd = 'SELECT * INTO #OPEN_CLOSE_ALL FROM OPENQUERY(PHPROD, ''SELECT DISTINCT A.PRI_ACCT_ID, ... TO_CHAR(E.PROC_DATE,''DD/MM/YYYY'') ... You have string within strings within strings. Level1: @cmd = '..' Level2: the Oracle statement ''Select Distinct ...'' correctly has two quotes...
  12. ClayG

    Session Information

    your own spid is the variable @@SPID
  13. ClayG

    scripting with the internet explorer object

    objDocument.writeln "variable = inputbox(""enter value:"",, variable)" As for passing back to 'main script', you could Dim variable at the global level.
  14. ClayG

    How to set up File Association and determine the file

    It would be the command-line arg. It sounds like the command-line of the association does not have the argument in it - you need %1 with quotes: Command: c:\progampathxxxx\youprogram.exe "%1" Also switch off "DDE" unless you know how to deal with it (remove the DDE subkeys if you are...
  15. ClayG

    How to fill a datagrid via sql string...

    Also, you seem to build a select statement string that is not used, you just open the whole table instead ?
  16. ClayG

    IF statements in SPs.

    Create a IF statement like the simple ones discussed, and execute it in QueryAnalyser with "Show Execution Plan" switched on. (Its in the Connection options, not "Estimated execution plan"). Put it in a SP and Call it to be thorough. After execution you supposedly see the execution plan that...
  17. ClayG

    Invoking .sql script in Query Analyzer

    There is no Good way. The best (or least horrible) way to comibine script calls together is with a .bat file, using calls to isql: isql -i script1.sql isql -i script2.sql (You need more parameters to isql, and some error handling is advisable) But that is not in QueryAnalyzer as you asked...
  18. ClayG

    SQLDMO and .NET

    The way SQLDMO references the server is not a SQL connection, and it does not use a connection string. You probably will have to pick the values out of the connection string.
  19. ClayG

    IF statements in SPs.

    I would strongly contest that stuff about IF statements performance, at least judging by the way you report it (I have not seen the article). The query engine will Not CHOOSE a query plan Within a procedure -- a procedure has ONE "query plan"* which includes all structured statements. For...
  20. ClayG

    Text, BCP and Mass Insert

    I try to avoid DTS too. A different idea: in SQLServer create a "linked server" reference to the access database. Then transferring data is simply Insert .. Select from accessdb..table. I havent got an example handy, but I have an example of using OpenRowSet, which is yet another way...

Part and Inventory Search

Back
Top