Please advise.
In Db2 database how can I know the list of tables that contain the column ex PHONE?
Thanks,
Srihari
Have you tried looking at the system catalog?
SELECT CREATOR, TBNAME
FROM SYSIBM.SYSCOLUMNS
WHERE NAME = 'PHONE'
Related
For data profiling purpose , I just need to get the idea if a columns in a given table has values populated or not. For that, I need to get the list of columns and distinct value counts for a given db2 table.
If you are using Db2 for Linux, Unix or Windows you could try
SELECT TABSCHEMA, TABNAME, COLNAME, COLCARD FROM SYSCAT.COLUMNS
I am trying to create a report that pulls over records that contain only email address per record. Can anyone help me with this? I am not very experienced with Crystal so any help would be really appreciated. I have tried using count and max but nothing has worked for me so far. Thanks, Cindy
To pull distinct records
go to ---> Database ---> Select distinct Records
If this is not your are looking for then provide more detail about your problem
First You have to create a stored procedure that retrieves the distinct records that you need.
second you have to create a crystal report and set datasource location or select your procedure from Database Expert (Create New Connection -> select your connection type-> insert credentials to open the connection-> select your procedure)
Third from Field Explorer your Procedure will appear and the columns of your query all you have to do from here is to work on the layout(Design) and drag & drop your required field.
My Question is Similar to MySQL, count the number of "filled" fields in a table
But i can not got my proper solution. How is it possible in Sqlite?
I Know about get using for loop. but i want to get by query.
Please help me on this issue.
Thanks in Advance.
A query like this will work:
SELECT COUNT(*) from raw where rawData <> '' AND rawData IS NOT NULL
This assumes there is a table called "raw" and the column you're checking against is "rawData"
I am trying to delete TWO TABLES entries WITH SINGLE Query in my sqlite database on my iPhone app, but am getting a weird error.
DELETE Sec1Opr_Equipment.*, Sec2Opr_Equipment.* FROM
Sec1Opr_Equipment INNER JOIN Sec2Opr_Equipment ON Sec1Opr_Equipment.ID = Sec2Opr_Equipment.ID
WHERE Sec1Opr_Equipment.ID='1'
And also Try
DELETE Sec1Opr_Equipment,Sec2Opr_Equipment
FROM Sec1Opr_Equipment
LEFT JOIN Sec2Opr_Equipment
ON Sec1Opr_Equipment.ID = Sec2Opr_Equipment.ID
WHERE Sec2Opr_Equipment.ID='1'
Plz any one help me..
thanks in advance
This is not possible, in SQLite the delete statement can only delete records from a single table without any joins. You can use subqueries in your WHERE clause though:
DELETE FROM tbl1 WHERE id IN (SELECT id FROM tbl2 WHERE ...)
Is there some means of querying the system tables to establish which tables are using what locking schemes? I took a look at the columns in sysobjects but nothing jumped out.
aargh, just being an idiot:
SELECT name, lockscheme(name)
FROM sysobjects
WHERE type="U"
ORDER BY name
take a look at the syslockinfo and syslocks system tables
you can also run the sp_lock proc