I have a DB2 9.X table with a column named summary.
Here's an example.
SUMMARY
updated www.name1.do.com
Went from www.there2.do.com towww.here1.do.com
Backed up theretherethere.do.this.com and restored to hellothereworld.go.com
Those are three different rows.
In my program I've got a list of URLs. I need to search the database in a way that returns all the rows if the summary column CONTAINS any of the URLs in my list.
Thanks
Store your URLs in a table (i.e. urls) and put '%' round your urls (i.e. %www.name1.do.com%) join both table using a cross join and select like this:
select summary
from basetable, urls
where summary like urls.likecolumn
Related
I have multiple tables with one common element (ID). The first table has is the only one that has the ID and First Name. In a dashboard, I am trying to create a filter where when I type in or select the First Name, all data from all tables relating to the First Name's ID would populate.
FYI, I don't want to join the data. My actual tables are big data from multiple sources I would like to find an alternative route to this.
I also tried to create a parameter for the First Name and then created a Calculated Field with
IF [Parameter]=[Name]
THEN [ID]
ELSE NULL
END
but this didn't work. I am very new to Tableau and I'm thinking that there must be a way where the choosing a Name would trigger the ID and its relevant data.
create multiple sheets with different tables where each sheet will be collected to individual table.
Now create a filter and apply the filter to all worksheets and then go to dashboard and apply filter, Dash board should change.
In SQL we can write query like:
Select field1,field2,field3,field4,field5,field6,field7
from table1 t1,table2 t2,table3 t3
where t1.field1 = t3.field3 and
t2.field2 = 'USD'
In Qlikview, I have created QVD's for 6 tables, now I want to create a single QVD of these 6 QVD's. Unfortunately these tables don't contain primary keys. So I cant use join. I have tried like this also:
fact:
load *
from
[D:\path\fact*.qvd](qvd);
//To store all qvd's into one qvd.
store fact into [D:\path\facttable.qvd];
This query creates a facttable but only with 2 columns, these columns are of first fact table. Diagram shows it much clear:
As it internally gives the name of all the facts table with fact, fact-1, fact-2 and so on and I have written the query store fact into [D:\path\facttable.qvd]; and in this diagram fact table contains only two columns so it creates the fact table with two columns only.
Please let me know the solution that how can we write this query in Qlikview or how can we create a fact table using all the QVDS?
Thanks in advance.
Since every qvd contains different field names it will create several tables with synthetic keys when you load *.
You can use Concatenate Load to stack each qvd onto one fact table. One simple example would be to first create a Fact table by:
Fact:
Load * INLINE [
dummyField
];
Now you can concatenate the qvd's onto that Fact table:
concatenate(Fact)
load *
from
[D:\path\fact*.qvd](qvd);
//To store all qvd's into one qvd.
store Fact into [D:\path\facttable.qvd];
//drop the dummy field.
drop field dummyField;
I am currently creating a simple report in Crystal Reports with two tables:
{Table1.group_name_id} --> {Table2.technical_group_id}
Table 1 holds all of the groups; ID's, Names etc
Table 2 holds only the technical groups ID
With these two tables linked it means the only records that will return are those where technical groups are involved, perfect! But now I want to add a dynamic parameter to return the Technical Group Names for the End User to select.
Because {Table2} only holds one field (the ID) which links to {Table1}'s ID, I have to perform the Parameter selection on {Table1}'s name field.
But this is pulling back all of {Table1}'s names and is discounting the Join on {Table2} even with an enforced join present.
Is there a way to force it to only pull back {Table1}'s names as long as it matches the JOIN between {Table1} and {Table2}?
Thanks in advance!
Edit (additional information)
As I thought - the problem was Crystal Reports was not recognising the JOIN when displaying the parameter values.
After some reading, I found out that the JOINS are only recognised when the query is passed to the database (logically). So when selecting a Parameter, it doesn't recognise the JOINS.
I got around this by creating a custom SQL command, forcing it to only pull back the groups in the second table.
First, please confirm your join INNER JOIN.
For Addition,
You can pass the User Input as a parameter in to the crystal report and use this {#Parameter} to filter the result set using SelectionFormula in Crystal Report.
Or you can even set the selectionformula itself from the application.
In Sitecore I have created an alias called "bob" for a page.
For most items in Sitecore, the data is saved in the Items table in the database. You can easily see these if you search using the Item ID.
However whenever I search for an alias it returns no results:
select * from Items where ID ='0134A009-5D38-43C1-96C6-33C305543B7B'
Are aliases stored in a different location?
I have tried manually looking through all the tables and also ran a script which should search the whole database. If it is stored there then it looks like it is not in plain text.
Aliases like any other items are stored in the Items table.
You should check if you're looking for the Alias in the proper database. Maybe You're checking core or web database instead of master?
I've created a Bob alias in my env and query below returns 1 row containing alias details:
SELECT
*
FROM
[dbo].[Items]
WHERE
ID = '03275C36-32CE-47F7-AD28-9D5D2649E934'
Good morning!
I'm with the need to look in my database, one column of a table that does not know the name at first, what happens is the following:
In my application created for each project, a table is created which takes the name of this project, taking the given name and concatenating with the date and time of creation. So the name of this table is stored in another table called projects that have a field that tells the client that belongs to that project. When I do SELECT want to see the names of application projects related to the ID's of customers, browse the database tables behind those those customers and bring me these tables, so that we can finally see the desired fields.
Do not know if I could be clear, if they need more details just talk!
Thanks!
If I understood you correctly, you need to find the exact names of the tables that were named like your project plus they have some additional characters in their names (that look like dates and times).
Well, you can list all the tables that start with the name of your project, using a query like this:
SELECT *
FROM sys.tables
WHERE name LIKE 'yourprojectname%'
sys.tables is a system view where all your tables are listed.
'yourprojectname%' is a mask used for filtering through the list of tables. The % character is neccessary. It means 'any character or characters, any number of them (or none of them)'. (Without % the output would show you only one table whose name is exactly like your project's name. If such a table exists, that is.)