How to put different columns together in SQL Server - sql-server-2008

I have a table like what is showing in the picture. How could I make a file like
BP1~PT1~CLM1~P1~P2~P3~**CLM2~P1~P2~|~PT2~CLM1~P1~P2~**~CLM2~P1~\n
BP2~PT1~CLM1~P1~PT2~CLM1~P1~\n
Thank you

Related

Automatic groups based on table titles

I have a huge csv dataset that consists of similar tables. The structure of my data is shown is like the dummy data below, where 'Weekday:XY' is an example table and all tables are square:
I would like to automatically make expandable groups based on table titles. So I need something that looks like this:
The above is done manually with Data>Group>Rows.
Would anyone have any ideas of how this can be done efficiently?
Thanks!

Does Fusion drop columns?

I've got a CSV file with approximately 300 columns. Here's a sample of the columns:
The file is almost 100mb.
I've imported it into fusion tables using their GUI import through the browser. Here's what it looks like after import:
As you can see all the way to the right the column is getting cut off:
However, it does indeed recognize that there are more columns:
How do I view the rest of the columns? What am I doing wrong?
Use "Tools > Select columns" to choose what columns to show. By default only the first 50 are shown.

Some columns are hidden in phpMyAdmin

I have about 11 columns in a mysql table and none of them are empty. When I view these columns in the Browse section, some columns are hidden whereas I'm sure they exist.
I have updated phpMyAdmin to latest version (4.1.5) but that did not solve anything. I also exported the table, dropped it and imported it again but nothing changed.
How do I make all the columns visible?
You could look in the exported file to double-check that they exist there.
Another thing to try; from the table, click the SQL tab. The default text will probably say SELECT * FROM `tablename` WHERE 1, try running that and see if you get any different response.
If you click the Structure tab, do you see the columns that are hidden?
Do you have access to the command-line client? If so, can you test showing the table structure there to see if it's different than displayed by phpMyAdmin?
Edit: Have you tried a different browser?
Marc Delisle points out that the column may be hidden within phpMyAdmin; in the Browse tab look to the left of the column headers, there's a T with two arrows -- to the right of that is a small dropdown arrow. Make sure all your columns are selected there. It's doubtful this is the cause of your problem, because you dropped the table and recreated it, but it's the next thing to check.
Can you copy the table to another database for testing, verify that the problem exists there, then truncate the table (remove all data, see the Operations tab to do this), and see if it continues (that will help determine whether it's the structure or the data causing the problem)?
Can you try to export the structure only and recreate the problem on the demo server (log in with the username root and a blank password)? Can you post the structure here? Make sure you obscure any sensitive information if needed.
This question is a duplicate to this one:
phpMyAdmin doesn't show added columns
so here is my duplicate answer! I don't think I have enough kudos to flag this as duplicate yet.
Database phpmyadmin is used to store which columns are hidden, which column a table should be sorted by, etc etc. Table pma_table_uiprefs (phpmyadmin.pma_table_uiprefs) in particular has columns: username; db_name; table_name; and prefs.
I found the row in that table that matches your db_name,user_name and table_name, and deleted it. That reset the layout back to showing all columns!
The prefs column is text, and it's format could probably be deciphered if you have some spare time and energy, but deleting the row is easy and you can then adjust the layout again in phpmyadmin, and the row will be recreated in phpmyadmin.pma_table_uiprefs.
I was authenticated as root when doing this.
i just solved this with a relatively easy fix! (finally my time to give back :) )
For anyone reading in future, go to operations (top row, same as browse, structure etc). Then under Copy table to (database.table): just change the name of the table, press go. This will create a duplicate that should be fine.
Go to the same area of the problematic table and DROP it under Delete data or table. This will delete the table.
Now go to the operations of your new page and rename the table to the way it was. Like in the image linked.
Image of where to go in PHP Admin:

how to filter partial data in one column

i hope you guys can help me with my query. Im using my sql database 2008.
I have to get the partial data from one column which contains so many data. This goes like this.
in finaldiagcode column with so many codes like this (AO9, E86.1 E10.1), i need to get data that matches to E10.1
I have tried to use [] in my query but it does not work.
thank you and hope you can help me.
select finaldiagcode from yourtable where finaldiagcode like 'E10.1%'

html table to powerpoint

I have an odd request. I have made an application that produces an html/printable invoice in a table format.
What I am trying to do is figure out how to take such a table, which may have 3 or as many as 20 rows on it depending on who's using it, and paste it into power point.
It seems to do it, but the result varies.
Any idea on where to start? I'll buy something if I have to!
Select the first field of the HTML table by double-clicking it
Then press Shift+end keys (or Ctrl+Shift+end )
This will select the entire table.
Now you can copy the table and paste it wherever you want to
You can also automate the entire process for multiple tables