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.
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...
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.
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\).
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 )...
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...
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)
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...
objDocument.writeln "variable = inputbox(""enter value:"",, variable)"
As for passing back to 'main script', you could Dim variable at the global level.
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...
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...
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...
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.
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...
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...
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.