dynamic-columns

Mapping dynamic column names in sql server

匆匆过客 提交于 2019-12-12 01:41:13
问题 DECLARE @step VARCHAR(25) = '15'; DECLARE @COL VARCHAR(50) = step_col_@step; UPDATE table_tblName SET @COL=<some value> WHERE <condition> I have the above query where @COL is supposed to be dynamic i.e. step_col_1,step_col_2,step_col_3......step_col_18. How can I achieve this without If-else condition in sql server? 回答1: Try the below query, DECLARE @COL VARCHAR(50) = 'step_col_'+@step 回答2: Pass the variables like this to form a dynamic sql query DECLARE @step VARCHAR(25) = '15'; DECLARE @COL

adding MySQL column to a table using trigger

强颜欢笑 提交于 2019-12-12 00:52:54
问题 I have a table that looks like this: Counters: | client_id | provider1 | provider2 | provider3 | _ - _ - _- _ - _ - _- _ - _ - _ the column names [provider1,provider2,...] is the id of provider which is stored in another table called "providers". what i need is, when a new provider is inserted into the "proviers" database a trigger would automatically add another column in the "Counters" table, but I can't seem to be able to get it. this is what i have so far: CREATE TRIGGER `providers_AFTER

Append columns to an HTML table offsetting from right

核能气质少年 提交于 2019-12-11 21:09:38
问题 How can I count the number of columns in the first row of a table, subtract by one and then insert a column at that location into my table? I would like the first row of that column to be different than the rest of them. Here is a basic fiddle that inserts columns into a table at a fixed location. This topic discusses inserting new columns. Problem is that it uses a fixed, from the left, position to insert the column. It also does not change the top column. Here is my sample code adapted from

PIVOT with dynamic columns and JOINS 5+ tables

。_饼干妹妹 提交于 2019-12-11 06:13:34
问题 This is an extension of a question posted by me earlier which can be found here : Previous Question Now i have 2 more tables that are also connected to ProfileFan tracking the Activities of the Fan(ProfileFan). Table Fan ----------------------- | FanId | Name | Info | ----------------------- | 17111 | Fan1 | Info1| ----------------------- | 17112 | Fan2 | Info2| ----------------------- Table ProfileFan m:1 Fan FanId(FK) ----------------------------------- | Id | LinkedInProfileId | FanId | --

Dynamic Columns in Crystal reports

喜欢而已 提交于 2019-12-11 03:05:21
问题 I got a requirement to create dynamic reports where if a column is added in database that column should automatically need to be reflected in crystal reports. I am wondering if dynamic column possible in crystal reports? If yes.. How to achieve? 回答1: As far as I know by adding a column in db you can't get it on crystal reports via datatable but you can get it via stored procedure but you have to drag and drop the field. Go through this link hope it will help you Crystal report with Dynamic

Primefaces data exporter from data table with dynamic columns

空扰寡人 提交于 2019-12-10 22:57:13
问题 Has anyone used primefaces data exporter component successfully with primefaces datatable with dynamic columns? In my case, it generates the excel file but it is empty. But if I keep everything same and just normal datatable instead of datatable with dynamic columns, the generated excel file is not empty. I am trying to see if somebody has done this. <p:dataExporter /> and <p:dataTable /> //(with dynamic columns) It works fine if I don't use the dynamic columns. I am using PrimeFaces 2.2.1,

how to get primefaces datatable columns order and width from ManagedBean

≯℡__Kan透↙ 提交于 2019-12-10 11:17:42
问题 i'm using primefaces 4.0, JSF Mojarra 2.2.2 and here is my datatable code : <p:dataTable id="tabexam" paginatorPosition="bottom" var="exam" value="#{dyna.examViewDataModel}" widgetVar="examTable" emptyMessage="aucun résultat trouvé pour votre recherche" paginator="true" rows="40" selection="#{dyna.selectedExamen}" filteredValue="#{dyna.filteredexams}" selectionMode="single" resizableColumns="true" draggableColumns="true" paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink

CSS dynamic responsive column layout

≡放荡痞女 提交于 2019-12-09 18:27:45
问题 I have been searching for answers but could not find anything that solves my problem. I have a website with dynamic content. What I want is that the content flows into columns when possible, in order to minimize scrolling. The items have dynamic heights. xxx item 1 xxx | xxx item 4 xxx xxxxxxxxxxxxxx | xxxxxxxxxxxxxx xxxxxxxxxxxxxx |------------------ ------------------| xxx item 5 xxx xxx item 2 xxx | xxxxxxxxxxxxxx xxxxxxxxxxxxxx |------------------ ------------------| xxx item 6 xxx xxx

Perform Operations on Dynamic Columns from Pivot

南笙酒味 提交于 2019-12-08 11:56:23
问题 As The Question says that I'm Trying to insert some values from dynamic sql Query to TempTable using Pivot, so the ExistingCoulmnName are not known to me In the next step I want to perform some arithmatic operation lets say multipliation on those Column Values. How Can I do that? Attaching Some samples : select @cols = STUFF((SELECT ',' + QUOTENAME(FYYear) from #TempCapEx group by FYYear order by FYYear FOR XML PATH(''), TYPE ).value('.', 'NVARCHAR(MAX)') ,1,1,'') set @query = 'SELECT

Bootstrap 4 Columns float style like Bootstrap 3 is it possible?

夙愿已清 提交于 2019-12-08 09:51:32
i start developing with bootstrap 4 and now i found this problem : when using bootstrap 3 column system, because it uses float, we could insert multiple columns inside a row and it wold fill the space depending on the "col-size" specified, like this : http://codepen.io/seltix/pen/QpXvRJ ------- ------- ------- | COL 1 | | COL 2 | | COL 3 | | | ------- ------- | | | COL 4 | | COL 5 | ------- ------- ------- <div class="container-fluid"> <div class="row"> <div class="col-sm-6 panel height-1"> <div class="bg-danger">this box is a slider with fixed col-6 width and fixes 2 blue boxes height</div> <