SCD's implemention using T-SQL version 2005 (with out merge)
Business logic:
--we are quarterly updating data on table with respective of cus_ID’s
--for your info, in a quarter Cus_ID transaction >80, then cus_ID is valid (pass)..in EXCEL extract date is nothing but every quarter starting date.
Need to implement below logic:
Quarter 1:
1. Loaded 3 records in to the table in first quarter (1/1/2015), here cus_id(21) failed due to less transactions
Quarter 2:
We are again reran the data on the table. cus_id(21) passed so here we want to maintain old record history (21 failed and also 21 passed)and new inserted record. As well as have to update old record To_date (new record from date -1 day)
Same thing applied for quarter 3 and quarter 4
for your reference,
Thanks & Regards,
Are you using BIDS? Or just T_SQL? If the former, use the SCD transformation, if the latter, please post:
1. CREATE TABLE statements so we can see the schema of your tables
2. INSERT INTO statements with sample data to populate the tables from step 1.
3. THe query you have at the moment, so we can see where you work is at.
4. the desired results, using a complete, correct query
Similar Messages
-
How to enable high availability on SQL Server 2005 with Windows Server 2008 Enterprise R2
Dear Folks,
I would like to ask you about this thing. I'm working for IT department for bank in Myanmar. Our bank have up to 96 branches across all of Myanmar including H.O. We are using Microsoft SQL Server 2005 with Windows Server 2008 for our banking
information system. My main problem is having to backup and restore the database backup files every time the servers in branches goes down for whatever reasons. I want to deploy this feature of high availability and failover cluster using Windows Server 2008
and SQL Server 2005. Our branches have 2 Servers. One is for Primary and other is for Backup. What I want to do is that, I want to change Backup Server to Primary Server whenever the Primary Server goes down for whatever reasons. All the working data and databases
from Primary will immediately replicated into Backup Server along with all the IP information of Primary Server. Please give me step by step guide for this process.Try below
http://blogs.msdn.com/b/cindygross/archive/2009/10/23/checklist-for-installing-sql-server-2005-as-a-clustered-instance.aspx
I will recommend you to upgrade SQL server to newer version for support as well as flexibility.
Regards,
Vishal Patel
Blog: http://vspatel.co.uk
Site: http://lehrity.com -
I want to use Golden Gate to connect MS SQL Server 2005 with Oracle 10g dat
I want to use Golden Gate to connect MS SQL Server 2005 with Oracle 10g database. So, i have installed both databases on different pc's on windows platform. MS SQL Server 2005 on windows XP and Oracle 10g on windows 2003.
I have configure Golden Gate step by step by following oracle guideline:
http://www.oracle.com/technetwork/articles/datawarehouse/oracle-sqlserver-goldengate-460262.html
When i run following command on target (oracle 10g):
replicat paramfile dirprm/inload.prm
I encounterd following error:
2012-05-21 20:27:06 ERROR OGG-00014 Unrecognized parameter: USERID. Paramete
r could be misspelled or unsupported.
2012-05-21 20:27:06 ERROR OGG-01668 PROCESS ABENDING.
My INLOAD FILE Content are:
SPECIALRUN
END RUNTIME
USERID gg_user, PASSWORD welcome1
EXTFILE D:\oracle\gg\dirdat\ex
SOURCEDEFS D:\oracle\gg\dirdef\emp.def
MAP hrschema.emp, TARGET gg_user.emp;
Can you plz suggest me that where i am wrong?
Thanks advance to all experts.amardeep.sidhu wrote:
That should work, just in case try adding DBLOGIN before USERID
DBLOGIN USERID x..No needed in the param file i think.its not needed at all you are right, but what else could it be? Besides any special unseen character :P -
Anybody using MS SQL Server 2005 as dehydration store?
anybody using MS SQL Server 2005 as dehydration store?
Please give me a reply.
I am facing lot of issues with this.
Thanks
V Kumar
Edited by: user640551 on Oct 15, 2008 3:58 AM
Edited by: user640551 on Oct 16, 2008 2:38 AM
Edited by: user640551 on Oct 16, 2008 8:07 AMI have raised an SR. I have provided them with error code,screen shots and log files.
They are suggesting me to do a fresh install of SOA. But I feel that is not the correct solution.
Now I can do that as i have only two processes running on the server.
Imagine If I have lof of processes running on the server. moreover I can't do it every time when i face this kind of errors on the PROD server.
Anyway thanks for your suggestion.
How long you have been working with oracle SOA suite?
Thanks
V Kumar -
Windows Authentication using Microsoft SQL Server 2005 JDBC Driver
Hi,
I am using Microsoft SQL Server 2005 JDBC Driver to connect to SQL Server 2000 database, can anyone tell me the connection URL for windows authentication. SQL authentication is working fine.
DataDirect has drivers for windows authentication but I am not using it.
Regards
ArupYou can't do it with the Microsoft driver. There's a free driver called jTDS that may be able to (I don't know).
(edit) Looking at their FAQ it looks like it does:
http://jtds.sourceforge.net/faq.html -
I am unable to view the full content of various web sites after purchasing Advanced System Care Pro. I was using the free version before with no problems. I cannot figure out if or which setting was changed. I tried doing a system restore but that did not work. I tried turning off all features of ASC pro but that did not work. Javascript is enabled. Please help.
BrianMany thanks.
With those symptoms, I'd try the following document:
Apple software on Windows: May see performance issues and blank iTunes Store
(If there's a SpeedBit LSP showing up in Autoruns, it's usually best to just uninstall your SpeedBit Video Accelerator.) -
Using Planned order Change BAPI with out changing date
Hi
I have a planned order with start date in future.
With in a program, I want to call the planned order using the FM BAPI_PLANNEDORDER_CHANGE to re-explode the order BOM.
I find that only if I change the order start date to system/current date, the planned order BOM gets updated/re-exploded. Else there is no change in the order BOM.
My requirement is to re-explode the BOM with out changing the order dates. In the function module I am maintaining "X' against BOM_EXP_FIX_IND.
But when I do it manually using MD12 and explode BOM with out changing the future start date, the order BOM gets updated.
Please help on this. Or is there any other FM/BAPI for this purpose.Dear Pradeep,
you could try to set DET_SCHEDULE = X with out
FIRMING_IND --> No
BOM_EXP_FIX_IND --> No
Let me Know if it modification setting have solved your problem and i have useful for you,
Daniele -
Features No longer used from Sql Server 2005 to 2008 R2
As part of our Migration process from 2005 to 2008 R2, which Specific features should i be taking into consideration in Upgrade to Sql Server 2008 R2 in prespective of T-Sql queries already written in 2005 and need to be changed to 2008 r2 compatibility.Thanks!
SrikanthAccording to the Link, SET ROWCOUNT function has to be replaced with TOP keyword , but SET ROWCOUNT is still used in SQL Server 2008 R2 and its later versions according to microsoft :
http://msdn.microsoft.com/en-us/library/ms188774.aspx
Can anyone help me in this regard.Thanks!
If you read further below there is a note mentioned as
Using SET ROWCOUNT will not affect DELETE, INSERT, and UPDATE statements in a future release of SQL Server. Avoid using SET ROWCOUNT with DELETE, INSERT, and UPDATE statements in new development work, and plan to modify applications that currently use it.
For a similar behavior, use the TOP syntax. For more information, see TOP (Transact-SQL).
MS cannot remove it completely knowing to fact that we are Lazy and will not immediately change our code :)
Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it.
My TechNet Wiki Articles -
CONNECT SQL SERVER 2005 WITH Oracle 10.2.0.3
Hi,
I used URL http://www.databasejournal.com/features/oracle/article.php/10893_3442661_2 but its not working.
I was reading note# 561033.1 adn planning to try.
If any one done ,please let me know.user587327 wrote:
its not working" is pretty vague. How about if you tell us
1) What version of Oracle rdbms you are working with (ok, I see 10.2.0.3 in subject .. good)
2) what OS it is running on (obviously SQL Server is on Windoze, but that doesn't mean that's where Oracle is) : Linux RHEL 4.4 64 bit
3) what you are trying to do (get an Oracle database to retrieve data from SQL Server? vice versa? something else?):
Connect to Oracle database and retrieve data from SQL SERVER 2005.So, you want the Oracle DB to act as a client to the SQL Server db?
>
4) what error code (ora-nnnnn or tns-00000) you are getting
Showing
SQL> desc spt_values@MYSQL
ERROR:
ORA-28545: error diagnosed by Net8 when connecting to an agent
Unable to retrieve text of NETWORK/NCR message 65535
ORA-02063: preceding 2 lines from MYSQL
----I've never used HSO to SQL Server, so I'm getting out of my area here. However ...
I'm puzzled by the error msg referencing "Net8". Looks like an Oracle 8i construct but you said your db is 10.2. And since the box is Linux I wouldn't expect to find an old 8i installation lurking on it.
I searched MetaLink (should be everyone's first resource when trying to understand an error message) for "ora-28545" and got 13 hits.
>
5) any other diagnostic messages you might have -
SQL Server 2005 with an ODBC-JDBC Bridge
Hello,
I use an ODBC - JDBC Bridge (because when I use SQL Server 2005 Driver JDBC Version 1.1, the text connection failed). I don't know why I can't reverse my model.
What happened?
thanks
BillieWe have also a SQL server 2000 instance at the same server. Yesterday I have spoken with the sql server admin and he told me that he has disconnect the sql server 2000 databases whatever this means. :-D
Now all works fine. Thank you for your help
BTW I use the following connection string:
jdbc:sqlserver://my_db_server;instanceName=my_instance_name;DatabaseName=my_db_name -
Selecting from a SQL Server 2005 with long column names ( 30 chars)
Hi,
I was able to set up a db link from Oracle 11.2.0.1 to SQL Server 2005 using DG4ODBC.
My problem is that some column names in the Sql Server are longer than 30 chars and trying to select them gives me the ORA-00972: identifier is too long error.
If I omit these columns the select succeeds.
I know I can create a view in the sql server and query it instead of the original table, but I was wondering if there's a way to overcome it with sql.
My select looks like this:
select "good_column_name" from sometable@sqlserver_dblink -- this works
select "good_column_name","very_long_column_name>30 chars" from sometable@sqlserver_dblink -- ORA-00972ThanksI tried creating a view with shorter column names but selecting from the view still returns an error.
create view v_Boards as (select [9650_BoardId] as BoardId, [9651_BoardType] as BoardType, [9652_HardwareVendor] as
HardwareVendor, [9653_BoardVersion] as BoardVersion, [9654_BoardName] as BoardName, [9655_BoardDescription] as BoardDescription,
[9656_SlotNumber] as SlotNumber, [9670_SegmentId] as SegmentId, [MasterID] as MasterID, [9657_BoardHostName] as BoardHostName,
[9658_BoardManagementUsername] as BoardManagementUsername, [9659_BoardManagementPassword] as BoardManagementPassword,
[9660_BoardManagementVirtualAddress] as BoardManagementVirtualAddress, [9661_BoardManagementTelnetLoginPrompt] as
MANAGEMENTTELNETLOGINPROMPT, [9662_BoardManagementTelnetPasswordPrompt] as MANAGEMENTTELNETPASSPROMPT,
[9663_BoardManagementTelnetCommandPrompt] as MANAGEMENTTELNETCOMMANDPROMPT FROM Boards)performing a select * from this view in sqlserver works and show the short column names
this is the error i'm getting for performing a select * from v_boards@sqlserver_dblink
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[Microsoft][SQL Native Client][SQL Server]Invalid column name 'BoardManagementTelnetLoginProm'. {42S22,NativeErr = 207}[Microsoft]
[SQL Native Client][SQL Server]Invalid column name 'BoardManagementTelnetPasswordP'. {42S22,NativeErr = 207}[Microsoft][SQL Native
Client][SQL Server]Invalid column name 'BoardManagementTelnetCommandPr'. {42S22,NativeErr = 207}[Microsoft][SQL Native Client][SQL
Server]Statement(s) could not be prepared. {42000,NativeErr = 8180}
ORA-02063: preceding 2 lines from sqlserver_dblinkI also tried replacing the * with specific column names but it fails on the columns that have a long name (it doesn't recognize the short names from the view)
what am I doing wrong?
Edited by: Pyrocks on Dec 22, 2010 3:58 PM -
Integrating SQL Server 2005 with OBIEE 11g
Dear Gurus,
Is there any documentation about how to using SQL Server 2005 as datasource combined with OBIEE 11g?
Clear steps with pictures will be very helpful.
Thank so much
Regards
JOEHi,
Please refer this link.
http://rnm1978.wordpress.com/2009/08/21/querying-sql-server-from-obiee-running-on-unix/
Re: How to connect Linux OBIEE repository to SQL Server 2005 database
Hope this help's
THanks
Satya -
Using MS Sql Server 2000 with Flex 2
help! - I'm trying to understand how I could use Flex 2 (with
the Flex Data Services) using MS SQL Server 2000 as my RDMS.
Currently using SS with ASP. Basically, what do I need in
terms of server set up (e.g. do I need to install the J2EE Server
for instance?). How about using transaction based storedprocedures
with flex.
I'm having difficulty finding a clear answer (for me anyway!)
to my question. I have even phoned Adobe last Thursday to ask them
- and their expert was not around and they said would call me
back... hmm.Hi Michael,
At this time SQL Server 2000 is not certified for WLCS 3.5. Since the
schema has changed between 3.2 and 3.5, running the 3.2 scripts is not a
good idea.
I can tell you that certification is in progress for SQL Server 2000. Your
best bet is to contact your Sales Representative to get an idea of when
certification might be coming.
I hope this helps.
- Ginny
"Michael Schulz" <[email protected]> wrote in message
news:[email protected]..
I'm using WebLogic 6.0sp1 with Commerce Server 3.5 and I've successfully
installed the demo. I would like to create another commerce server
installation, this time using Microsoft SQL Server 2000 as the database
instead of Cloudscape. I've downloaded and installed the BEA jDriver
for MS SQL 7/2000 and tested it using dbping. My question is: where are
the db scripts for creating and populating the commerce database? I've
found the WLCS_320_DB_DDL_1.1.zip file on the BEA downloads site, but
I'm concerned that this schema is for Version 3.20 of Commerce Server.
Is there a similar file for WLCS 3.50? If not, is it safe to use this
one?
If this is posted in the wrong place, please let me know and I'll repost
to the appropriate newsgroup as required.
Sincerely,
Michael Schulz -
JDBC - MS SQL Server 2005 with multible instances
I want to get data from a Microsoft SQL Server via JDBC. We have such a scenario and till now it works fine. Now we have a second instance at the sql server and we want to connect to this instance. I've found the following MSD article:
http://msdn2.microsoft.com/en-us/library/ms378428.aspx
<b>SQL Server 2000 and SQL Server 2005 allow for the installation of multiple database instances per server. Each instance is identified by a specific name. To connect to a named instance of SQL Server, you can either specify the port number of the named instance (preferred), or you can specify the instance name as a JDBC URL property or a datasource property. If no instance name or port number property is specified, a connection to the default instance is created. See the following examples:
To use a port number, do the following:
jdbc:sqlserver://localhost:1433;integratedSecurity=true;<more properties as required>;
To use a JDBC URL property, do the following:
jdbc:sqlserver://localhost;instanceName=instance1;integratedSecurity=true;<more properties as required>;</b>
Because the named instance has no explicit port I've tried to use the second one but this doesn't work. I've tried all possible combinations of these parameters but either I get an error or my adapter connects to the first instance
Any idea how I can connect to the second named instance?We have also a SQL server 2000 instance at the same server. Yesterday I have spoken with the sql server admin and he told me that he has disconnect the sql server 2000 databases whatever this means. :-D
Now all works fine. Thank you for your help
BTW I use the following connection string:
jdbc:sqlserver://my_db_server;instanceName=my_instance_name;DatabaseName=my_db_name -
How to implement poor-man's version control with TSQL queries
I have a table called Project. Each row completely describes a project and has a username, project name, project description and other numeric parameters that contain all the data about the project.
When multiple rows have the same username, this means a user owns multiple projects.
Now I want to implement a poor-man's version control for my users by adding a new integer column called version. When a user wants to save a new version of his project, the version is incremented and a new row is inserted into the table.
Some projects will have 1 version, others will have a dozen or more.
By default, the user should see a data grid of projects where only the latest version of the project is displayed (including the version count) and all the older versions of each project are ignored.
How do I write a TSQL query to populate this data grid (and ignore every version except the latest versions of each project)?
Thanks
Siegfried
siegfried heintzeShould this work? It prints all the rows.
DECLARE @Projects TABLE
([id] int IDENTITY(1,1), [Project] varchar(1), [Version] int)
INSERT INTO @Projects
([Project], [Version])
VALUES
('A', 1),
('A', 2),
('A', 3),
('A', 4),
('B', 1),
('B', 2),
('B', 3),
('C', 1),
('C', 2),
('D', 1)
-- DECLARE @User varchar(100)
SELECT *
FROM @Projects p
WHERE
-- UserName = @User AND
NOT EXISTS (SELECT 1
FROM @Projects q
WHERE q.id = p.id
AND q.Version < p.Version)
siegfried heintze
Nope you have condition wrong
In my suggestion i've used > and you replaced it with <
it should be this
SELECT *
FROM @Projects p
WHERE
NOT EXISTS (SELECT 1
FROM @Projects q
WHERE q.project= p.projects
AND q.Version > p.Version)
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs
Maybe you are looking for
-
How to delete the error message in the Web page Message Monitoring
Hi All: I'd like to ask a question.If there is error message in the T-code sxmb_moni->Monitor for Processed XML Messages,I can cancel the error message manually and archive the message. After that,I can delete the message from "Monitor for Processed
-
Can someone tell me how to get the "App. store" Icon back on my original Ipad running IOS 4.3.3 ?
-
Dashboard dicitonary in Mountain Lion does not work. I have tried trashing the Dashboard prefs and restarting but it still doesn't work. GH
-
Where are the data from note notes saved in a backup
Hi, making a backup saved all my data. But is I renamed the macbook the backup cannot re-create it. The backup where made either under snow leopard and MLion. Thus I do have to do this manually. So where can I find the saved data from the note notes
-
link to download and install cs3