Like in front end applications, it shows the red line under text which means text spelling is incorrect. Similar to this do we have any function or method in which we can identify and correct wrong spellings in Database ? Databases like: MSSQL, Oracle or SAS.
HAVE | WANT
----------------------------------|---------------------------------
dis is windows based app | this is window based application
thsi phn has some many aplication | this phone has some many applications
Related
I have a table in a SQL Server 2019 that stores URI's like this:
documentID | documentlink
1 | \\server\share\documentid\Contract.pdf
2 | \\server\share\documentid\Salesnumbers.xlsx
3 | \\server\share\documentid\NicePicture.xlsx
These values are stored as nvarchar. Is there a way to make these clickable?
So that, when this table is for example read by PowerQuery users only have to click the link to open the file? It is assumed that only those filetypes are allowed for which the users have applications to view those files.
This does not necessarily have to be in SQL Server itself. If someone could tell me how to make it clickable in for example Excel or PowerBI, I would be gratefull also.
Adding file:\ in front of documentlink makes Excel makes it into a clickable link. My Google-fu abandoned me.
New user here and I've read many threads, but can't seem to figure out the best way to accomplish my task.
Current Issue:I'm using a switch function in Access to accomplish my goal. Here is what I have, but i'm getting a syntax error?
UPDATE all_rugs_prod
SET construction_facet =
Switch(
construction = Machine Woven, Machine Made,
construction = Machine Made, Machine Made,
construction = Printed, Printed,
construction = Hand Hooked, Hand Hooked
)
all_rugs_prod is Database,
construction_facet is the field I want to value to be returned in,
construction is the field it is going to search in.
I'm very new to all this so, i need as much help as I can get.....
Backdrop:I'm taking say database 1, then mapping/matching the fields to database 2. database 2 has many other fields that require data to be popluated in that were added in database 2 that were added.
I created an Append database from database 1 into databas 2 and matched those fields that were appended from database 1 that match database 2.
My biggest issue is the fact that I need to normalize/map data in database 2. Example: in database 2 there is a field from database 1 that has many different text values. I need to search that field and bring back a predetermined text value based on a predetermined list it would fit into. So say in database 2.field7 the text is "aqua blue", I need to normalize/map it to return it to database 2.field8 "blue" and so on and so forth. what is the best way to accomplish this. The list in some cases of say various colors is very long. Thanks!
The syntax error arises because you need to enclose literal strings in double quotes, e.g.
"Machine Woven"`
Otherwise each word separated by whitespace will be interpreted as a field (as opposed to a literal string), which, if not found in the source dataset, will result the fields being interpreted as parameters requiring a value to be supplied by the user; but more critically, this will result in too many arguments supplied to the switch function.
However, since you are only updating the value of records which contain the value "Machine Woven" in the construction field, your query could be simplified to:
update all_rugs_prod
set construction_facet = "Machine Made"
where construction = "Machine Woven"
For a situation in which many possible values in place of "Machine Woven" are being mapped to "Machine Made", I would suggest creating a separate mapping table, e.g.:
Mapping_Table
+---------------------+--------------+
| map_from | map_to |
+---------------------+--------------+
| Machine Woven | Machine Made |
| Machine Built | Machine Made |
| Machine Constructed | Machine Made |
+---------------------+--------------+
And then use a simple update query with inner joins to the above mapping table to perform an implicit selection and update the new value, e.g.:
update
all_rugs_prod inner join mapping_table on
all_rugs_prod.construction = mapping_table.map_from
set
all_rugs_prod.construction_facet = mapping_table.map_to
I'm new into AS400 and I got a job where I'm using AS400 and Powerlink (XA) to access and manage big ERP data. And I found a way to access the data through Excel VBA and SQL using the System I Nagivator tables.
My problem is that I can't find the correct Schemas>Tables in Navigator to feed the excel VBA that matches the data that I want in AS400.
Question: let's say I want to find the price for an item, and I want to find the price table in Navigator. Is there a way in AS400 to get the price table name that matches the same table in Navigator ?
This is my first question please let me know if more information is needed.
Please help, thank you!
First a little terminology, AS/400 is an old term, the current name for the Platform and OS that used to be called AS/400 is now IBM i on Power Systems. IBM i is the OS. (that is until IBM changes the name again)
If You Know the Table Name but not the IBM i Object Name
On IBM i, the database is built into the OS and many of the OS objects are in fact database objects. Here is how some of the SQL concepts map to IBM i terms.
SQL IBM i
-------------- ------------------
Schema Library
Table Physical file
Index Logical file
View Logical file
Row Record
Column Field
Unfortunately in IBM i, object names are limited to 10 characters. SQL names on the other hand can be up to 128 characters. You won't find a Physical file named CustomerMaster. DB2 maps that long name to a system name. You can find the system name by querying the catalog like this:
select system_schema_name, system_table_name
from qsys2.systables
where table_name = 'Navigator name'
The column TABLE_NAME will hold the long SQL name of the table, SYSTEM_TABLE_NAME will hold the IBM i object name. Note that long schema names can be mapped to system names as well. The column SCHEMA_NAME holds the long SQL name of the schema while SYSTEM_SCHEMA_NAME holds the IBM i library name. It is uncommon for schema names to be longer than 10 characters, so the two schema name columns are typically the same.
If You Know the Program Name, and Have Access to the Source
This may be obvious to you, but I am putting it here just for completeness. You can look in the source for the files being used, and back track from the screen field to the file.
If You Only Have A Green Screen
You can retrieve the open files for the current job if you have the appropriate authority. If this doesn't work for you, you will have to get help from your system administrator, or someone who does have authority. This will only get you candidate files though, and likely they are logical files. To do this, you are going to have to have authority to view your job, and you will have to know how the system request key is mapped to your keyboard (that is implementation specific, and may be customized, so you will have to check with someone inside your company or your emulator to determine that).
With that behind us, start the green screen program that shows the price field you are looking for. Then press the system request key. If you are configured to allow this, you will get an input line on the bottom of your screen, and the cursor will be positioned to it.
Press Enter.
You should now be in the System Request menu.
Select option 3 and press enter again. You should be in the Display Job screen for your current job.
If this all worked correctly for you, then option 12 will show you the files that your job currently has a lock on. That is, the files that are open for your job. The price field should be in one of them.
first of all thanks for your time. Now on to the question!,
I am creating a subscription based service for some users. Basically, some users are creating articles(blurbs of information) in one part of their company. Users want to be able to subscribe to words or phrases being used in those articles and get an email if their "subscription phrase is matched". Currently i have a sql server database of all subscriptions made by users. I was thinking of making a stored procedure that takes the "article" text and does a FTS on it. I have a small familiarity with FTS but have no idea how to implement.
In diagrams:
Subscriptions: |Name |Phrase |
|'Josh' |'Test Text' |
|'Jessica'|'Another purpose'|
Article coming in: "Test Text is very dangerous" should produce the result Josh
A different article "Test text is very dangerous unless used for another purpose" should produce the result
|Josh|
|Jessica|
you can do like this
select * from Subscriptions
where CHARINDEX(Phrase, 'Test Text is very dangerou') > 0
Ok. Here is some background: I have created a simple APEX application that is going to replace a handful of static HTML pages, an Access Database, and LOTS of manual work. Users use the application to submit work requests to my team and upon submission of the form the information is presented back to them in a 'receipt' with a new 'Request #' which they can use kind of like a UPS tracking number to make inquiries of their project. This number is the primary key of the submitted table and is auto-incremented by a sequence. This all works perfectly so far.
My problem is that for auto-incrementing to work, my PK obviously has to be a 'Number'. Again not really a problem. The issue is that prior to migrating to the APEX tool our 'Request #s' were formatted as a string of numbers 8 digits long with the necessary number of zeros (0's) to the left of the actual number. So Request # 789 is actually stored as 00000789 in our Access database. My boss has indicated that this same format needs to be mimicked when the # is displayed in the APEX tool as well since that is what our clients are used to seeing.
I need the Request # to continue to be stored as a Number so that I can continue to auto-increment but I need to find some way to append/concatenate the appropriate number of 0's to the front of the number when it is displayed. This is will likely need to be done with SQL. I am currently using this simple SQL script to display the #:
SELECT req_num
FROM proj_apex
WHERE req_num = (SELECT MAX(req_num) FROM proj_apex)
Thoughts? Any APEX or SQL developers have ideas?
select to_char(req_num, '00000009') ...
http://www.techonthenet.com/oracle/functions/to_char.php