Ye Olde GUI Display/sychronization Problem...

Jul 23, 2005

I feel like the answer to this should be blinding obvious. I also
feel like it's probably an exercise in an undergraduate database
design course. I'm off to google for an answer, but I figure I'd
throw it out here to see if there's a quick and dirty solution.

I have in my database a table of every position we have here called
Holdings. It would be equivalent to an Inventory table in every
basic design course.

There are many users who could update that table, and also many users
whose display programs wish to have correct values. Here's what
I currently do:

There's a timestamp column in that file. My display apps keep track
of what the max timestamp value they've seen is. Every time they
want to do a sweep of the database, they go and "get everything
that's newer than timestamp X", update their quantities, and display.

Now, the procedure "get everything newer than timestamp X" is where
my question lies.....

It requires (of course) a scan of the entire Holdings table, since
having an index on a timestamp field would be (I think) suicidal.
There's got to be a better way to do that.

I've played around with another solution, which is to have a trigger
on Holdings for insert/update, and in that trigger, I save into
another table the PK of the Holdings which change. That "updated"
table also has an identity field, which is the PK of "updated".

Then, instead of keeping track of the max timestamp and scanning
the Holdings table, I keep track of the max identity in "updated",
and just grab the new rows from there, which are usually only a few
(and are easy to find using the PK clustered index), and then grab
individual rows from Holdings using the stored PK.

As I said in the intro, I feel this should be a completely solved
problem. I have a "correct" solution, but I'm just wondering what
the "correct, and most efficient" solution is.

Thanks,

Eric.

View 15 Replies


ADVERTISEMENT

Sychronization Error - MSSQL_REPL22037

Jun 2, 2006

we have a oracle replication to mssql2k5 with push transactional replication.

We had massive transactions in oracle and encounter spacing error
ORA-01652: unable to extend temp segment by 12137 in tablespace SYSTEM
Batch processing is in progress. The current batch consists of 17356 commands and 0 transactions. The last transaction was 0x000000000000000070f5, '0x000000000000000070f5'.

And I found many locking in replication process in oracle side and I stopped the replication is mssql2005 but no much help until kill session in oracle.

After massive rollback jobs in oracle and seems return normal in oracle publisher. I tried to re-initial the sychronization with a new snapshot.
After the snapshot created, the monitor stated that 'the initial snapshot for publication 'JHBHK-batch' is not yet available.'
The replication agent has not logged a progress message in 10 minutes. This might indicate an unresponsive agent or high system activity. Verify that records are being replicated to the destination and that connections to the Subscriber, Publisher, and Distributor are still active.


Any idea? Thanks in advance!

View 4 Replies View Related

Oracle ,Sqlserver Table Sychronization

Jun 3, 2008

Hi All,



I am Currently doveloping a Asp.Net application.

I Need to Use two databases one is Sql server and another one is Oracle.



My Primary database is Sqlserver . But I need to get data from two tables from the oracle database also.



I would like to create the same table in Sqlserver and Update data from oracle (synchronize) automaticaly .



Is there any way to syhcronize these table to get the uptodate data.

What is the best solution to solve this situation.



Please show me example code.



By sqlserver way or .Net way

Please Help me .

Thanks you

M.S

View 2 Replies View Related

Reporting Services :: Display Columns When There Is No Data To Display

Apr 30, 2015

I would like to display a portion of report where there is data or no data

There is data subreport  display   

     Product Name Latex Gloves  
     Product ID      
xxxx5678

 There NO data in the subReport
 
  Product Name                          
   Product ID    

View 3 Replies View Related

How To Display This?

Dec 7, 1999

I have a table with the following structure and data

SampleTable

id name parent_id
1 Microsoft 0
2 Visual Studio 1
3 J++ 2
4 VB 2
5 C++ 2

As you can see, a record with parent_id=0 is the top level. Other levels will have a parent. I want to display the above data as below

1 Microsoft
2 Microsoft - Visual Studio
3 Microsoft - Visual Studio - J++
4 Microsoft - Visual Studio - VB
5 Microsoft - Visual Studio - C++

I tried many times with the select statement but with no luck. Do you have any ideas? Thanks,

View 1 Replies View Related

Display Another Value

Dec 5, 2011

i have a column name "Principle" and the data in this column is a dollar value. How do i write a query where when the dollar amount is <0 it displays as - and when its >0, it displays as +

