I have a table in pgadmin4. one of the columns is date-time . I want to extract all columns when date time is greater than 0 and smaller than 6 and also when date-time is between 18 and 23.
I tried the following query but the result was an empty table.
select
*
from tl
where date_part('hour',tl.tstamp) >=0 and date_part('hour',tl.tstamp) <6
and date_part('hour',tl.tstamp) >=18 and date_part('hour',tl.tstamp) <=23;
each of these time spans work separately well but when I try to execute them together I have the mentioned problem.
I would appreciate it if somebody could tell me what is the problem and how can I fix it.
I am not sure what the technical term for what I am trying to do is.
Hoping raw data and output below will clearly define the use case.
Raw data :
This is what my raw data looks like
Output 1 :
this is what I am trying extract first
Here I am trying to get a table where the first column has the name of the guests and 2nd column has the count of times they have featured in the table as a guest.
Output 2 :
this what I am trying extract next
Here I am trying to map months against names and see how many nights one has collected in which month.
One way to achieve this would be to create a temp table with 5 columns,column 1 with Guest names,
column 2 with count of occurrence in guest 1 column in raw data table,
column 3 with count of occurrence in guest 2 column in raw data table,
column 4 with count of occurrence in guest 3 column in raw data table,
column 5 with total of previous 3 columns.
But I am trying to find a proper solution through tableau, if possible. Because this way would not help me achieve Output 2.
Plain text raw data if you'd like to work on it :
booking by,Guest 1,Guest 2,Guest 3,stay start,stay end,hotel code
Ram,Seema,Ram,,May 1 2018,May 2 2018,BBST
Karan,Ram,Seema,,May 6 2018,May 7 2018,BRRLY
Mahesh,Mahesh,Seema,Ram,June 2 2018,June 4 2018,BBST
Krishna,Krishna,,,June 2 2018,June 3 2018,BRRLY
Seema,Seema,,,June 7 2018,June 8 2018,BRRLY
I have a for loop which reads data from a particular column "A" of an excel sheet.
Now, for this for loop in the first iteration I need to read specific rows like row 1 and row 3 from another column "B" of excel.
Then in the second iteration I want to read row 2 and row 4 of the same column "B", and then in the third iteration I want to read row 5 and row 7 from the same column "B".
How can I achieve this, my main for loop is working fine, but somehow I am unable to read specific rows.
I found the instruction at https://www.katalon.com/videos/get-datas-excel-file-katalon-studio/. Hope that it help
I am trying to move data from a CSV file to DB table. There are 2 delimited columns in the CSV file (separated by ";"). I would like to create a row for each of the delimited values at matching indexes as shown below. Assumption is that both columns will contain same number of delimited items.
Example CSV Input:
Labels Values
A;B;C 1;2;3
D 4
F;G 5;6
Expected Output:
Labels Values
A 1
B 2
C 3
D 4
E 5
F 6
How can I achieve this? I have tried using tNormalize but this only works for a single column. Also I tried 2 successive tNormalize nodes but as expected it resulted in unwanted combinations.
Thanks
Read your CSV file with a tfileinputdelimited, and
define your schema for the file.
Assuming you are using MySQL , also drop a tMysqlOutput component on you desinger to save your parsed file to the DB.
Exporting to Excel in SSRS getting error when it crosses 65,000 rows
I am using ssrs (BIDS) to create reports, I struck in exporting to excel when it crosses 65,000 rows. how to solve this problem in ssrs reports
Are you exporting as an .xlsx file? I know in pre-2007 Excel (.xls) the maximum row count was about 65,000.
I got the answer and I hope this is the another way to solve the above problem
generate sql table like this
col1 col2 grp
1 2 1
2 3 1
4 5 1
2 4 2
4 5 2
and give group by column as "grp" and make visiblility false for grp textbox in ssrs report. also in page breaks properties check the "between each instance of a group" checkbox. when you exprot to excel the data will come in differnt sheets for diffetent groups.
user this link for query - Increase row count in sql server after some count (say 25,000)
That's an excel 2003 limitation and SSRS does not support excel 2007.
You need to export to csv or add groups on your report (with 65k max rows) so each group will be exported as on sheet on the excel document