Table to convert 1 d of waveform (DBL); Convert the table to a 1 d of waveform (LDM)
Hola a todos soy nuevo in LabVIEW asi os ruego patience, mi duda're basica y annoyingly, como hago para convert a table 1 d in una Forma Onda 'Waveform (DBL)', os editor una imagen y mi VI, Gracias.
Hi all, I am new to using LabVIEW, so I beg you patience, my question is basic and simple, how to convert an array of 1 d in a waveform (DBL), thank you
In my view, that the sound VI gives you a waveform for the right channel and one for the left. For example, you may have to play with the index to determine which channel you want.
Tags: NI Software
Similar Questions
-
Convert the waveform (DBL) to a cluster of 2 elements
Hello
Can someone help me to convert the data type of waveform (DBL) to a cluster of 2 elements (X, Y). I found a few examples online, but I get an error when I wire everything together. I use VI of Tektronix to acquire a signal of channel 2 of my noculars, which I am able to do, but now I want to convert this data to a cluster so that I can use it for an existing application to acquisition. I have attached my VI version 8.2.
1Thanks
The is easy since it is part of the waveform data type. The X, you will need to calculate based on the dt by using a loop FOR.
-
Hello
I use Analogtodigital.Vi to convert the pulse of the sequences in digital.signals.I am able to get the representation of digital waveforms of impulses.
But how to count the number of 1 is present in the converted digital waveform. I want to count the number of 1 is present in the digital waveform converted.
Thanks in advance.
Have you tried the block scheme of similar to the Digital.vi of opening?
It creates an array 2D uncompressed 1 and 0, which is the binary 16 bits A/D conversion of each element in the array Y of the input waveform. You can use the DWDT digital Array.vi Boolean to convert a 2D Boolean table. Then convert Boolean values to 1.0 and summarize the array of integers. The sum must be the number of 1 bits in the digital waveforms.
Lynn
Note: The VI attached is saved in version 8.6. When I have it saved for the previous Version a warning was generated about the possible differences in the versions. Let me know if it doesn't work, and you are using which version of LV.
-
Easiest way to convert the cluster with named variables table?
I have a table of variables, I essentially unbundle this table of named variables.
I believe that the only way to achieve this is to convert the cluster table (not to mention that the deletion of each item one by one)?
Is what I've done below the best way to do it? seems a little weird to unbundle and rebundle by name.
Comments appreciated.
Altenbach says:
Maybe a simple catalogued the cluster would work.
Of course, it does!
-
Convert the Boolean table 1 d in Boolean
How to convert the Boolean table 1 d to Boolean? Actually, I take a digital input of sensor using data acquisition (NI USB 6009) and I give this digital input to a structure of case to change a condition, but the source type is table 1 d & sink is boolean(TRUE/FALSE).i have attached vi of the above condition, i only replaced Boolean table rather than real acquisition of input data.
Thanks for your suggestion, I couldn't open your vi cuz I use the 2009 version of labview, but I found the solution to this problem, we can use the table to index. I have attached the vi.
-
I'm working on a data model BI Publisher and I try to convert the Period_Name in GL_JE_Lines table to a date format and then return of the year.
The sql below works in 11i, but I can't make it work in Fusion.
to_char (to_date (l. )) period_name , ' MON-RR ' ),'YYYY')
Any ideas?Hi Jennifer,.
To_char (sysdate, 'DDMONYYYY') in BI Publisher does not return a correct results due NLS_DATE_FORMAT/DATE_LANGUAGE settings.
According to the standards of the I18N, NLS_DATE_LANGUAGE in the database is still hardcoded to NUMERIC_DATE_LANGUAGE. NUMERIC_DATE_LANGUAGE 'MY' in a date format mask is an integer, so you see the correct value.
You're not supposed to publish direct SQL with fixΘe format masks (unless it's some sort of canonical format used in internal processing, including the end-user will not be), you should return language digital date to the mid range and then make the formatting of y.
Workaround
Try adjusting the NLS_LANGUAGE in SQL data model to override formatting from of the
Data base and values of the Session, for ex: select to_char (sysdate, 'MON-DD-YYYY', 'NLS_DATE_LANGUAGE = AMERICAN') of double;
I got this Oracle support after lifting a SR.
Thank you
Rahul.
-
PHP convert the variable date of table format
I can not explain this without showing all the code...
I have a script which basically scrape information off the myspace site and updates the information in a table. I then had the script put this in tabular form. The problem that I'm hoping to get help, I would like to change the date format, and I don't know how I can do this since it is Setup how to loop through the table. If anyone can show me a better way to do it without a loop or a way to convert the date, I'd be very happy.
18/06/2009 22:00-Thursday, June 18, 2009 22:00
<? PHP
include('simplehtmldom/simple_html_dom.php');
$myspace_url = "url I'm scraping."
ini_set ('user_agent', ' scratch/2.5');
$html = file_get_html ($myspace_url);
$i = 0;
foreach ($html-> find ('input [type = "hidden"]') as $k = > $v) {}
If ($v-> name == "calEvtLocation") {}
$shows [$i] ['location'] is $v-> value;.
}
If ($v-> name == "calEvtCity") {}
$shows [$i] ['city'] is $v-> value;.
}
If ($v-> name == "calEvtState") {}
$shows [$i] ['State'] is $v-> value;.
}
If ($v-> name == "calEvtDateTime") {}
$shows [$i] ['date'] is $v-> value;.
$i++;
}
}
? >
< table border = "0" align = "center" cellpadding = "8" cellspacing = "0" >
< b >
< e style = "text-align: left;" do-size: 12px; "> < /th > venue
< e style = "text-align: left;" do-size: 12px; ' > city < /th >
< e style = "text-align: left;" do-size: 12px; "> Status < /th >
< e style = "text-align: left;" do-size: 12px; "> date/time < /th >
< /tr >
<? PHP
foreach ($shows as $show)
{
echo "< tr >";
foreach ($show as $item)
{
echo "< td > < table > $item";
}
echo "< /tr >";
}
? >
< /table >
Move the $i ++ should not have any effect on the way in which items are displayed thereafter.
How I would deal with the table is like this:
Venue City State Date/Time {$show['Location']} {$show['City']} {$show['State']} {$show['Date']} "; } ?>convert the format of output in text buffer
I received an ASCII output a signal source Analyzer I would like to convert in a readable text format. In the vi attached (LV2009) chain of read buffer control contains the data that I get and I put a free label on the Panel before which contains the expected results. When I have catalogued in a single table, I had the right values, but every 3 values that I have received a number that probably is a conversion of a carriage return character. I could sort the table to convert the number to a string and each third \r\n value but it seems a silly way to solve this problem. There must be an easy way to do it. Any idea?
Ben64
Like a little more fun, I initially wanted to do this:
A bit embarrassing that the function to build matrix does not deal with SGL, but for some reason any LV9 it throws at you:
Consider this my report to Technical Support OR.
Adding a constraint to DBL before building matrix kind of defeated the purpose, but solves the problem.
can I convert the option to choose in applescript in Automatic Configuration of the action folder
Hello
H I have an applescript script that is a sort of an image file and fix it to the sage according to uniqueness of the folder names.
In this script I choose the folder option, but I want to convert the option into action automatically as a file configuration. as
on the addition of items in folder to this_folder after receiving of these_items
Here's my script
d choose the game folder
_main ({d})
on _main (argv)
o script
property ff: {} - list of aliases
property gg: {} - list aliases to be moved by prefix
nn property: {} - list of file names
mm property: {} - list of prefixes
property mm1: {} - separate prefix list
Repeat the operation with d in the argv - by source directory table
d to g-d content of the kit
-retrieve the list of aliases and names for document files
Tell application "Finder".
say g-d document files to set point {ff, nn} to {it as list of alias, the name}
tell the end
Try
value {astid0, delimiters of point for the AppleScript text} {of AppleScript point text delimiters {'_'}}
Repeat with i from 1 to count my nn
the value {n, m} {my point nn i, ' "}
If (count of n textual elements) > 1 then set m ' "& n text items 1 thru-2
put end my mm m
If m ≠ "" and m is not my mm1 then put end my mm1 m
end repeat
the text value of the point astid0 delimiters AppleScript
errors errs errn number
the text value of the point astid0 delimiters AppleScript
error number errn errs
try to end
Repeat with m in my mm1 - with separate prefix
m to m content of the kit
-prepare the destination for this prefix
Try
Set dst as string d & e & ': ' as an alias
There is no error number-43 - dst
Tell application "Finder" to set the dst (make new folder d with properties {name: m}) as alias
try to end
Repeat with i from 1 to count my mm
If my mm point i = m and establish the end of my gg to my ff I
end repeat
If gg ≠ {} then tell application "Finder" to move the gg in dst with the replacement
Gg to {} set
end repeat
end repeat
end of script
say o to run
end _main
so if support convert this script for folder action script please help to do.
Thank you
Rakesh
You just need to provide multiple ways to call your manager, for example:
on run -- application double-clicked or run from the Script Editor set d to choose folder _main({d}) end run on open droppedItems -- items dropped onto droplet _main(droppedItems) end open on adding folder items to this_folder after receiving these_items -- folder action _main(these_items) end adding folder items to on _main(argv) -- main routine -- whatever end _main
Hello
Here, I have attached an example, similar code module is used in our project.
In this example in the control of two structures business SGL and U32 panels is directly related to the signpost DBL. If I give 4294967295(U32 value of maximum range in the case of forgery under the example) its display 4294967296.
Please give me the solution to show the correct value of U32 in signpost DBL.
Thank you
Wherry
In your code, 4294967295 is first converted to the SGL (on the edge of the box structure), then to the DBL. But this value may not be exactly converted SGL (due to lack of significant digits).
You should convert the SGL DBL value in the case of true.
Convert the number to a HEXADECIMAL 4-digit string
Hello
I would like to know if it is possible to convert a number to a HEXADECIMAL string 4 digit.
Now I convert the number to a table with ' generation array "and this table that I convert it with an"array of bytes to a string.
While when I type in the number 30, the channel will show 1E (HEX, 2 digits).
But when I type a number greater than 255, it continues to show FF (255)
If I do the 'picture to build' bigger and add an element, the string indicates a 4 digit Hex number.
Now, I would like to know how I can show one number, greater than 255 in the chain with 4 digits.
So I actually need to divide the number in 2 tables before building the table, isn't it?
I hope that you understand my purpose?
So when I type in "1235", I want a string indicating "04E5" and not "FF".
The function that you want to use is number to a hexadecimal string. Set the width of 4
http://zone.NI.com/reference/en-XX/help/371361H-01/Glang/number_to_hex_string/
Moreover, 0x04E5 is decimal 1 253
How to convert the array of integer to string
Hi, I'm trying to convert the table of 32-bit integers to a string. For ex: If the array contains {1234, 4567, 8, 9} I need string like {00.00, 34,12, 00, 00, 45, 67,...}
How to do this one.
Help, please
Thank you best regards &,.
Harish. G.
Hi Haris,
use the above solution as it seems you really want figures BCD...
Or this slightly improved version:
Is it possible to convert the selected text in javascript lines?
Hi all
I put a word to indesign cs 5.5 file is almost in a single table, I need to separate the text of the actual tables, is it possible to convert the selected text in javascript lines?
If there is no way to do that, someone can help me to make a script to cut selected lines and place it in the right holders of the table pointer to make independent table and then convert to text?
Hey brother,
Simply select the rows or cells represent the lines and then run this Javascript code snippet:
for (var r = 0; r < app.selection.length; r++) { for (var t = 0; t < app.selection[r].rows.length; t++) { for (var u = 0; u < app.selection[r].rows[t].cells.length; u++) { for (var c = 0; c < app.selection[r].rows[t].cells[u].paragraphs.length; c++) { app.selection[r].rows[t].cells[u].paragraphs[0].move (LocationOptions.AFTER, app.selection[r].rows[t].parent.parent.storyOffset); if (c < app.selection[r].rows[t].cells[u].paragraphs.length - 1) app.selection[r].rows[t].parent.parent.storyOffset.contents += "\r"; } if (u < app.selection[r].rows[t].cells.length - 1) { app.selection[r].rows[t].parent.parent.storyOffset.contents += "\t"; } else { app.selection[r].rows[t].parent.parent.storyOffset.contents += "\r"; } } } } for (var r = 0; r < app.selection.length; r++) { for (var t = app.selection[r].rows.length - 1; t >= 0; t--) { app.selection[r].rows[t].remove (); } }
Convert the Sql for Oracle script
Could someone help me convert the sql script in oracle below
-- EXEC SP_smpAGENCY_MYWS_LAPSE_GET_USP_AMSurrenderMngtReport '2005','2010','09048','IL' ALTER PROCEDURE SP_smpAGENCY_MYWS_LAPSE_GET_USP_AMSurrenderMngtReport --DECLARE @StartYY AS VARCHAR(4), @EndYY AS VARCHAR(4), @AgentCode AS VARCHAR(9), @CompanyCode AS VARCHAR(4) AS DECLARE @ProfileYYYYMM AS VARCHAR(6), @SQLStr1 AS VARCHAR(8000),@SQLStr2 AS VARCHAR(8000), @SQLStr3 AS VARCHAR(8000) SET @ProfileYYYYMM = '201005' SET @SQLStr1 = '' SET @SQLStr1 = @SQLStr1 + ' DECLARE @CompAvgCount AS DECIMAL(38,2), @CompAvgAP AS DECIMAL(38,2), @CompInforceAP AS DECIMAL(15,2), @CompSurrenderAP AS DECIMAL(15,2), ' SET @SQLStr1 = @SQLStr1 + ' @CompInforceCount NUMERIC, @CompSurrenderCount NUMERIC,@ALCompInforceAP AS DECIMAL(15,2), @ALCompSurrenderAP AS DECIMAL(15,2), ' SET @SQLStr1 = @SQLStr1 + ' @ALCompInforceCount NUMERIC, @ALCompSurrenderCount NUMERIC,@ILCompInforceAP AS DECIMAL(15,2), @ILCompSurrenderAP AS DECIMAL(15,2), ' SET @SQLStr1 = @SQLStr1 + ' @ILCompInforceCount NUMERIC, @ILCompSurrenderCount NUMERIC ' SET @SQLStr1 = @SQLStr1 + ' DECLARE @tblAgentNumber TABLE ' SET @SQLStr1 = @SQLStr1 + ' ( ' SET @SQLStr1 = @SQLStr1 + ' [AgentName] VARCHAR(255), ' SET @SQLStr1 = @SQLStr1 + ' [AgentNumber] VARCHAR(9), ' SET @SQLStr1 = @SQLStr1 + ' [AgentRank] VARCHAR(10) ' SET @SQLStr1 = @SQLStr1 + ' ) ' SET @SQLStr1 = @SQLStr1 + ' DECLARE @tblmineInForce TABLE ' SET @SQLStr1 = @SQLStr1 + ' ( ' SET @SQLStr1 = @SQLStr1 + ' [company_code] VARCHAR(50), ' SET @SQLStr1 = @SQLStr1 + ' [mine_policy_no] VARCHAR(50), ' SET @SQLStr1 = @SQLStr1 + ' [Annl_premium] NUMERIC(28, 2) ' SET @SQLStr1 = @SQLStr1 + ' ) ' SET @SQLStr1 = @SQLStr1 + ' DECLARE @tblmineSurrender TABLE ' SET @SQLStr1 = @SQLStr1 + ' ( ' SET @SQLStr1 = @SQLStr1 + ' [company_code] VARCHAR(50), ' SET @SQLStr1 = @SQLStr1 + ' [mine_policy_no] VARCHAR(50), ' SET @SQLStr1 = @SQLStr1 + ' [Annl_premium] NUMERIC(28, 2) ' SET @SQLStr1 = @SQLStr1 + ' ) ' SET @SQLStr1 = @SQLStr1 + ' INSERT INTO @tblAgentNumber ' SET @SQLStr1 = @SQLStr1 + ' SELECT AgentName, AgentNumber, AgentRank ' SET @SQLStr1 = @SQLStr1 + ' FROM [SUMYOLAP0001].aetnaildb.dbo.agentprofile'+ @ProfileYYYYMM +' AgtProfile ' SET @SQLStr1 = @SQLStr1 + ' WHERE (LEN(agentnumber) = 5 and (left(agentnumber,1) between ''0'' and ''8'' or left(agentnumber,1) = ''A'')) ' SET @SQLStr1 = @SQLStr1 + ' AND (Amname not like ''%COMPANY%'' OR Amname not like ''%DIRECT%'' OR Amname not like ''%MARKETsmp%'') ' SET @SQLStr1 = @SQLStr1 + ' AND agencynumber not in (''ILS'',''PLS'',''99999'') ' SET @SQLStr1 = @SQLStr1 + ' AND LEFT(agencynumber,2) not in (''CD'',''DR'') AND LEFT(agencynumber,3) <> ''DIR'' ' SET @SQLStr1 = @SQLStr1 + ' AND RIGHT(RTRIM(agencynumber),2) not in (''CD'',''DR'') AND RIGHT(RTRIM(agencynumber),3) <> ''DIR'' ' SET @SQLStr1 = @SQLStr1 + ' AND companycode = ''IL'' ' SET @SQLStr1 = @SQLStr1 + ' INSERT INTO @tblmineSurrender ' SET @SQLStr1 = @SQLStr1 + ' SELECT company_code, mine_policy_no, Annl_premium ' SET @SQLStr1 = @SQLStr1 + ' FROM odsmine_policy ' IF @CompanyCode = 'All' BEGIN SET @SQLStr1 = @SQLStr1 + ' WHERE company_code IN (''IL'',''AL'') ' END ELSE BEGIN SET @SQLStr1 = @SQLStr1 + ' WHERE company_code IN ('''+ @CompanyCode +''') ' END SET @SQLStr1 = @SQLStr1 + ' AND cont_status = ''S'' ' SET @SQLStr1 = @SQLStr1 + ' AND YEAR(effective_date) BETWEEN '+ @StartYY +' AND '+ @EndYY +' ' SET @SQLStr1 = @SQLStr1 + ' SELECT @CompSurrenderCount = COUNT(1), @CompSurrenderAP = SUM(Annl_premium) ' SET @SQLStr1 = @SQLStr1 + ' FROM @tblmineSurrender S ' SET @SQLStr1 = @SQLStr1 + ' INNER JOIN odsagent_role R ' SET @SQLStr1 = @SQLStr1 + ' ON S.company_code = R.company_code ' SET @SQLStr1 = @SQLStr1 + ' AND S.mine_policy_no = R.mine_policy_no ' SET @SQLStr1 = @SQLStr1 + ' INNER JOIN @tblAgentNumber A ' SET @SQLStr1 = @SQLStr1 + ' ON R.servicsmpagent_code = A.AgentNumber ' SET @SQLStr1 = @SQLStr1 + ' INSERT INTO @tblmineInforce ' SET @SQLStr1 = @SQLStr1 + ' SELECT company_code, mine_policy_no, Annl_premium ' SET @SQLStr1 = @SQLStr1 + ' FROM odsmine_policy ' IF @CompanyCode = 'All' BEGIN SET @SQLStr1 = @SQLStr1 + ' WHERE company_code IN (''IL'',''AL'') ' END ELSE BEGIN SET @SQLStr1 = @SQLStr1 + ' WHERE company_code IN (''' + @CompanyCode + ''') ' END SET @SQLStr1 = @SQLStr1 + ' AND cont_status = ''I'' ' SET @SQLStr1 = @SQLStr1 + ' AND YEAR(effective_date) BETWEEN '+ @StartYY +' AND '+ @EndYY +' ' SET @SQLStr1 = @SQLStr1 + ' SELECT @CompInforceCount = COUNT(1), @CompInforceAP = SUM(Annl_premium) ' SET @SQLStr1 = @SQLStr1 + ' FROM @tblmineInforce I ' SET @SQLStr1 = @SQLStr1 + ' INNER JOIN odsagent_role R ' SET @SQLStr1 = @SQLStr1 + ' ON I.company_code = R.company_code ' SET @SQLStr1 = @SQLStr1 + ' AND I.mine_policy_no = R.mine_policy_no ' SET @SQLStr1 = @SQLStr1 + ' INNER JOIN @tblAgentNumber A ' SET @SQLStr1 = @SQLStr1 + ' ON R.servicsmpagent_code = A.AgentNumber ' SET @SQLStr1 = @SQLStr1 + ' SET @CompAvgCount = ROUND(ISNULL(@CompSurrenderCount,0) * 100 / ( ISNULL(@CompSurrenderCount,0) + @CompInforceCount),2) ' SET @SQLStr1 = @SQLStr1 + ' SET @CompAvgAP = ROUND(ISNULL(@CompSurrenderAP,0) * 100 / ( ISNULL(@CompSurrenderAP,0) + @CompInforceAP),2) ' SET @SQLStr1 = @SQLStr1 + ' DECLARE @tblODSmine_Policy TABLE ' SET @SQLStr1 = @SQLStr1 + ' ( ' SET @SQLStr1 = @SQLStr1 + ' [AgentName] VARCHAR(255), ' SET @SQLStr1 = @SQLStr1 + ' [AgentNumber] VARCHAR(9), ' SET @SQLStr1 = @SQLStr1 + ' [AgentRank] VARCHAR(10), ' SET @SQLStr1 = @SQLStr1 + ' [Company_Code] VARCHAR(4), ' SET @SQLStr1 = @SQLStr1 + ' [mine_Policy_No] VARCHAR(10), ' SET @SQLStr1 = @SQLStr1 + ' [Cont_Status] VARCHAR(1), ' SET @SQLStr1 = @SQLStr1 + ' [Annl_Premium] DECIMAL(15,2), ' SET @SQLStr1 = @SQLStr1 + ' [No_count] NUMERIC ' SET @SQLStr1 = @SQLStr1 + ' ) ' SET @SQLStr2 = 'INSERT INTO @tblODSmine_Policy ' SET @SQLStr2 = @SQLStr2 + ' SELECT DISTINCT AgtProfile.AgentName, AgtProfile.AgentNumber, ' SET @SQLStr2 = @SQLStr2 + ' AgtProfile.AgentRank,mine.company_code, mine.mine_policy_no, mine.cont_status, mine.Annl_Premium, 1.0 as no_count ' SET @SQLStr2 = @SQLStr2 + ' FROM @tblAgentNumber AgtProfile ' SET @SQLStr2 = @SQLStr2 + ' INNER JOIN [SUMYOLAP0001].aetnaildb.dbo.COMAGH COMAGH ' SET @SQLStr2 = @SQLStr2 + ' ON AgtProfile.AgentNumber = COMAGH.AHAGTN ' SET @SQLStr2 = @SQLStr2 + ' AND (AHAMNO = ''' + @AgentCode + ''' OR AHUMNO = ''' + @AgentCode + ''' OR AHAGNO = ''' + @AgentCode + ''') ' IF @CompanyCode = 'ALL' BEGIN SET @SQLStr2 = @SQLStr2 + ' AND AHCO IN (''AL'',''IL'') ' END ELSE BEGIN SET @SQLStr2 = @SQLStr2 + ' AND AHCO = ''' + @CompanyCode + ''' ' END SET @SQLStr2 = @SQLStr2 + ' INNER JOIN odsagent_role Role ' SET @SQLStr2 = @SQLStr2 + ' ON AgtProfile.AgentNumber = Role.servicsmpagent_code ' SET @SQLStr2 = @SQLStr2 + ' INNER JOIN odsmine_policy mine ' SET @SQLStr2 = @SQLStr2 + ' ON Role.company_code = mine.company_code ' SET @SQLStr2 = @SQLStr2 + ' AND Role.mine_policy_no = mine.mine_policy_no ' SET @SQLStr2 = @SQLStr2 + ' AND mine.cont_status IN (''S'',''I'') ' IF @CompanyCode = 'ALL' BEGIN SET @SQLStr2 = @SQLStr2 + ' AND mine.company_code IN (''AL'',''IL'') ' END ELSE BEGIN SET @SQLStr2 = @SQLStr2 + ' AND mine.company_code = ''' + @CompanyCode + ''' ' END SET @SQLStr2 = @SQLStr2 + ' AND YEAR(mine.effective_date) BETWEEN '+ @StartYY +' AND '+ @EndYY +' ' SET @SQLStr3 = 'SELECT AgentName, AgentRank, AgentNumber, ' SET @SQLStr3 = @SQLStr3 + ' CONVERT(INT,SUM(CASE WHEN cont_status = ''S'' THEN no_count ELSE 0 END)) AS Surrrender_Count, ' SET @SQLStr3 = @SQLStr3 + ' CONVERT(INT,SUM(CASE WHEN cont_status = ''I'' THEN no_count ELSE 0 END)) AS InForce_Count, ' SET @SQLStr3 = @SQLStr3 + ' SUM(CASE WHEN cont_status = ''S'' THEN Annl_premium ELSE 0 END) AS SurrenderAP, ' SET @SQLStr3 = @SQLStr3 + ' SUM(CASE WHEN cont_status = ''I'' THEN Annl_premium ELSE 0 END) AS InForceAP, ' SET @SQLStr3 = @SQLStr3 + ' CASE WHEN count(*) = 0 THEN 0 ELSE CONVERT(DECIMAL(38,2),(SUM(CASE WHEN cont_status = ''S'' THEN no_count ELSE 0 END) * 100 / count(*))) END AS AgtSurrenderCount, ' SET @SQLStr3 = @SQLStr3 + ' CASE WHEN SUM(Annl_premium) = 0 THEN 0 ELSE CONVERT(DECIMAL(38,2),(SUM(CASE WHEN cont_status = ''S'' THEN Annl_premium ELSE 0 END) * 100 / SUM(Annl_premium))) END AS AgtSurrenderAP, ' SET @SQLStr3 = @SQLStr3 + ' CONVERT(varchar(100),@CompAvgCount) AS CompAvgCount, ' SET @SQLStr3 = @SQLStr3 + ' CONVERT(varchar(100), @CompAvgAP) AS CompAvgAP ' SET @SQLStr3 = @SQLStr3 + ' FROM @tblODSmine_Policy ' SET @SQLStr3 = @SQLStr3 + ' GROUP BY AgentName, AgentRank, AgentNumber ' EXEC (@SQLStr1 + @SQLStr2 + @SQLStr3) --PRINT (@SQLStr1 + @SQLStr2 + @SQLStr3)
Yes.
1. the scrap code.
2. get the specification of the requirements of business origin.
3. learn PL/SQL.
4. write the PL/SQL code to meet the requirements of the company.Convert the string separated by commas in the rows
Dear gurus,
I want to convert the string separated by commas in the rows to insert in the collection.
for example, the string 1234,2323,23232,2343,34234
Higher up in the chain must be converted to ranks in order to insert into the table or the collection
Thanks in advance
SanjeevString in rows separated to convert the comma.
with t as ( select '1234,2323,23232,2343,34234' as txt from dual ) select REGEXP_SUBSTR (txt, '[^,]+', 1, level) from t connect by level <= length(regexp_replace(txt,'[^,]*'))+1
How to convert the column of ROW using DBMS_REDIFINITION object type column
Hi all
Suppose I have the following table to convert:
I created the table based on the customers of the OE schema table, while the street column has cust_address_typ with the following attribute object typecreate table customer as select customer_id cid, cust_first_name name, cust_address street from customers; alter table customer modify cid primary key;
I want to convert the object attribute adresse_rue in a column of RDM. Consider the following temporary table:SQL> describe cust_address_typ Name Null? Type ----------------------------------------------------- -------- ------------------------------------ STREET_ADDRESS VARCHAR2(40) POSTAL_CODE VARCHAR2(10) CITY VARCHAR2(30) STATE_PROVINCE VARCHAR2(10) COUNTRY_ID CHAR(2)
First of all, I checked if the table can be redefined:CREATE TABLE INT_CUSTOMER( CID NUMBER, NAME VARCHAR2(30), street varchar2(100) );
But when I started the redefinition, I got an error:--Verify if the table can be redefined BEGIN DBMS_REDEFINITION.CAN_REDEF_TABLE('OE','CUSTOMER',DBMS_REDEFINITION.CONS_USE_PK); END; 4 / PL/SQL procedure successfully completed.
What seemed to be the problem?BEGIN DBMS_REDEFINITION.START_REDEF_TABLE( uname => 'OE', orig_table => 'CUSTOMER', int_table => 'INT_CUSTOMER', col_mapping => 'CID CID, NAME NAME, STREET CUST_ADDRESS_TYP(STREET_ADDRESS)' ); END; 9 / BEGIN * ERROR at line 1: ORA-00923: FROM keyword not found where expected ORA-06512: at "SYS.DBMS_REDEFINITION", line 52 ORA-06512: at "SYS.DBMS_REDEFINITION", line 1646 ORA-06512: at line 2
Best regards
Val
Published by: Valerie good-natured October 9, 2011 21:43Have you tried this one:
BEGIN DBMS_REDEFINITION.START_REDEF_TABLE( uname => 'OE', orig_table => 'CUSTOMER', int_table => 'INT_CUSTOMER', col_mapping => 'CID CID, NAME NAME,"CUSTOMER".STREET.STREET_ADDRESS STREET' ); END;
Looking at your trace file, I claim that when you use the call above to START_REDEF_TABLE, the inner workings of this procedure will create this SQL statement:
select CID CID, NAME NAME,"CUSTOMER".STREET.STREET_ADDRESS STREET from "OE"."CUSTOMER" "CUSTOMER"
(You can prove or disprove my claim by tracing it ;-)))
And this statement has had an alias - even if the alias is the same as the name of the table...
Maybe you are looking for
-
Is there a firefox that I can install it on my windows system 8 which works?
I don't want to waste my time and effort if there is not a version that works on the new windows.
-
Difficulty to get a quick Web work - "missing partition HP_TOOLS" error
How can I make fast web work, I do the instalation and it gives me an error about a missing partition HP_TOOLS
-
Pavilion dv6 6168-tx: HELP! I need driver for windows 8.1
Please help me... I need driver for my laptop, someone help me...
-
PIXMA MX882 print serrated or lines stands?
I have a Pixma MX882 printer who has had problems lately. When printing straight lines, they come out bleachers or staircase. This seems to be particularly noticeable when printing horizontal or landscape. If I print a shipping label to the France
-
Windows 7 Ultimate Installation
I have a Lenovo G480 with windows 7 Home Basic installed. However, I would now like to upgrade to windows 7 ultimate. I recently bought a windows 7 ultimate 64 bit cd because my laptop is also 64-bit. It happens when I run the Setup. During installat