View 1 Replies View Related

How Do I Display The Day Name Instead Of The Day #

Apr 6, 2004

Hi,

I created a Time Dimension and ended up with the following (as shown in the attached image). The problem is that when I go to the Day level, I see numbers e.g. 1, 2, ..., 31. Instead I want to display the Weekday Name e.g. Monday, Tueday and so on (i.e. what we get with the datename(dw,<date>) function. Right?)

However I am not sure what to change and where in order to get the desired results. Can someone kindly guide me.

Thanks.

View 2 Replies View Related

How To Display..

Apr 21, 2008

Hi,

I need to show the value of a variable with comma seperated.

For eg: I have a variable N whose value is 123456.89
I need to display it as 1,23,456.89
How i can i display this...
Please help me

Thanks in advance

View 20 Replies View Related

How To Display?

Sep 18, 2007

Hi,

I have the following stored procedure

CREATE PROCEDURE dbo.test(
@number varchar(128) output
)

as
select @number = * from fix_lvts..fix_exec_reports
where gw_instance like '%PORTWARE%'
return 0


Then I go in and execute it like this:

declare @number varchar(128)
exec dbo.test @number output
select @number

I get the following result:


T_PORTWARE_GBL

(Only one row returns).


However when I execute the sql statement below:

select gw_instance from fix_lvts..fix_exec_reports
where gw_instance like '%PORTWARE%'

which is the same one as in the stored procedure except the variable declaration it reurns me the following:

gw_instance
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL

(99028 rows of data)


Why is this hapenning?

Can anyone help me?

Thanks and Regards,
Sudip

View 2 Replies View Related

How To Display

Mar 12, 2008

Hi,

My table "Branch" contain a Field name as MassMail
it contains mail IDs a@yahoo.com;b@yahoo.com;c@yahoo.com;d@yahoo.com;e@yahoo.com

Now plz write me what is the SQL Statement for Retiveing MassMail
except one or Two Mail ID
Example : Retrive
a@yahoo.com;b@yahoo.com;d@yahoo.com;e@yahoo.com

Here c@yahoo.com is not Include

Thanks

Thanks

View 2 Replies View Related

How To Display??

Sep 18, 2007



Hi,

I have the following stored procedure

CREATE PROCEDURE dbo.test(
@number varchar(128) output
)

as
select @number = gw_instance from fix_lvts..fix_exec_reports
where gw_instance like '%PORTWARE%'
return 0


Then I go in and execute it like this:

declare @number varchar(128)
exec dbo.test @number output
select @number

I get the following result:


T_PORTWARE_GBL

(Only one row returns).


However when I execute the sql statement below:

select gw_instance from fix_lvts..fix_exec_reports
where gw_instance like '%PORTWARE%'

which is the same one as in the stored procedure except the variable declaration it reurns me the following:

gw_instance
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL
T_PORTWARE_GBL

(99028 rows of data)


Why is this hapenning?

Can anyone help me?

Thanks and Regards,
Sudip

View 2 Replies View Related

How Do I Display A Count?

Mar 15, 2007

I want to display the number of records for each state in a database.  I'm using a strongly types dataset.  In my method, I have the followingSELECT     COUNT(ID) AS iTotal, STATEFROM         membersWHERE     (Suspend = 0)GROUP BY STATEORDER BY STATEIn the code behind of my page I have          Dim mateAdapter As New WAPTableAdapters.membersTableAdapter        Dim mates As WAP.membersDataTable        Dim mate As WAP.membersRow        mates = mateAdapter.GetDataState        For Each mate In mates            Select Case mate.STATE                Case "AK"                    LabelAK.Text = mate.ID.            End Select        Next  What should LabelAK.Text = mate.ID. be for me to be able to display the number of records that have 'AK' in the state field?Diane 

View 7 Replies View Related

How To Display Error

