Forward Dependency
Jun 5, 2007
I am attempting to duplicate a nifty feature that one of my colleagues used:
We have parameters where a user can select a client or an individual account. There are available values for each parameter from two queries. I tried to have the available values in the account list dependent on the user's selection in the client list by passing the client parameter's value to the query for the account data set and using it in a where clause, but I get a "forward dependency" error.
The weird thing is that my colleague tried the same strategy and it worked. We together tried to set my report up the same as his, but cannot find why his works and mine doesn't. Any ideas?
His report works when deployed from my machine, so there must be something in the actual report that is different...
View 1 Replies
ADVERTISEMENT
Aug 27, 2007
Hi
I am creating a report on a database where some of the table names start
with the @ sign - ie @table1.
Reporting services picks this up as a parameter, instead of a table name in
my query, even though I am encapsulating the table name in square brackets
eg. [@table1]
I have several data sets in the report that i am using to populate valid
parameters. These datasets are all variations of queries from tables that
have @ as the first character.
When i then try to run the report i get an error message as follows:
"The report parameter pool has a default value or a valid value that depends
on the report parameter SD_POOLCONTRACTS. Forward dependencies are not valid"
This is frustrating as SD_POOLCONTRACTS is not a report parameter but one of
the database tables that has @ for it's first character.
here is the query that i use to obtain the valid values for the pool report
parameter that i am trying to set up.
SELECT distinct u_poolcode as Pool
FROM OCRD INNER JOIN
OCRG ON OCRD.GroupCode = OCRG.GroupCode INNER JOIN
CRD1 ON OCRD.CardCode = CRD1.CardCode inner JOIN
[@SD_POOLCONTRACT] INNER JOIN
[@SD_POOLCONTRCT_LINE] ON [@SD_POOLCONTRACT].DocEntry
= [@SD_POOLCONTRCT_LINE].DocEntry INNER JOIN
[@SD_CONTRACTS] ON [@SD_POOLCONTRCT_LINE].U_DocNo =
[@SD_CONTRACTS].DocNum ON
case when len(ocrd.fathercard) = 0 then ocrd.cardcode
else ISNULL(OCRD.FatherCard, OCRD.CardCode) end = [@SD_CONTRACTS].U_CardCode
WHERE (OCRD.CardType = 'c') AND (OCRG.GroupName LIKE N'producer%') AND
(CRD1.AdresType = 'b')
ORDER BY OCRG.GroupName, FatherCard, OCRD.CardCode
Any help would be appreciated.
View 1 Replies
View Related
Apr 3, 2008
Hello all - I am trying to come up with a reasonable solution to an intermittent network. Specifically, I have a SQL Server 2005 installation that receives data from a client across a wireless network via OLE-DB. There are times when the network connection may not be available, and I would like to buffer the transaction (somehow!) locally, and then have it passed to the database upon re-establishing connectivity.
Any suggestions or recommendations would be greatly appreciated!
Thanks!
View 1 Replies
View Related
Jul 12, 2004
Does anyone know how to go back 1 record?
I know how to go forward 1 record:
Code:
SELECT TOP 1 *
FROM MyTable
WHERE [id] > 27
ORDER BY [id]
This will select the record with the id 28, if id 28 does not exist, then it will select the next available id.
however, then I try:
Code:
SELECT TOP 1 *
FROM MyTable
WHERE [id] < 27
ORDER BY [id]
It goes to the very first record in the table, becuase it selecting the TOP 1 record, How do I only go back 1 record, eg. id 26.
View 2 Replies
View Related
Jul 23, 2005
Hello All,DDL Statements:CREATE TABLE [dbo].[Table1] ([MyDate] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL) ON [PRIMARY]GOI have a varchar column which represents dates in YYYYMMDD and MM/DD/YYformats. If I query using:SELECT MyDate FROM Table1WHERE DOB LIKE '________'Why aren't the dates in MM/DD/YY returned ? Is the / a specialcharacter in T-SQL ?Thanks in advance
View 1 Replies
View Related
Oct 6, 2006
I assume that MS has a directive never to change the format of SSIS raw files...
However, what I'd like to know is that when I'm planning long-term systems where I've got backups of data (staging, logging, whatever) using raw files, can I be assured that future versions of SSIS will be able to read those raw files?
I assume a certain level of backwards compatibility, however, I'm just curious if I should think about building processes into my projects that would factor that in and rebuild raw files everytime a new/major release of SSIS comes out.
Phil
View 5 Replies
View Related
Jun 15, 2007
Hello, we are trying to find a way to send all SQL traffic from multiple machines in a DMZ trough only one point. This way the firewall doesn't need to be opened to each and every machine.
This may be a simple question but I have never done it before. Any recommendations?
Thanks in advance.
View 4 Replies
View Related
Feb 19, 2008
im having trouble getting this to work:
alter proc [ProGeneral_College_Structure] @Year nvarchar(4)
as
begin
DECLARE @SQLStatement nvarchar(1000)
Set @SQLStatement = 'SELECT School AS Level1Code, DIVISIONS.Div AS Level2Code,
DIVISIONS.ProgArea AS Level3Code, DIVISIONS.progName AS LevelName
, ' + SUBSTRING(@Year,1,2) + '/' + SUBSTRING(@Year,3,2) + ' AS AcademicYearID FROM DIVISIONS
WHERE (((DIVISIONS.[' + @Year + '])=1))
ORDER BY DIVISIONS.School, DIVISIONS.Div, DIVISIONS.ProgArea'
EXEC(@SQLStatement)
end
It's something to do with the / concatenation I think, is it an escape character or something tried // obviously and CHAR(47).
before I get comments I know it's dynamic sql and it's not great but I can't edit the divisions table so have to use a dynamic column.
View 11 Replies
View Related
Jul 20, 2005
When you restore a backup from a point in time, how do you then knowwhich transaction ID to start with when you want to roll forward fromthat point in time to another point in time?
View 1 Replies
View Related
Jan 12, 2007
I want to set a Report Parameter on a field. The Report Parameter is called 'filter'. In the statement I put the Report Parameter in the WHERE-part:
WHERE ([DatabaseName$TableName].[FieldName] = @filter). After this I set the 'Available values' on the Report Parameter in the lay-out to Non-queried.
When the report is running, no problems.
But.....
Now I want to set 'Available values' on 'From Query' and refer to the data set, so the user can choose on which value he want to filter. But now, after running the preview the following error displays:
Error 1 [rsInvalidReportParameterDependency] The report parameter €˜filter€™ has a DefaultValue or a ValidValue that depends on the report parameter €œfilter€?. Forward dependencies are not valid.
Why can't I set the Report Parameter to 'From Query'? Anyone any suggestions???
(you can see the rest of my statement here: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1098540&SiteID=1)
Thx a lot of helping me out with this topic.....
View 8 Replies
View Related
Jun 4, 2007
I am trying to get Event Forwarding to work between two SQL 2000 servers. Both are running SQL 2000 Enterprise SP4 and Windows 2003 Enterprise SP2. I am managing them from my local desktop running XP. I have both servers registered in Enterprise Mgr.
<Server XInstance Z> (named instance) is the server on which I have a MAPI client installed and configured along with SQL Operators and SQL Alerts. <Server Y> (default instance) is the server from which I want to forward events > Sev 17.
<Server XInstance Z> is set up to receive error msgs 9002 and 1105 and email operators that either a log is out of space or a data file is out of space. It has been verified on <Server XInstance Z> that it will send locally generated errors to the operators correctly.
<Server Y> is set to forward to <Server XInstance Z> any event that is sev 17 or greater. However, when I simulate an 1105 on <Server Y> I get this error msg in its Application Event log:
Event Type: Error
Event Source: SQLSERVERAGENT
Event Category: Alert Engine
Event ID: 316
Date: 6/4/2007
Time: 11:37:55 AM
User: N/A
Computer: <Server Y>
Description:
Unable to open the eventlog on forwarding server '<Server XInstance Z>' (reason: Sockets error 11004).
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
I figured this may be due to the fact that SQLAgent is trying to forward a Windows event to another Windows server running SQL but there is no default instance of SQL Server. So I thought I would add a bogus entry to my Enterprise Manager that was just <Server X> with no instance name. Obviously, EM failed to connect but asked if I wanted to register anyway. I chose Yes. So I was then able to change the server in Forward To on <Server Y> to <Server X>.
That actually worked and it began forwarding error messages to to <Server X>. But the error messages are going to the System error log as opposed to the Application error log where I need for them to go. This is the message from the System error log on <Server X>:
Event Type: Error
Event Source: MSSQLSERVER
Event Category: Disk
Event ID: 17052
Date: 6/4/2007
Time: 11:32:40 AM
User: N/A
Computer: <Server X>
Description:
The description for Event ID ( 17052 ) in Source ( MSSQLSERVER ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Error: 1105, Severity: 17, State: 2
Could not allocate space for object 'MyTestTable' in database 'Northwind' because the 'PRIMARY' filegroup is full..
Data:
0000: 51 04 00 00 11 00 00 00 Q.......
0008: 0c 00 00 00 43 00 48 00 ....C.H.
0010: 41 00 52 00 4c 00 45 00 A.R.L.E.
0018: 53 00 53 00 2d 00 58 00 S.S.-.X.
0020: 50 00 00 00 0a 00 00 00 P.......
0028: 48 00 4f 00 55 00 34 00 H.O.U.4.
0030: 51 00 31 00 31 00 30 00 Q.1.1.0.
0038: 35 00 00 00 5...
I'm stuck here now. Anyone else run into this problem?
View 1 Replies
View Related
Nov 14, 2014
I have a client that I provide financial modelling services to (using Excel). They have a requirement to start capturing subscriber movements in their SQL DB. how the table should be set-up and how to extract the necessary movements report. This is largely so that I may include these components in some of the financial models that I am working on.
Subscribers are reported as follows:
Opening subs (the prior periods closing balance; or the sum of new sales at point of 1st entry)
+ New Sales (new subs)
+ Upgrades (movement from a lower product package to the associated package)
- Downgrades (movement to a lower product package from the associated package)
- Churn (subscriber losses)
Closing Balance
All transactions are captured against a specific product package, on a specific date (ymd), and for an associated platform (e.g. digital TV, broadband TV, cable TV).
I believe we only need to capture new sales, upgrades, downgrades and churn. And then used a SP to compile the movements behaviour as described above.
So perhaps the table would appear as follows:
Platform
Package
Date
Movement
Value
DTV
PROD 1
2014-11-02
New Sales
8
DTV
PROD 1
2014-11-02
Upgrades
1
[code]....
So I am assuming that given a table such as the above, we could write a SP to produce an output such as (note, below looks at monthly total so will not agree back to sample above which contains only 2 days):
Platform
Package
Movement
September
October
November
DTV
PROD 1
OPEN
600
676
776
DTV
PROD 1
New Sales
92
106
88
[code]....
how one is best to accumulate the balances given that the open date for any given reporting period is in fact an accumulation of all balances since day 1.
How does one typically capture this type of thing in SQL?
View 4 Replies
View Related
Mar 23, 2014
I am working on a rewards program and I have a table whenever customer completes a trip, his total fare,business points earned for that particular trip and respective Promotional points gets inserted.
Now I have a scenario whenever customer business points accumulates to 10 then need to award 3 promotional points.
If Business Points=14 for a single trip then for the first 10 points respective Promo points will be awarded and the remaining 4 points should get carry forward for the next trip and this 4 points should get accumulated with the next trip Business Points and so on.
Basically need to check for every 10 Business points accumulated award some Promo points and carry forward remaining points.
Here is the sample table structure and data :
CREATE TABLE [dbo].[tblRedeems]
(
[Mobileno] [varchar](50) NOT NULL,
[TripNo] [int] NOT NULL,
[CustomerName] [varchar](50) NULL,
[TripEndTime] DATETIME NOT NULL,
[Code] .....
View 5 Replies
View Related
Oct 2, 2014
A fast_forward cursor is read only by definition, meaning the rows can't be updated, but I'm not sure if they are insensitive or not. Do they reflect the changes in the database after the cursor is opened?
View 6 Replies
View Related
Jan 24, 2007
Hi,
I am using the AutoFetch Option with Fast Forward Cursors with SQLOLEDB to access SQL Server 2005. This really works out but for the first I execute the query only.
But as I use parameterized statements, when I re-use the cursor, just re-binding new variables and re-executing it again, the AutoFetch does not work any more.
I noticed that thru the SQL Server Profiler. I see a sp_cursorfetch been called at the second time the cursor is re-executed.
Does anyone know how to work it out?
Thanks in advance.
Marcelo.
View 3 Replies
View Related
Feb 17, 2014
1. Created a database with a couple of tables with no data.
2. Taken a full database backup - db.bak.
3. Deleted the database.
4. Restored the database db.bak and filled the tables with some data.
5. Taken log backup - dblog.trn
BACKUP LOG <dbname> to DISK='D:Demodblog.trn' WITH NO_TRUNCATE, INIT
6. Dropped the database again.
7. Restored the database again from db.bak.
8. But when I am trying to restore log file dblog.trn on this database, i keep getting this error :
The log or differential backup cannot be restored because no files are ready to rollforward.
Msg 3013, Level 16, State 1, Line 2 RESTORE LOG is terminating abnormally.
View 2 Replies
View Related
Mar 28, 2007
Hi!
I have setup a database mirroring session without witness - ServerA is the principal, ServerB is the mirror,. Each SQL Server instance is hosted on its own machine on sql2005 EE SP2. The mirroring is working correctly. If I submit to server ServerA command:
ALTER DATABASE MYDBNAME SET PARTNER FAILOVER
, ServerB becomes the principal, it means that mirroring works correctly.
My issue is with the SQL Native Client and a front-end ASP application (actually IIS 6.0 site) that needs to make use of this database. I have setup my front-end application to use SQL Native Client and specified the failover server in connection string. Here is the connection string that I am using :
PROVIDER=SQLNCLI.1;Server=ServerA,1433;Failover Partner=ServerB,1433;Database=MYDBNAME;Network=dbmssocn;Integrated Security=SSPI;
Everything works perfectly on my front-end application when ServerA is the principal. If I execute on server ServerA command:
ALTER DATABASE MYDBNAME SET PARTNER FAILOVER
, ServerB becomes the principal, and the failover occurs correctly on the database side. The problem is that my front-end application is not able to query the database on ServerB. The error appears:
Microsoft SQL Native Client error '80004005'
Cannot open database "MYDBNAME" requested by the login. The login failed.
This behavior my appication till I unload IIS 6.0 pool application. After that my front-end application becomes work correctly with ServerB.
When I swap server, I execute on server ServerB command:
ALTER DATABASE MYDBNAME SET PARTNER FAILOVER,
my IIS 6.0 application automaticly turn back to ServerA without any action on my side.
I am using SQL Native Client last version http://download.microsoft.com/download/2/7/c/27c60d49-6dbe-423e-9a9e-1c873f269484/sqlncli.msi (issued in February 2007). Has anyone experienced this issue? I'm thinking that it's a problem in the SQL Native client
View 10 Replies
View Related
Oct 30, 2015
I missed the ability to restore based on a time (10/23 6pm) due to our purge cycle in our production environment, but I was able to obtain the 10/18 full backup, the 10/23 differential backup, and the 4, 10/23 trans. log backups. I moved all the fore mentioned files to a staging environment, and now I am trying to restore all of the files to 10/23 6pm and I get :
"The log or differential backup cannot be restored because no files are ready to rollforward" error.
View 3 Replies
View Related
Apr 3, 2008
Hey all,
1) I have a report with many parameters that I want users to be able to pick from. Allow them to pick 1, many or all to build their report dynamically. I'm all set on the TSQL side, but on the Reporting Services side I have to allow each parameter to be null with a default of NULL. In by doing this, the report will auto run, which I do not want to happen. The only resolution I've found thus far was by adding a parameter that does nothing, with a NULL default value. Yet It sticks out like a sore thumb on the report and I want to get rid of it. If I check in "Hidden" in the parameter options, my report errors out stating that the parameter requires a value.
2) Is it possible to have a parameter that has available values from a dataset have a NULL checkbox like those of parameters that do not have available values?
3) Is it possible to add back/forward buttons inside of a report instead of just at the report header by default?
Thanks!
View 8 Replies
View Related
Aug 14, 2007
Is it possible to make the execution of one job dependent on the successful execution of a previous job?
View 2 Replies
View Related
Nov 24, 2006
Hello, I have caching enabled in my application and I am using SqlCacheDependency to cache my tables. Well, the cache works fine but when the table is updated the information in my cache does not update. I DO have the broker service started and running but not sure what else i am missing. I am using sql server 2005.
View 1 Replies
View Related
May 31, 2007
Hello all.. i'm having a major issue with my Sql Express 2005 database :(
I'm using wicked code sitemap to allows for a sitemap to be stored in a database.. it uses sql cache dependency to invalidated the cache bla bla
Problem:
After i update a record / add new record the database generates a SqlQueryNotificationStoredProcedure
But it never gets executed. I've done tests on the code it's calling everything accordingly so i'm assuming the problem lies in a configuration setting of the database
done alot of searching around the net and i've found this
GRANT SUBSCRIBE QUERY NOTIFICATIONS TO username
i'm using Windows Authentication how do i run this and will this solve the problem
Thank you in advance
Chris
View 3 Replies
View Related
Feb 8, 2008
I'm working off of the example shown here:
http://www.c-sharpcorner.com/UploadFile/mosessaur/sqlcachedependency01292006135138PM/sqlcachedependency.aspx?ArticleID=3caa7d32-dce0-44dc-8769-77f8448e76bc
The tutorial shows that an entry must be made in web.config for a sqlCacheDependency node in web.config. When a dependency is added, they set an attributed called "connectionStringName" that references a connectionString established earlier in the web.config. My question is twofold:
1). First, I tried setting up my connection string using the connectionStrings node (my other apps use the AppSettings node), but when I try to extract the value in my code using the following syntax:
connStr = Convert.ToString(System.Configuration.ConfigurationManager.ConnectionStrings["devConnStr"].ConnectionString);
I get the following compilation error: "ConfigurationManager does not exist in the class or namespace System.Configuration";
Am I extracting it with the wrong code? Does that setup exists in .NET v 1.4? No, I cannot use .NET v 2.0 for various reasons.
2). If I cannot use ConnectionStrings in that way and must use AppSettings, how do I set up SqlCacheDependency node to recognize that connection string?
View 1 Replies
View Related
Dec 29, 2000
Hi,
I've problem in replicating data thru SNAPSHOT as I've the tables with Foreign Keys at subscriber end. The Truncate table is not working because these tables
were referenced by a FK. Even for recreating table during snapshot is also same problem. Any suggestions?
Thanks
TT
View 1 Replies
View Related
Jul 23, 2005
I am under the impression that either there are deficiencies in the way SQLServer 2000 is keeping track of depedencies or perhaps the dependenciessimply need to be re-evaulated / recompiled.What is the best and/or easiest way to ensure that the dependency info isaccurate?Is there a way to tell MSSQL to rebuild/reexamine them all?Thanks in advance to the MVPs and other generous and knowledgable posterswho have helped me recently.Chad
View 2 Replies
View Related
May 25, 2007
Hello ,
We have a Windows Service running on 30 server that is using SQLDependency on 10 different tables to recieve data change notifications. We have noticed that when a data change occurs not all 30 servers recieve the notification. Any help that you can provide to troubleshoot this issue would be greatly appereciated.
raina
View 4 Replies
View Related
Nov 29, 2006
Hi,
I've got a Decision Tree model and I'm trying to browse the dependency network. Apparently, there are too many nodes and they don't all show up in the view. I know that I can find hidden nodes, but is there a way to show all w/o having to add them one by one to view? How does the UI determine which ones to filter out?
Thanks,
Mike
View 1 Replies
View Related
Nov 9, 2007
Hello everybody,
It's now quite some time that one particular behaviour of SSIS is really frustrating me and I would like to know if I'm the only one experiencing this problem or if other people have the same problem.
The issue I'm talking about is SSIS 'dependency on what is written in the XML files describing the flows.
Particularly with the Data Types of columns.
I'm explaining myself: Imagine your are developping a flow containing several numeric(18,0) columns...
During the flow you have to perform a lookup on an Integer Field.... Of course this operation is not allowed as a numeric is not mappable with an Integer... (This is, in my opinion, a nonsense as an implicit conversion has to be possible).
as a result of this behaviour, I decide to change the datatype (numeric) from my source query to an integer and use it in the Lookup which of course succeeds but now I have a second problem: each lookup in my flow has an error handling branch which I'm joining back using a Union transform. and there we have the second irritation: the Union transform doesn't replicate the Data Type changes that occured upwards in the flow... worse: it even has no interface to let you modify the data types like the advanced editor of some transforms or data sources. (I've just lost a complete dataflow while trying to modify it manually in the xml file directly :-( for those who are considering modifying directly the XML, don't!! You are asking for trouble and a lot of frustration when you'll switch back to the designer to see the effects )
My question is now: Am I misusing SSIS?? Is there somewhere an option to activate in order to get this behaviour fixed??
Has anyone else experienced this problem?? How are you solving this??
Are there any plans in the future to loose this dependency on the datatypes or at least add some implicit conversions??
Thanks in advance for your replies, suggestions,questions and other thaughts about this subject :-)
Alain
View 14 Replies
View Related
Dec 21, 2006
I have been trying to run the DependencyAnalyzer and it does not seem to be working correctly. The most that I can get it to do is just list the packages. I am trying to use it against packages that are stored as files and not in SQLServer. Has anyone had any luck with this executable? I don't know if it is because I don't have the full Visual Studio's installed on my machine. When I try to open the project, the DependencyAnalyzer and DependencyViewer are showing some errors. But I was able to run the msbuild to generate an executable with the path that is listed in the readme.txt file. Maybe, it is compiling ok but it is lacking the proper references.
View 18 Replies
View Related
Dec 5, 2007
--The Dependency row is not created!
-- I have a procedure "Example 1".
-- When I look at the sys.sql_dependencies I didn't find a row with Table1 dependency.
--If I write the procedure like "Example 2" the dependency Table1 exists in sys.sql_dependencies.
--
--DEFENENTLY A BUG. CAN YOU FIX IT?
--I REALLY NEED IT!!!!!!
Create table Table1 (id int);
GO
--Example 1
CREATE procedure a
as
create table #Test(id int)
Insert into #test
Select id from Table1
DROP TABLE #test;
GO
Select * from sys.sql_dependencies where object_id=object_id('a');
GO
--Example 2
CREATE procedure c
as
Select id into #test from Table1
DROP TABLE #test;
GO
Select * from sys.sql_dependencies where object_id=object_id('c');
DROP PROCEDURE c
DROP PROCEDURE a
DROP TABLE Table1
View 1 Replies
View Related
Nov 9, 2006
Hi All,
when i do a right click on a Table and go to View Dependencies, I get the option of viewing both objects that depend on this table and vice versa, but this has to be hierachial right?
Like if there are three tables A,B,C and A is dependent on B and B is dependent on C,
I am able to see only from A to B, the relation from B to C is not coming. Am I wrong? Can someone correct me on the option of view dependency?
Thanks
View 4 Replies
View Related
Feb 16, 2007
Hi everyone,
Can anyone let meknow how do i enable a service broker. I am trying to enable a service broker for an issuetracker application to get change of events in my database. When ever i try enabling it using the ALTER DATABASE [ databse] set Enable_Broker. it takes abt more that 2 hrs or more but doesnt show as enabled.
Thanks in Advance,
Pawan Venugopal
View 2 Replies
View Related