How can i compare two rows
hi all,
In my report there is a table with 3 rows. I have to put a direction image at 4th row based on the difference of 2nd and 3rd row.
can anyone help me?
Thanks in advance.
Hi Tanjima,
In what way you want ot compute the difference between the 2nd and 3rd rows of data?
It would be of great helps if you paste the report data here and Explain what you want in your rows?
You can't refer indivisual cell or individual row in WEBI everything you want to do you have to do it using column references.
Thanks..
Pratik
Similar Messages
-
How can I compare two summary field in cross-tab?
<p>Dear expert:</p><p>I have one question for how can I compare two summary field in cross-tab? I have following cross-table:</p><p>Type Sector1 Sector2 Sector3 Total </p><p>Outlook 10 11 9 30 </p><p>Target 5 3 1 9</p><p>I want to compare the summary field(total) relationship percent, I want to get "9/30". Someone told me I must create the DB view or table via SQL, then can implete in Crystal Report. Can I implete it in Crystal Report via fomula or other function?</p><p>Thanks so much for your warm-hearted help!</p><p>Steven</p>
Hello Steven, yes you can compare summary fields, If you are comparing Summary to Target, or vice versa - you can do it within Crystal Reports.
1. In Suppress conditional formula, create 2 Global variables: CurrentOutlook and CurrentTarger and get the current value.
2. In Display String formula for Total show ToText(CurrentTarget/CurrentOUtlook) + "%".
For more difficult cases of compariing fields in cross--tab, you may look into http://www.relasoft.net/KB10001.html.
Best,
Alexander -
How can i compare two databases and their tables
i have a text.txt file then
i will insert it into db_header and db_details
db_header has tbl_pcountheader with fld_Rack_No(char) PK and fld_DateAdded(date) PK
db_details has tbl_pcountdetails with fld_Rack_No(char) PK, fld_Barcode(char) PK and fld_Quantity(int)
then i will lookup in db_products
db_products has tbl_products and tbl_barcodes
tbl_products has fld_ItemCode
tbl_barcodes has fld_Barcode and fld_ItemCode
now i want to make a prompt contains
Rack No: Date:
Counter No:
Barcode | Item Code | Item Description | Quantity
how can i fill up this by comparing db_details and db_products?
Private Sub bt_upload_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bt_upload.Click
If saveCheckBox.Checked = False Then
MsgBox("Please click the box to continue.")
Return
End If
If lb_file.SelectedItem Is Nothing Then
MessageBox.Show("Please select a file.")
Exit Sub
End If
' Obtain the file path from the list box selection.
Dim filePath = lb_file.SelectedItem.ToString
' Verify that the file was not removed since the Browse button was clicked.
If System.IO.File.Exists(filePath) = False Then
MessageBox.Show("File Not Found: " & filePath)
Exit Sub
End If
' Obtain file information in a string.
Dim fileInfoText As String = GetTextForOutput(filePath)
'LookUP db_header, db_details and db_products
Dim cs As String = "Database=;Data Source=localhost;" _
& "User Id=root;Password=1234"
Dim conn As New MySqlConnection(cs)
Dim ds As New DataSet
Dim da As New MySqlDataAdapter
Dim cmd As New MySqlCommand
Dim dt As New DataTable
Dim stm As String = "SELECT tbl_pcountheader.fld_Rack_No, tbl_pcountheader.fld_DateAdded, tbl_pcountdetails.fld_Barcode, tbl_products.fld_ItemCode, tbl_products.fld_ItemDesc, tbl_pcountdetails.fld_Quantity FROM db_header.tbl_pcountheader INNER JOIN db_details.tbl_pcountdetails ON db_details.tbl_pcountdetails.fld_Rack_No = db_header.tbl_pcountheader.fld_Rack_No INNER JOIN db_products.tbl_barcodes ON db_details.tbl_pcountdetails.fld_Barcode = db_products.tbl_barcodes.fld_Barcode INNER JOIN db_products.tbl_products ON db_products.tbl_barcodes.fld_ItemCode_fk = db_products.tbl_products.fld_ItemCode GROUP BY tbl_pcountheader.fld_Rack_No, tbl_pcountheader.fld_DateAdded ORDER BY tbl_pcountheader.fld_Rack_No"
ds = New DataSet
Try
conn.Open()
da = New MySqlDataAdapter(stm, conn)
da.Fill(ds, "tbl_pcountheader")
DataGridView1.DataSource = ds.Tables("tbl_pcountheader")
Dim headers = (From header As DataGridViewColumn In DataGridView1.Columns.Cast(Of DataGridViewColumn)() _
Select header.HeaderText).ToArray
Dim rows = From row As DataGridViewRow In DataGridView1.Rows.Cast(Of DataGridViewRow)() _
Where Not row.IsNewRow _
Select Array.ConvertAll(row.Cells.Cast(Of DataGridViewCell).ToArray, Function(c) If(c.Value IsNot Nothing, c.Value.ToString, ""))
Using sw As New IO.StreamWriter("c:\report.txt", append:=True)
sw.WriteLine(String.Join(",", headers))
For Each r In rows
sw.WriteLine(String.Join(",", r))
Next
End Using
ds.WriteXmlSchema("Sample.xml")
Dim cr As New CrystalReport1()
cr.SetDataSource(ds)
CrystalReportviewer1.ReportSource = cr
CrystalReportviewer1.Refresh()
Catch ex As MySqlException
MsgBox("Error: " & ex.ToString())
Finally
conn.Close()
End Try
' Show the file information.
Dim PrintPrompt As String
PrintPrompt = MsgBox(fileInfoText, MsgBoxStyle.YesNo, "ProofList")
If PrintPrompt = vbYes Then
'fileInfoText.print()
If saveCheckBox.Checked = True Then
' Place the log file in the same folder as the examined file.
Dim bakFolder As String = System.IO.Path.GetDirectoryName(filePath)
Dim bakFilePath = System.IO.Path.Combine(bakFolder, "back-up.bak")
Dim bakText As String = "Backed-Up: " & Date.Now.ToString & vbCrLf & fileInfoText & vbCrLf & vbCrLf
' Append text to the log file.
'System.IO.File.AppendAllText(bakFilePath, bakText)
My.Computer.FileSystem.WriteAllText(bakFilePath, bakText, append:=True)
'My.Computer.Network.UploadFile(bakFilePath, "C:\Documents and Settings\SAPC-TECH\My Documents\back-up file.bak", "", "", False, 1000)
'My.Computer.FileSystem.DeleteFile(bakFilePath)
'Form2.Show()
End If
'Note: This message box shows that you've uploaded a file and back up it.
MessageBox.Show("Already backed-up to ")
Else
'Me.Close()
'Application.Exit()
'End
End If
'Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
'Form2.Close()
'Me.Close()
End Sub
here's my final code that solves my problem.
i just make the environment of vb into mysql console
so that i can call all the database that i wanted.Private Sub bt_upload_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bt_upload.Click
If saveCheckBox.Checked = False Then
MsgBox("Please click the box to continue.")
Return
End If
If lb_file.SelectedItem Is Nothing Then
MessageBox.Show("Please select a file.")
Exit Sub
End If
' Obtain the file path from the list box selection.
Dim filePath = lb_file.SelectedItem.ToString
' Verify that the file was not removed since the Browse button was clicked.
If System.IO.File.Exists(filePath) = False Then
MessageBox.Show("File Not Found: " & filePath)
Exit Sub
End If
' Obtain file information in a string.
Dim fileInfoText As String = GetTextForOutput(filePath)
'LookUP comparison db_details to db_products
'Dim connString As String = "Database=db_products;Data Source=localhost;" & "User Id=root;Password=1234"
'Dim conn As New MySqlConnection(connString)
'Dim cmd As New MySqlCommand()
'Try
' conn.Open()
' cmd.Connection = conn
' cmd.CommandText = "SELECT Database1.dbo.TableName.ColumnName, Database2TableName.Name, 'The reason why Database 2 isnt defined is the fact that it has been defined in the connection" _
' FROM Database2TableName INNER JOIN _
' Database2TableName2 INNER JOIN _
' WHERE (Database1.dbo.TableName.ColumnName = '')"
' cmd.Prepare()
' cmd.ExecuteNonQuery()
' conn.Close()
'Catch ex As Exception
'End Try
' Show the file information.
Dim PrintPrompt As String
PrintPrompt = MsgBox(fileInfoText, MsgBoxStyle.YesNo, "ProofList")
If PrintPrompt = vbYes Then
'fileInfoText.print()
If saveCheckBox.Checked = True Then
' Place the log file in the same folder as the examined file.
Dim bakFolder As String = System.IO.Path.GetDirectoryName(filePath)
Dim bakFilePath = System.IO.Path.Combine(bakFolder, "back-up.bak")
Dim bakText As String = "Backed-Up: " & Date.Now.ToString & vbCrLf & fileInfoText & vbCrLf & vbCrLf
' Append text to the log file.
'System.IO.File.AppendAllText(bakFilePath, bakText)
My.Computer.FileSystem.WriteAllText(bakFilePath, bakText, append:=True)
'My.Computer.Network.UploadFile(bakFilePath, "C:\Documents and Settings\SAPC-TECH\My Documents\back-up file.bak", "", "", False, 1000)
'My.Computer.FileSystem.DeleteFile(bakFilePath)
Form2.Show()
End If
'Note: This message box shows that you've uploaded a file and back up it.
MessageBox.Show("Already backed-up to ")
Else
Me.Close()
Application.Exit()
End
End If
Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
Form2.Close()
Me.Close()
End Sub
here's my code wherein i have to compare the two database and save it into .txt file
i just have to get this items
Rack No:
Date:
Counter No:
Barcode:
Item Code:
Item Description:
Quantity:
as a prooflist to be print out. -
How can I compare two periods in a report based on parameters
Hi all,
I'm wondering how can I create a matrix report which compares the sales of two periods. These periods are variable and coming from the parameter section that the user is using. For example, I have got the following table "Sales". Columns are:
ID (not visible in report, can be used to lookup)
Country
Customer
Year
Quarter
Month
Gross sales
The output that I would like to get is the following
Parameter period 1: 2013 Q1
Parameter period 2: 2013 Q3
The report should look something like this:
2013 Q1
2013 Q3
USA Microsoft 50000 75000
So in the third column you'll see the sales based on parameter period 1, and the fourth column shows the sales based on parameter period 2.
Thanks for the help!Just to be sure I understand...
You have 1 primary dataset that returns records that will be displayed in a tablix in your report. The data will include sales information records from various years, quarters, etc. You want your report user to be able to select 2 sets of data for comparison
based on quarter. Is this correct?
To do this, start by adding a Matrix to the report. Set the Column Group to group on the expression:
=CStr(Fields!Year.Value)+" "+Fields!Quarter.Value
Set this same formula as the group header. Now Set the existing Row Group to group on Customer. Add a parent group above this Row Group and group on Country. In the detail cell set the value to:
=Sum(Fields!GrossSales.Value)
You will also need to access the tablix properties and set a filter as follows:
Expression: =CStr(Fields!Year.Value)+" "+Fields!Quarter.Value
Operator: In
Value: @Quarters
For this filter to work, you will need to create the @Quarters parameter as follows:
On General tab:
Name - Quarters
Prompt - Select Quarters to Compare
Data type - Text
Allow multiple values - Checked
Visible - Selected
Available Values:
Get values from query - Selected
Dataset - dsQuarters
Value field - YearQuarter
Label field - YearQuarter
Default Values:
No default value - Selected
Advanced: Leave at default settings
For the parameter to work you need to create the dsQuarters dataset. This dataset needs to return a single column of distinct values for Year + " " + Quarter based on the same query that you use for your primary dataset. Add the distinct keyword (if using
TSql) or equivelent and eliminate all of the unnecessary columns. Set it to return Year + " " + Quarter AS YearQuarter.
Let me know if you have questions or if I missed something.
"You will find a fortune, though it will not be the one you seek." -
Blind Seer, O Brother Where Art Thou
Please Mark posts as answers or helpful so that others may find the fortune they seek. -
How can I compare two collections at the same time? (View two grid views)
I have two collections containing some of the same images. (My Nikon D70 did not put an end-of-file on some images. I recovered them into a different collection.) Now I want to display both collections side-by-side in grid view. I will select those images in the "recovered" collection that correspond to the bad images in the "main" collection, add the ratings etc, and move just these to another collection.
It is extremely frustrating to have to bounce back and forth between collections, remembering each image one by one and selecting it in the "recovered" collection. (The image names are not preserved in the "recovered" collection -- I have to go by what the image looks like.)
LightRoom allows me to compare photos in the compare view. I want to compare collections in two grid views.CaptureTheLight,
you have ran into a situation when you have to compare two sets of images and now you're wondering how come Lightroom doesn't have such "obviously necessary" functionality? But you have to admit it, this is not such a common situation in a photographer's workflow recovers broken files and tries to compare them against themselves. I think it's a pretty specific feature you need. Still, Lightroom has enough powerful tools for editing and sorting images.
For example...
You could just put them all - "main" and "recovered" - into a single collection or into the Quick Collection. Label the entire "recovered" collection with, say, red and sort by capture time. Now you'll have everything side by side, ordered chronologically. The "recovered" images will stay next to the "main" images since their capture time will be the same, and they will also stand out since they have the red label.
Make the thumbnails bigger and set up the grid view so it tints the thumbnail cell are tinted with the label color. Now, you can go quickly through them visually checking labeled vs unlabeled. -
How can i compare two color images in vision builder for AI?
What i want to do is to compare two images. I have a base color image that represents the desired colors and tones. I have another image to be compared to the base image. What i want to do is to compare this two images to know how close they are regarding contents of color and tones. In other words, i want to know how close is image 2 to image 1 (base sample)....
I would like to know how to get the content of certain colors in an image and then compare this values with the same values from another image.
For example..i have two sheets of paper that contain various mixed colors...i want to know the amount of green, red an blue in each image and then comapre this values.
What i want to do is to compare difer
ent samples of fabrics. this fabrics must be of a specified color...but due to the process they may vary in tone or even color...so i want to compare this fabrics to a amster sample to see how close they are in color and tone..
Anything would help since i dont have experience in this type of comparisons...thanksVBAI allows you to work with grayscale images only. You can acquire an image, use the vision assistant to convert it grayscale by extracting the luminance plane (or any of the other color planes) and then analyze the resulting grayscale image. To do what you are talking about, though, it would really be better to get Vision for labview. You could then take color images, compare color plains, use statistical functions to determine average color values, and so on.
-
How can i compare two excel files with different no. of records.
Hi
I am on to a small project that involves us to compare two excel files. i am able to do it but am struck up at a point. When i compare 2 different .csv files with different no. of lines i am only able to compare upto a point till when the number of lines is same in both the files.
Eg. if source file has 8 lines and target file has 12 lines. The difference is displayed only till 8 lines and the remaining 4 lines in source lines are not shown.
Can you help me in displaying those extra 4 lines in source file. I am attaching my code snippet below..
while (((strLine = br.readLine()) != null) && ((strLine1 = br1.readLine())) != null)
String delims = "[;,\t,,,|]";
String[] tokens = strLine.split(delims);
String[] tokens1 = strLine1.split(delims);
if (tokens.length > tokens1.length)
for (int i = 0; i < tokens.length; i++) {
try {
if (!tokens.equals(tokens1[i])) {
System.out.println(tokens[i] + "<----->" + tokens1[i]);
out.write(sno + " \t" + lineNo1 + " \t\t" + tokens[i] + "\t\t\t\t" + tokens1[i]);
out.println();
sno++;
} catch (Exception exception)
out.write(sno + " \t" + lineNo1 + " \t\t" + tokens[i] + "\t\t\t\t" + "");
out.println();
Thanks & RegardsA CSV file is not an Excel file.
But apart from that your logic makes no sense.
If the 2 files are of different sizes the files are different by definition, so further comparison isn't needed, you're done.
If you want to compare individual records, you need to compare all records from one file with all records from the other, unless the order of records is important in which case your current system might work.
That system however is overly complicated for comparing CSV files.
As you assume a single record per line, and if one can assume those records to have identical layout (so no leading or trailing whitespace in or between columns in one file that's not in the other) comparing records is simply a matter of comparing the entire lines. -
How can i compare two XML files storeds in a LONG column
Hi,
I need to compare two xml files. My xmls are stored in two table like this:
Table 1
ID_COL number(5);
XML1 LONG()
Table 2
ID_COL number(5);
XML2 LONG()
I need compare the values of the tags of this xmls files e to list de differences.
Tks,
Fernando.yes odie you are right...i think that my xml is wrong...
I would like to compare every element/attribute...
Bellow is another xml...this is ok....tks
<?xml version="1.0" encoding="UTF-8" ?>
- <nfeProc xmlns="http://www.portalfiscal.inf.br/nfe" versao="2.00">
- <NFe xmlns="http://www.portalfiscal.inf.br/nfe">
- <infNFe Id="NFe31121059106377000172550010003957681605366269" versao="2.00">
+ <ide>
<cUF>31</cUF>
<cNF>60536626</cNF>
<natOp>VDAS PROD ESTABELECIMENT</natOp>
<indPag>1</indPag>
<mod>55</mod>
<serie>1</serie>
<nNF>395768</nNF>
<dEmi>2012-10-03</dEmi>
<dSaiEnt>2012-10-03</dSaiEnt>
<hSaiEnt>18:30:00</hSaiEnt>
<tpNF>1</tpNF>
<cMunFG>3159605</cMunFG>
<tpImp>1</tpImp>
<tpEmis>1</tpEmis>
<cDV>9</cDV>
<tpAmb>1</tpAmb>
<finNFe>1</finNFe>
<procEmi>0</procEmi>
<verProc>1.0</verProc>
</ide>
+ <emit>
<CNPJ>59106377000172</CNPJ>
<xNome>METAGAL IND E COM LTDA</xNome>
<xFant>METAGAL INDUSTRIA E COMERCIO LTDA</xFant>
- <enderEmit>
<xLgr>ROD BR 459</xLgr>
<nro>333</nro>
<xCpl>KM 121</xCpl>
<xBairro>DISTRITO INDUSTRIAL</xBairro>
<cMun>3159605</cMun>
<xMun>SANTA RITA DO SAPUCAI</xMun>
<UF>MG</UF>
<CEP>37540000</CEP>
<cPais>1058</cPais>
<xPais>BRASIL</xPais>
<fone>3534719100</fone>
</enderEmit>
<IE>5969141300009</IE>
<IM>01183</IM>
<CNAE>2949299</CNAE>
<CRT>3</CRT>
</emit>
+ <dest>
<CNPJ>59275792000150</CNPJ>
<xNome>GENERAL MOTORS DO BRASIL LTDA</xNome>
- <enderDest>
<xLgr>AV GOIAS</xLgr>
<nro>1805</nro>
<xBairro>BARCELONA</xBairro>
<cMun>3548807</cMun>
<xMun>SAO CAETANO DO SUL</xMun>
<UF>SP</UF>
<CEP>09501970</CEP>
<cPais>1058</cPais>
<xPais>BRASIL</xPais>
</enderDest>
<IE>636003724112</IE>
<email>[email protected]</email>
</dest>
- <det nItem="1">
+ <prod>
<cProd>XM20C9500PPR</cProd>
<cEAN />
<xProd>ESPELHO RETROVISOR EXTERNO</xProd>
<NCM>70091000</NCM>
<CFOP>6501</CFOP>
<uCom>PC</uCom>
<qCom>80.0000</qCom>
<vUnCom>35.8700000000</vUnCom>
<vProd>2869.60</vProd>
<cEANTrib />
<uTrib>PC</uTrib>
<qTrib>80.0000</qTrib>
<vUnTrib>35.8700000000</vUnTrib>
<indTot>1</indTot>
<xPed>XRW001RV</xPed>
<nItemPed>000001</nItemPed>
</prod>
- <imposto>
- <ICMS>
- <ICMS00>
<orig>0</orig>
<CST>00</CST>
<modBC>3</modBC>
<vBC>2869.60</vBC>
<pICMS>12.00</pICMS>
<vICMS>344.35</vICMS>
</ICMS00>
</ICMS>
- <IPI>
<CNPJProd>00000000000000</CNPJProd>
<cEnq>0</cEnq>
- <IPINT>
<CST>54</CST>
</IPINT>
</IPI>
- <II>
<vBC>0.00</vBC>
<vDespAdu>0.00</vDespAdu>
<vII>0.00</vII>
<vIOF>0.00</vIOF>
</II>
- <PIS>
- <PISNT>
<CST>08</CST>
</PISNT>
</PIS>
- <COFINS>
- <COFINSNT>
<CST>08</CST>
</COFINSNT>
</COFINS>
</imposto>
<infAdProd>PC.93378954-COMPL.PED.XRW001RV</infAdProd>
</det>
+ <total>
- <ICMSTot>
<vBC>2869.60</vBC>
<vICMS>344.35</vICMS>
<vBCST>0.00</vBCST>
<vST>0.00</vST>
<vProd>2869.60</vProd>
<vFrete>0.00</vFrete>
<vSeg>0.00</vSeg>
<vDesc>0.00</vDesc>
<vII>0.00</vII>
<vIPI>0.00</vIPI>
<vPIS>0.00</vPIS>
<vCOFINS>0.00</vCOFINS>
<vOutro>0.00</vOutro>
<vNF>2869.60</vNF>
</ICMSTot>
<retTrib />
</total>
+ <transp>
<modFrete>0</modFrete>
- <transporta>
<CNPJ>00980331000488</CNPJ>
<xNome>THALE TRANSPORTES E LOG. LTDA</xNome>
<IE>5963866160070</IE>
<xEnder>ROD BR 459-KM 121 - DIST INDL, S/N</xEnder>
<xMun>SANTA RITA DO SAPUCAI</xMun>
<UF>MG</UF>
</transporta>
- <veicTransp>
<placa>DPF8048</placa>
<UF>SP</UF>
</veicTransp>
- <vol>
<qVol>20</qVol>
<esp>OUTROS</esp>
<pesoL>64.000</pesoL>
<pesoB>104.000</pesoB>
</vol>
</transp>
+ <cobr>
- <fat>
<nFat>000000395768</nFat>
<vOrig>2869.60</vOrig>
</fat>
- <dup>
<nDup>1</nDup>
<dVenc>2012-11-20</dVenc>
<vDup>2869.60</vDup>
</dup>
</cobr>
- <infAdic>
<infCpl>VIA DE TRANSPORTE RODOVIARIA CODIGO : 108061 PEDIDO NRO : ACIMA FABRICA :72480 REDESPACHO ATRAVES DE VELOCE LOGISTICA S/A ESTRADA DOS ALVARENGAS SAO BERNARDO CAMPO ASSUNCAO SP CNPJ : 10.299.567/0003-26 IE : 635.600.028.11 IPI - IMUNE CFE.ART.18, INCISO II, DO RIPI - DECRETO No.7.212/2010. REMESSA COM FIM ESPECIFICO DE EXPORTACAOMERC.A SER EXPORT.P/GENERAL MOTORS DO BRASIL LTDA.DECEX=3-0322/10-0007 ESTOCA-GEM TEMPORARIA NA VELOCE LOGISTICA S.A. ESTR.ALVARENGAS,4018 B.ASSUNCAO S.B.C. CNPJ10.299.567/0003-26IE.635.600.028.110 FT NR.431.183 ROMANEIO :131.588</infCpl>
</infAdic>
</infNFe>
+ <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
- <SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
- <Reference URI="#NFe31121059106377000172550010003957681605366269">
- <Transforms>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
<Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<DigestValue>jN2ozPH3/GvAS8Q5lh/t9bzuXCw=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>GAXPLvMCtIYdwMxXDcyL0kr5hCDPCFw8/uNYHFcdTMqBhLgIcEtzHRf8qioWlUVSHNf5jnCLKGjhDV4bEJqkcBhWsKouMzojQ+Z6hkFQAWNuJfPIzutmtRy3AePc5tHK0lI3tF3ws9memboJ8sW21IOWHB6eB0jK2gmhcOlDejc=</S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wg8WyErbbW1cAMqxv8rWNJHvNs8dbJOCBKaW4ZJDkO/8CpuvyKxSdS3OUdjuI1RAx9R0RBMemuv4h4S7rhOEhjkBB5hHFT5IeDded+oVzY3lpIU=</X509Certificate>
</X509Data>
</KeyInfo>
</Signature>
</NFe>
- <protNFe versao="2.00">
- <infProt>
<tpAmb>1</tpAmb>
<verAplic>13_0_32</verAplic>
<chNFe>31121059106377000172550010003957681605366269</chNFe>
<dhRecbto>2012-10-03T17:35:55</dhRecbto>
<nProt>131120853536488</nProt>
<digVal>jN2ozPH3/GvAS8Q5lh/t9bzuXCw=</digVal>
<cStat>100</cStat>
<xMotivo>Autorizado o uso da NF-e</xMotivo>
</infProt>
</protNFe>
</nfeProc> -
Comparing two rows field by field through a loop
Hi all,
I've got a tricky issue:
There are two tables (almost) identically designed;
In the first one there are lets say some new data and in the 2nd one there is data to be hold & adjusted;
I built up a third table, which contains the meta informations about the two other tables (i.e. it describes the tables, so for each field of these tables, there is the field name, field type, primary key marker, etc.);
The challenge now is, how can I compare two rows (of the same primary key) field by field and get out the differences (and adjusting the target table row) using PL/SQL procedures/functions.
I thought a create a cursor over the 3rd table and call functions to get the fields out (given by the field name of the cursor), compare the two fields and return if it's equal or different...
As I've seen, there is now direct way to replace a field name in a statement - but how to resolve this with a cool workaround?
In addition, there are about 120 pairs of such tables, to be compared in the same way - so I decided to prevent creating hard coded design for the software.
Even the selection of a pair of rows from the two tables should be parameterized, 'cause the primary keys are of course different in the 120 table pairs.
Any hints or suggestions?
Thanks in advance & regards,
PeterHi Peter,
I am very far from being an expert in Oracle but, everything I've read so far strongly suggests that PL/SQL is often the fastest among the customized solutions (beating even compiled C code). The reason - from what I've understood - is that PL/SQL is part of the Oracle kernel/engine, other languages simply aren't.
I suggest you do your own research to confirm what I've just said above.
On a completely different note, when I first read your post, I started writing a reply and decided to discard it because, I figured you probably would find it too far off your original thoughts. However, then you wrote:
>
There are some reasons to prevent hard coding, but it may be possible to generate the PL/SQL-code for each pair of tables by an external program.
>
This is exactly what I was mentioning in the post I ended up discarding. The basic step by step process I was going to mention is as follows:
STEP 1: If possible, write one PL/SQL program that does the job properly for one set of tables. Test it thoroughly and identify potential differences in the process if it had to be applied against other tables. Make it as generic as reasonably possible, that is, keeping the code as simple as possible.
STEP 2: turn the working code of step 1 into a template (usually replacing table names, columns, etc by some token that would not be a valid name).
STEP 3: generate a list of the tables and their corresponding columns you need to process. This list may need to be massaged a little to become the generating seed of 120 programs (or so based on what you've said).
STEP 4: if you don't know Perl or AWK then (don't be alarmed...) download AWK (not Perl) and learn it... you can learn the thing in a couple days (maybe even less). It is a very simple and straightforward text processing language, I know non progammers that learned enough in one day to do useful things with it. Using AWK you can easily generate the 120 programs you need from a working template in very little time (a few hours after you've become proficient). By the way, there is AWK, GAWK, NAWK, all pretty much the same thing and all free. The standard manual for AWK is the one written by the authors Aho, Weinberger and Kernigan, about 100 small pages, it's an easy read and no programmer should be without it :) (better than American Express!)
What you've described sounds just like the thing to use AWK for. I once used AWK to generate 27,000 (that's 27 thousand) lines of COBOL code, debugged and fully tested in 2 days! (testing was automated using AWK too!) It would have taken much longer to just type all that code.
Anyway, I hope that gives you something to think about and be of some help.
John. -
How to compare two rows in PL/SQL?
Hi All,
How to compare two rows in PL/SQL? Is there any method that I can use instead of comparing them column by column?
Any feedback would be highly appreciated.PhoenixBai wrote:
Hi All,
How to compare two rows in PL/SQL? Is there any method that I can use instead of comparing them column by column?What "rows" are you referring to?
If you're talking of rows within a PL/SQL associative array there are techniques as described in the documentation... e.g.
SQL> ed
Wrote file afiedt.buf
1 declare
2 type v1 is table of number;
3 r1 v1 := v1(1,2,4);
4 r2 v1 := v1(1,2,3);
5 begin
6 if r1 MULTISET EXCEPT DISTINCT r2 = v1() then
7 dbms_output.put_line('Same');
8 else
9 dbms_output.put_line('Different');
10 end if;
11* end;
SQL> /
Different
PL/SQL procedure successfully completed.
SQL> ed
Wrote file afiedt.buf
1 declare
2 type v1 is table of number;
3 r1 v1 := v1(1,2,3);
4 r2 v1 := v1(1,2,3);
5 begin
6 if r1 MULTISET EXCEPT DISTINCT r2 = v1() then
7 dbms_output.put_line('Same');
8 else
9 dbms_output.put_line('Different');
10 end if;
11* end;
SQL> /
Same
PL/SQL procedure successfully completed.
SQL>If you're talking about rows on a table then you can use the MINUS set operator to find the rows that differ between two sets of data...
SQL> select * from emp;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7369 SMITH CLERK 7902 17-DEC-1980 00:00:00 800 20
7499 ALLEN SALESMAN 7698 20-FEB-1981 00:00:00 1600 300 30
7521 WARD SALESMAN 7698 22-FEB-1981 00:00:00 1250 500 30
7566 JONES MANAGER 7839 02-APR-1981 00:00:00 2975 20
7654 MARTIN SALESMAN 7698 28-SEP-1981 00:00:00 1250 1400 30
7698 BLAKE MANAGER 7839 01-MAY-1981 00:00:00 2850 30
7782 CLARK MANAGER 7839 09-JUN-1981 00:00:00 2450 10
7788 SCOTT ANALYST 7566 19-APR-1987 00:00:00 3000 20
7839 KING PRESIDENT 17-NOV-1981 00:00:00 5000 10
7844 TURNER SALESMAN 7698 08-SEP-1981 00:00:00 1500 0 30
7876 ADAMS CLERK 7788 23-MAY-1987 00:00:00 1100 20
7900 JAMES CLERK 7698 03-DEC-1981 00:00:00 950 30
7902 FORD ANALYST 7566 03-DEC-1981 00:00:00 3000 20
7934 MILLER CLERK 7782 23-JAN-1982 00:00:00 1300 10
14 rows selected.
SQL> select * from emp2;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7521 WARD SALESMAN 7698 22-FEB-1981 00:00:00 1250 500 30
7566 JONES MANAGER 7839 02-APR-1981 00:00:00 2975 20
7782 CLARK MANAGER 7839 09-JUN-1981 00:00:00 2450 10
7788 SCOTT ANALYST 7566 19-APR-1987 00:00:00 3000 20
7839 KING PRESIDENT 17-NOV-1981 00:00:00 5000 10
7900 JAMES CLERK 7698 03-DEC-1981 00:00:00 950 30
7934 MILLER CLERK 7782 23-JAN-1982 00:00:00 1300 10
7 rows selected.
SQL> select * from emp
2 minus
3 select * from emp2;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7369 SMITH CLERK 7902 17-DEC-1980 00:00:00 800 20
7499 ALLEN SALESMAN 7698 20-FEB-1981 00:00:00 1600 300 30
7654 MARTIN SALESMAN 7698 28-SEP-1981 00:00:00 1250 1400 30
7698 BLAKE MANAGER 7839 01-MAY-1981 00:00:00 2850 30
7844 TURNER SALESMAN 7698 08-SEP-1981 00:00:00 1500 0 30
7876 ADAMS CLERK 7788 23-MAY-1987 00:00:00 1100 20
7902 FORD ANALYST 7566 03-DEC-1981 00:00:00 3000 20
7 rows selected.If you actually need to know what columns data is different on "non-matching" rows (based on your primary key) then you'll have to compare column by column. -
How can I compare more than two VIs at a same time in labview 2009
How can I compare more than two VIs at the same time. I am an Lab Engineer I have to check assignments submitted by students and I want to know how many of them are copied from each other. Labview compare VI can only compare two VI at a time while I want to check about 30 VIs at same time.
Regards,I'm not aware of a tool to compare multiple VIs. If you don't find anything, consider posting this to the LabVIEW Idea Exchange to expose this idea directly to NI R&D.
Thanks!
- Greg J -
How can i compare the contents of two folders ?
how can i compare the contents of two folders and find out which files are in one but not in the other?? Knowing how to do this would be the best thing ever, especially when dealing with a large number of files. Often, for instance, I'm dealing with a large number of images, processing them, and saving the retouched ones to a new folder, and need to check that they are all there. If there are say three files missing in the second folder (out of say a hundred in total) being able to automate the process of elimination would be very useful. Please help!!!
BI really wish I knew the answer to this. I work between two macs, a G5 and MacBook Pro when I'm on the go. Each time I move from one to the other I have to copy all my files to the computer I'm going to work on, so I end up with the same files being duplicated. It's not a problem if it's not much data but in my case the it can be to 30GB, mostly graphics files, photoshop, motion, final cut pro, etc.
There's has got to be a way automator can make a comparison between two folders to sort out what's changed and what's remained the same. It would be nice also if this feature could be done globally on the hard disk using spotlight's technology to stop files being duplicated in places you didn't even know about and taking up valuable disk space. I'm not sure how this could be done.
Any bright ideas Apple? -
How to compare two rows from two table with different data
how to compare two rows from two table with different data
e.g.
Table 1
ID DESC
1 aaa
2 bbb
3 ccc
Table 2
ID DESC
1 aaa
2 xxx
3 ccc
Result
2Create
table tab1(ID
int ,DE char(10))
Create
table tab2(ID
int ,DE char(10))
Insert
into tab1 Values
(1,'aaa')
Insert
into tab1 Values
(2,'bbb')
Insert
into tab1 Values(3,'ccc')
Insert
into tab1 Values(4,'dfe')
Insert
into tab2 Values
(1,'aaa')
Insert
into tab2 Values
(2,'xx')
Insert
into tab2 Values(3,'ccc')
Insert
into tab2 Values(6,'wdr')
SELECT
tab1.ID,tab2.ID
As T2 from tab1
FULL
join tab2 on tab1.ID
= tab2.ID
WHERE
BINARY_CHECKSUM(tab1.ID,tab1.DE)
<> BINARY_CHECKSUM(tab2.ID,tab2.DE)
OR tab1.ID
IS NULL
OR
tab2.ID IS
NULL
ID column considered as a primary Key
Apart from different record,Above query populate missing record in both tables.
Result Set
ID ID
2 2
4 NULL
NULL 6
ganeshk -
How can I add a row into a JTable with JButton
Hi all. I have the following code:
package gui;
import db.*;
import javax.swing.table.AbstractTableModel;
import java.util.ArrayList;
public class FoundersTable extends AbstractTableModel{
private static final int COLUMNS = 8;
private String columnNames[] = {"��� ����", "���", "�������", "�������", "���������", "��������",
"����� �� ����������", "������ �� ����, �����"};
private ArrayList data;
public FoundersTable(){
data = new ArrayList();
public int getRowCount() {
return data.size();
public int getColumnCount() {
return columnNames.length;
public String getColumnName(int colIndex) {
return columnNames[colIndex];
public Object getValueAt(int rowIndex, int columnIndex) {
return ((ArrayList)data.get(rowIndex)).get(columnIndex);
public void setValueAt(Object value, int rowIndex, int columnIndex) {
((ArrayList)data.get(rowIndex)).set(columnIndex, value);
fireTableCellUpdated(rowIndex, columnIndex);
public void addRow(ArrayList neueZeile) {
data.add(neueZeile);
int index = data.size() - 1;
fireTableRowsInserted(index, index);
public void removeRow(int index) {
data.remove(index);
fireTableRowsDeleted(index, index);
public void removeAllRows() {
data.clear();
fireTableRowsDeleted(0, 0);
public boolean isCellEditable(int rowIndex, int columnIndex) {
return true;
}Now in my MainJFrame class I have one button for additing and one button for removing a selected row. How can I add/remove rows with this two buttons.
ThanksNo my question is how can I add and remove rows WITH buttons My point was the code is the same. You use the addRow(...) method. Why did you write an addRow(...) method if you aren't going to use it?
I don't understand your problem. Do you not know how to write an ActionListener? -
I have made a ViewObject wich contains a date column.
I want to check if this date is smaller/greater than sysdate:
i get following error:
Error(45,24): method <(java.util.Date, oracle.jbo.domain.Date) not found in class Class4
code:
SimpleTimeZone pdt = new SimpleTimeZone(-8 * 60 * 60 * 1000, ids[0]);
// set up rules for daylight savings time
pdt.setStartRule(Calendar.APRIL, 1, Calendar.SUNDAY, 2 * 60 * 60 * 1000);
pdt.setEndRule(Calendar.OCTOBER, -1, Calendar.SUNDAY, 2 * 60 * 60 * 1000);
// create a GregorianCalendar with the Pacific Daylight time zone
// and the current date and time
Calendar calendar = new GregorianCalendar(pdt);
Date trialTime = new Date();
calendar.setTime(trialTime);
(VO_ULNRow)singleRow = null;
while(vo.hasNext()){ // ViewObject vo;
singleRow = (VO_ULNRow)vo.next();
if(calendar.getTime() < singleRow.getEO_ULN_BORROWFROM()); //singleRow returns oracle.jbo.domain.Date
etcetera
how can i compare those 2?Hi,
oracle.jbo.domain.Date has two methods which suit your needs
longValue() which returns a long (though I'm not sure if returns a long comparable to the long returned by java.util.Date)
and dateValue() which returns a java.util.Date
I hope it helps,
Giovanni
Maybe you are looking for
-
How to find out names of reports using a particular view
hi guys, i am newbie here, i jsut want to know how to find out which reports are using a particular view many thanks in advance for your help
-
Delivery date to be replaced by Confirmation date automatically.
Hi All MM gurus,, I want to do a setting in the Purchase order in such a way that if there is inbound delivery created or say buyer created a confirmation manually in the PO. The confirmation tab delivery date should replace the delivery date in the
-
ADF panelGroup component's background image in CSS does not render
Hi, I have an issue with the panelGroup component, where a background-image specified in the styleClass DOES NOT RENDER when deployed on the OAS. It works fine when I run the page on my local OC4J. I've verified that the image I use is deployed corre
-
.asp pictures won't display on Safari?
Hi, I cannot get my G4 ibook with Safari (up to date) to display any picture on a website that has .asp as it's ending. My G4 powerbook safari will display them fine on the same websites? I can't figure out the difference or how to get the ibook with
-
Problem with ChemDraw structures when converting word doc to pdf
I am trying to convert a word document with ChemDraw structures in it to a pdf. When it converts, I doesn't hold the chemical structures together. Is there a quick solution?