Showing posts with label specific. Show all posts
Showing posts with label specific. Show all posts

Thursday, March 22, 2012

Data search

I use SQL server to connect to a HUGE odbc compliant db with 1000's of tables. The db contains tons of data. I am looking for specific data elements. Is there any way to search the entire db for a data value?

Thanks Marcie

I'm sorry, I'm not sure I understand the question. Do you mean besides using standard SQL?sql

Data Retrieval

How does SQL handle data retrieval from a specific record? I want to be able
to capture 100 records from any given point in a table by sending a single
column value as a starting point.
So if I have a table with primary_key with values 1-1000 and I want to get
1-100 I can use TOP 100. If I then want 101 - 200, 201 - 300, etc, how can I
get the set(s)?
Can this be done?
Thank you,
AnthonyUse WHERE clause.
declare @.i int, @.j int
set @.i = 201
set @.j = 300
...
where pk_col between @.i and @.j;
AMB
"Anthony W DiGrigoli" wrote:

> How does SQL handle data retrieval from a specific record? I want to be ab
le
> to capture 100 records from any given point in a table by sending a single
> column value as a starting point.
> So if I have a table with primary_key with values 1-1000 and I want to get
> 1-100 I can use TOP 100. If I then want 101 - 200, 201 - 300, etc, how can
I
> get the set(s)?
> Can this be done?
> Thank you,
> Anthony

Monday, March 19, 2012

Data outside parameter field

Can any body help me that how to get data (opening balance) of an account in report wich showing data in between specific dates. The opening balance will be the values before the parameter fields.Use Sub report to show the Opening Balance. So create a sub report without using parameters, just show the opening balance and dont link the sub report and main report.

In the sub report created a formula, "sub_op"

WhilePrintingRecords;
Shared x As Number
x = Opening Balance

and in the main report create a formula, "main_op"

WhilePrintingRecords;
Shared x as number

Use this formula in the main report to show Opening Balance. Important thing is place the subreport in the header before using the main_op formula, so that subreports gets executed first and will show the Opening Balance value in the main report.|||But if I want to get opening balance for a specific date then I have to pass a parameter for that.

So, if the I could not insert the subreport at header then what could be the solution.

Thankyou|||First I agree with khs_shankar that a subreport for the OpeningBalance is the way to go.

If you want to select date(s) for OpeningBalance independent from the the main report parameter field, then create parameter field(s) in both main & subreport, say Op_date1 (& Op-date2?). In your subreport, use these dates as a filter. Link the main & subreport by these Op_ parameter fields so you can pass the values.

If the Opening Balance are for the dates prior to your main parameter field, like a cut off date to show previous balance & details afterwards, then you can create a parameter field in your subreport, say Op-date. Link the parameter field in the main report with the Op-date field in the subreport. Use this Op_date field as a filter in the subreport.

Hope this help.|||I want to alter my question here.

The Opening balance must be of the current month and les then by the date which is selected by user.

Because I have tried "thg's" logic but when I want to link parameter main report with the Op_date of sub report, it does not show the op_date field in link combo.

Help in this regard.

Sunday, March 11, 2012

data modifications log

Is there any way to configure SQl in the way
that automatically keep a log of any modification done
into the the data on a specific data table?
fredy,
The way this is usually managed is via triggers. You would create a trigger
on whatever table (or tables) you need audited that will insert the rows
from the 'deleted' table (within the trigger) into a history table (with the
same columns as the base table, usually along with a datetime column for the
date of the modification, etc.) Then you can use the history table to
report on data changes.
"fredy" <anonymous@.discussions.microsoft.com> wrote in message
news:0a8301c4a7d4$c7018f10$a501280a@.phx.gbl...
> Is there any way to configure SQl in the way
> that automatically keep a log of any modification done
> into the the data on a specific data table?
>

Wednesday, March 7, 2012

data mining

How can I mine data through SQL Server and can further save specific values to database ?Use Analysis Services to create models based on your SQL Database using BI Development Studio, then you can use Integration Services to put prediction results from the models back into a SQL database. You can also call Analysis Services directly using an OPENQUERY/OPENROWSET call from SQL in an INSERT INTO as well.|||If you decide to use the OPENQUERY/OPENROWSET approach , you can find some details at: http://www.sqlserverdatamining.com/DMCommunity/TipsNTricks/3914.aspx

Saturday, February 25, 2012

Data Migration :- SQL Server1 - SQL Server2

Hi,
I have 2 similar sql server databases DB1 and DB2 with around 450 tables and much data. My problem is I need to copy specific records from all tables in DB1 to corresponding tables in DB2. What I have done right now is, running seperate INSERT scripts for each table like

INSERT INTO DB2..table1 SELECT * from DB1..table1 where code='XX'

I would like to know whether this is the right approach or any other better way or tool available to do so. Also since the no of records are very high, I insert it in blocks say 30,000 records each, so that log file limit will not create problem.

Thanks in advance. Please help

I would use integration Service for a job like this. I nice easy way to start this is to rightclick the database -> tasks ->export data and follow the wizard.

The outcome from this will be an integration service packagde that following can be edited in SQL Server Business Intelligence Development Studio as a normal Integration service object.

Take a look into the toturials in there. They helped me a lot.

see also this http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=631236&SiteID=1

|||

other alternatives could be

define views and bcp the data out from DB1 and in to DB2

copy the database files (they should not be accessible) and attach them as DB2

Integration Services and use the Database Copy Task

Regards

Norbert

|||

you can use snapshot replication with row filter