Dec 16, 2007

 Hai,         My condition of the program is to check whether the username is available or not. If it is available, I should insert that username into the db, if not I should display "Username already exists". I've written SP for the condition, but I dunno how to display the error message in asp.net. I've my codings below: DB - SP:alter procedure insert_user@username varchar(20)asif exists(select username from test where username=@username)print 'Username already exists'elseinsert into test(username) values(@username) Default.aspx.cs:  protected void Button1_Click(object sender, EventArgs e)
{
SqlConnection insertconn = new SqlConnection("Server=achuthakrishnan;Initial Catalog=classifieds;Integrated Security=SSPI");
SqlCommand insertcmd = new SqlCommand("insert_user", insertconn);
insertconn.Open();
insertcmd.CommandType = CommandType.StoredProcedure;
insertcmd.Parameters.AddWithValue("username",TextBox1.Text);
SqlDataReader dr;
dr=cmd.ExecuteReader();
insertconn.close();
}  What is the condition I should check after SqlDataReader dr? Or else, I believe I should use @@error to display error messages in asp.net. I googled a lot and couldn't find the exact solution. Can any one help me? 

View 9 Replies View Related

Display ROW As A COLUMN

Mar 15, 2008

I am JOINing a Table with a View, and the View can have multiple rows relating to the join condition(i.e. My view as 4 columns, and can look like the following:
A  B C D
A E F G
B H I J
I want this to look like -
A B C D E F G
B H I J
I want one row, but not one column, I need to maintain each value in its own column, withinin a single row. 
Doesn't matter to me if that transition happens in my View or as the outcome of my Join.
I've been looking at the PIVOT command, but that appears to only work with an aggrgrate function. I don't want to calculate/aggreagte anything, just combine my multiple rows in one.  
This is my VIEW stmt -
SELECT     [PKG ID] AS PKG_ID, [APPR GRP NAME], [USRID OF APPR], [APPR STATUS]FROM         dbo.pkgapproversWHERE     ([APPR STATUS] = 'approved') AND ([APPR GRP TYPE] = 'E')
This is my Join stmt - set @sql = N'SELECT DISTINCT [PKG ID] AS PKG_ID, [ELM ACT] AS Action, [END EXEC DATE] AS "Exec Date", [COMMENT] AS Comment, [USRID OF APPR]
FROM [PkgAction]
FULL JOIN vw_PkgApprovals
ON PkgAction.[PKG ID] = vw_PkgApprovals.[PKG_ID]
WHERE 1=1'
 
Any thoughts....Thanks
 

View 7 Replies View Related

Display Of SqlDataSource

Mar 5, 2006

 I'm trying to follow along with lesson07 Web Development Express series and when I drag the SqlDataSource tool onto my form I do not see the object on the screen.  I therefore can not configure it until I have placed GridView object onto my form. I hope you can help me in how to view the SqlDataSource or inform me where I can get further information

View 2 Replies View Related

Display Of Images

Jan 22, 2001

I want to publish Images in an asp-web-page. How can I do that?

View 1 Replies View Related

Isql Display

Aug 9, 2000

Hi,
When I execute a script by using isql, it displays the number of statement executed. can anybody tell me how to turn this off (no display)?
Thanks,

Mark

View 1 Replies View Related

Display Each Of The Record

Jul 25, 2005

I want to know how to display only each of it where in my database for example the ProductItem got a lot of value of '1000' in it. i only want it to display once.

ProductItem | Name
1000 | ABC
1000 | DEF
1000 | HIJ
2000 | KLM
3000 | NOP

I want in my dropdownlistbox only display 1000, 2000, 3000.
I using the 'Select ProductItem from Product' for sure it will display 1000,1000,1000,2000,3000. So to filter it.

Thanks

View 7 Replies View Related

Display Any Database On The Web

Mar 6, 2006

Hello. I've been searching for a couple of hours online and can't quite seem to find what I'm looking for. I've found plenty of database administration programs, but that's not what I need.

I'm looking for a program (or online service or whatever) that has the ability to basically take any database I choose and display the information within on a web page in which others can access. Such as, if my company wants to take on a few other company's databases and have them log in to our server through the web to display information from their (and only their) database dynamically on the web, then this program allows me to set all of that up. Information could be formatted in tables, charts, etc., whatever the program is capable of. Is there such a thing and where can I find more information?

Thanks for everyone's help. :-)

View 14 Replies View Related

Display Top 5 Salesman

Mar 31, 2008

Just a straight forward question: In the SQL SVR 2000 Northwind database, how do I display the top 5 salesman? I would like to display the salesmen and the total amount of their sales to date. I have this as a starting point:

SELECT Employees.Country, Employees.LastName, Employees.FirstName, Orders.ShippedDate, Orders.OrderID, "Order Subtotals".Subtotal AS SaleAmount
FROM Employees INNER JOIN
(Orders INNER JOIN "Order Subtotals" ON Orders.OrderID = "Order Subtotals".OrderID)
ON Employees.EmployeeID = Orders.EmployeeID
WHERE Orders.ShippedDate Between '19970101' And '20051231'

It displays all the sales between the dates, I just need to work something that will total up the sales for each employee then list the top 5.

Thanx

View 4 Replies View Related

How To Display Blank?

May 4, 2004

Hello, everyone:

By default, SQL Server display "NULL" if there is no data value. How to display blank instead of "NULL"? Thanks a lot.

ZYT

View 3 Replies View Related

How To Display The Relationships?

May 11, 2004

Hello, everyone:

I have attached a new database from customer, and wanted to check the existing relationships. How to display these relationships? Thanks.

ZYT

View 2 Replies View Related

Display Record Of The Day

May 22, 2008

Hi Guys,

How do I display an item in a day? This is a featured product of the day. This will change everyday. I can do this in classic ASP but not in stored procedure.

Table:
This is just to give you an idea of the table
ID | ProductName | DatePosted
----------------------------------------
1 | item1 | 5/1/2008
2 | item2 | 1/2/2008
3 | item3 | 6/2/2007

and so on...

Can someone please help me?

Thanks in advanced.

View 12 Replies View Related

Month Display

Jun 5, 2008

This my procedure

DECLARE @Months table
(MonthName varchar(20)

)

INSERT INTO @Months
SELECT 'Jan' UNION ALL SELECT 'Feb' UNION ALL SELECT 'Mar' UNION ALL SELECT 'Apr' UNION ALL
SELECT 'May' UNION ALL SELECT 'Jun' UNION ALL SELECT 'Jul' UNION ALL SELECT 'Aug' UNION ALL
SELECT 'Sep' UNION ALL SELECT 'Oct' UNION ALL SELECT 'Nov' UNION ALL SELECT 'Dec'


SELECT m.MonthName,ISNULL(CallOutCharge,0) As 'CallOutCharge'
FROM @Months m
LEFT JOIN (SELECT Sum(FT.CallOutCharge) AS 'CallOutCharge', Convert(CHAR(3), CC.CompletedDate,109) As 'Month', month(CC.CompletedDate) As 'intMonth', Year(CC.CompletedDate) As 'Year' FROM HSSPMS_Tbl_Callcentre_Compliants AS CC
INNER JOIN HSSPMS_Tbl_LandLordFulltimeEmployee AS FT ON FT.ContractorCode = CC.ContractorCode And CC.FaultCleared='1'
WHERE FT.CreatedBy=@OwnerId AND FT.IsDelete='0' And Year(CC.CompletedDate)=@Year Group BY CC.CompletedDate)t
ON t.month=m.MonthName

This my Result

MonthName CallOutCharge intMonth
-------------------- ------------- -----------
Jan 0 NULL
Feb 0 NULL
Mar 0 NULL
Apr 0 NULL
May 767 5
Jun 0 NULL
Jul 0 NULL
Aug 0 NULL
Sep 0 NULL
Oct 0 NULL
Nov 0 NULL
Dec 0 NULL


But i need to display


MonthName CallOutCharge intMonth
-------------------- ------------- -----------
Jan 0 1
Feb 0 2
Mar 0 3
Apr 0 4
May 767 5
Jun 0 6
Jul 0 7
Aug 0 8
Sep 0 9
Oct 0 10
Nov 0 11
Dec 0 12


Any one help me

Regards,
Prabu R

View 2 Replies View Related

How To Display Qty 1 Time

Jan 7, 2015

I have a temp table that I would like to only display the Qty of 4 one time

The total Qty is 4

Part Fac Loc Lot Qty
===== === === === ===
8793 07 FG 111 4
8793 07 FG 122 4
8793 07 FG 113 4
8793 07 FG 144 4

I want to display Qty 4 so when I do a sum I do not get qTY 16

Part Fac Loc Lot Qty
===== === === === ===
8793 07 FG 111 4
8793 07 FG 122 0
8793 07 FG 113 0
8793 07 FG 144 0

View 2 Replies View Related

DATE DISPLAY

Apr 23, 2006

I have the following code
<html>
<head>
<title>Eye Contact - Century to Century</title>
<link rel="stylesheet" href="eye01.css" type="text/css" />
</head>
<body>
<form name ="" method = "post" action="">
<table width="100%" border="1" height ="85%">
<tr height = "15%">
<th>Date</th>
<th>Year Left</th>
<th>City Origin</th>
<th>Country Origin</th>
<th>Year Arrived</th>
<th>City Arrived</th>
<th>State Arrived</th>
<th>Filename</th></tr>


<?php
$db = mysql_connect("localhost","root","");
if (!$db)
{
print "error - Could not connect to MySQL";
exit;
}

$er = mysql_select_db("touch_art1");
if(!$er)
{
print "error - Could not select the database";
exit;
}

extract($_POST);

$query = "SELECT date, yr_left, city_origin, country_origin, yr_arrival, city_arrival, state_arrival, filename FROM story WHERE country_origin = '$search_country' AND pamapproved = 'Y' ORDER BY yr_left";
$result = mysql_query($query);

if($result)
{
while($column = mysql_fetch_object($result))
{
print "<tr align ='center'>";
foreach($column as $colval)
{
print "<td>$colval</td>";
}
print "</tr>";
}
}
else
{
print "Error on Query";
exit;
}

mysql_free_result($result);

mysql_close();
?>

<input type="hidden" name="" value="none">
</table><table height = "15%" width = "100%" border = "0">
<tr height="100%">
<td align="left" valign="top" width="50%" >
<embed src="images/home.svg" width="100%" height="100%" wmode="transparent" type="image/svg+xml" />
</td>
<td align="right" valign="top" width="50%" >
<embed src="images/back.svg" width="100%" height="100%" wmode="transparent" type="image/svg+xml" />
</td>
</tr>
</table>
</form>
</body>
</html>

I need to display the date as in MM-DD-YYYY. Can anyone help?

View 3 Replies View Related

Display Date

Nov 30, 2007

How would I display just the date in the dataset if I have the data with date and time like this 2007-05-02 07:14:48.000
I want to truncate/or something to the time and just display the date. How would I change my query.

SELECT usr_end_date,date_exp,usr_last_name, usr_first_name, usr_login,employeeid, displayname
FROM [OIM_FIX].[dbo].[OIM_USR] a, CORP_EMP_IDs b
WHERE USR_login = CAST(b.employeeid AS varchar)and
usr_end_date <> date_exp

currently it is returning the full date and time like this
2007-05-02 07:14:48.000
I want just the date like this 2007-05-02

I am using sql server 2005

Thanks,
Maachie

View 4 Replies View Related

Date Display

Jul 23, 2005

I have a table in SQL Server 2000 with have date/time columns anddisplays the dates as : 1900-01-01 00:00:00.000 which is fine, but whenI select the column through dreamweaver for an asp page to date isshortened to 1900-01-01 but I need to see the whole date / time fieldfor conversion purposes.Can anyone help ?Thanks in advance.

View 2 Replies View Related

SQL: How To Display Top 5 Then Sum The Rest

Apr 6, 2006

Hello,I would like to query the top 5 best companies' sales (total sales),then total the rest, what is the quickest and effective SQL to queryit?Thanks in advance

View 8 Replies View Related

Subquery And Display Help

Feb 22, 2007

HiI need to produce an excel output from SQL that showsemail - company name - producttype1, producttype2 (where the - denotesa change in column)basically i have a table the first line is the fields and the secondand third are the entriesemail - companyname - producttypeJoin Bytes! - xx - Product1Join Bytes! - xx - Product2


Quote:

View 2 Replies View Related

COUNT Many But Display Just Once?

Apr 23, 2007

Hi, I have a table that I insert a member's country into every timesomeone signs up. What I'd like to do is pull information from the DBsuch that I can see each country and the number of users from each.For example:Argentina 10Brazil 5Canada 3I'm having trouble writing the SQL for this...any suggestions?Thanks,Erik

View 2 Replies View Related

Display In PageHeader

Jul 24, 2007

Hi,

i got one problem. I want to show my username in pageHeader.when i drag and drop my value from dataset to pageheader its giving some error.

in Body its working.but i want show only in page header that username.



can any body help me.



kiran

View 4 Replies View Related

Display DB Table In ASP

Aug 21, 2007

hello forum friends,

i need to display the database table in ASP
page.how it is possible,can anyone explain me
with code.

Regards
Prathap

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved