Search Results

Search found 51778 results on 2072 pages for 'super columns'.

Page 10/2072 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Convert VARCHAR() columns to NVARCHAR()

    - by ChrisD
    We recently underwent an upgrade that required us to change our database columns from varchar to NVarchar, to support unicode characters. Digging through the internet, I found a base script which I modified to handle reserved word table names, and maintain the NULL/NotNull constraint of the columns.   I Ran this script use NWOperationalContent – Your Catalog Name here GO SELECT 'ALTER TABLE ' + isnull(schema_name(syo.id), 'dbo') + '.[' +  syo.name +'] '     + ' ALTER COLUMN [' + syc.name + '] NVARCHAR(' + case syc.length when -1 then 'MAX'         ELSE convert(nvarchar(10),syc.length) end + ') '+         case  syc.isnullable when 1 then ' NULL' ELSE ' NOT NULL' END +';'    FROM sysobjects syo    JOIN syscolumns syc ON      syc.id = syo.id    JOIN systypes syt ON      syt.xtype = syc.xtype    WHERE      syt.name = 'varchar'     and syo.xtype='U'   which produced a series of ALTER statements which I could then execute the tables.  In some cases I had to drop indexes, alter the tables, and re-create the indexes.  There might have been a better way to do that, but manually dropping them got the job done.   use NWMerchandisingContent GO ALTER TABLE Locale Drop Constraint PK_Locale ALTER TABLE Country DROP CONSTRAINT PK_Country GO ALTER TABLE dbo.[Campaign]  ALTER COLUMN [ActorKey] NVARCHAR(200)  NOT NULL; ALTER TABLE dbo.[BundleLocalization]  ALTER COLUMN [Locale] NVARCHAR(8)  NOT NULL; ALTER TABLE dbo.[BundleLocalization]  ALTER COLUMN [UnitOfmeasure] NVARCHAR(200)  NULL; ALTER TABLE dbo.[BundleLocalization]  ALTER COLUMN [ActorKey] NVARCHAR(200)  NOT NULL; ALTER TABLE dbo.[BundleComponentLocalization]  ALTER COLUMN [Locale] NVARCHAR(8)  NOT NULL; ALTER TABLE dbo.[BundleComponentLocalization]  ALTER COLUMN [Imperative] NVARCHAR(MAX)  NULL; ALTER TABLE dbo.[BundleComponentLocalization]  ALTER COLUMN [Instructions] NVARCHAR(MAX)  NULL; ALTER TABLE dbo.[BundleComponentLocalization]  ALTER COLUMN [ActorKey] NVARCHAR(200)  NOT NULL; ALTER TABLE dbo.[BundleComponent]  ALTER COLUMN [ActorKey] NVARCHAR(200)  NOT NULL; ALTER TABLE dbo.[Bundle]  ALTER COLUMN [ActorKey] NVARCHAR(200)  NOT NULL; ALTER TABLE dbo.[Banner]  ALTER COLUMN [ActorKey] NVARCHAR(200)  NOT NULL; ALTER TABLE dbo.[Video]  ALTER COLUMN [Link] NVARCHAR(512)  NOT NULL; ALTER TABLE dbo.[Video]  ALTER COLUMN [ActorKey] NVARCHAR(200)  NOT NULL; ALTER TABLE dbo.[ProductUsage]  ALTER COLUMN [VideoLink] NVARCHAR(512)  NOT NULL; ALTER TABLE dbo.[ProductUsage]  ALTER COLUMN [ActorKey] NVARCHAR(200)  NOT NULL; ALTER TABLE dbo.[Thumbnail]  ALTER COLUMN [ActorKey] NVARCHAR(200)  NOT NULL; ALTER TABLE dbo.[SkuLocalization]  ALTER COLUMN [Locale] NVARCHAR(8)  NOT NULL; ALTER TABLE dbo.[SkuLocalization]  ALTER COLUMN [UnitOfMeasure] NVARCHAR(150)  NOT NULL; ALTER TABLE dbo.[SkuLocalization]  ALTER COLUMN [SwatchColor] NVARCHAR(50)  NOT NULL; etc.. GO ALTER TABLE Locale ADD CONSTRAINT PK_Locale PRIMARY KEY (LocaleId) ALTER TABLE Country ADD CONSTRAINT PK_Country PRIMARY KEY (CountryId) Note that this alter is non-destructive to the data.   Hope this helps.

    Read the article

  • How to handle status columns in designing tables

    - by altsyset
    How to handle multiple statuses for a table entry, for example an item table may have an active, inactive, fast moving, and/or batch statuses. And I wanted to handle them in single column with VARCHAR type. Also I might set each of those attributes as a boolean with different columns. But I am not sure what consequences this might lead to. So if you have experienced such situations which one would be the best way to handle it?

    Read the article

  • ruby super keyword

    - by ash34
    Hi, From what I understand, 'super' keyword invokes a method with the same name as the current method in the superclass of the current class. Below in the autoload method, there is a call to 'super'. I would like to know in which superclass I would find a method with the same name or what does the call to 'super' do module ActiveSupport module Autoload ... def autoload(const_name, path = @@at_path) full = [self.name, @@under_path, const_name.to_s, path].compact.join("::") location = path || Inflector.underscore(full) if @@eager_autoload @@autoloads[const_name] = location end super const_name, location end .... end end module ActiveRecord extend ActiveSupport::Autoload ... autoload :TestCase autoload :TestFixtures, 'active_record/fixtures' end This code is from the rails master branch. Thanks much.

    Read the article

  • NSLog(@"%@",super) crashing

    - by Chandan Shetty SP
    I used NSLog(@"%@",super) in a method(any method) and it is crashing.... Why? How to print the super contents? Updated : currentclassname : superClassName { } and also if i use NSLog(@"%@", [super description]); It is printing "<currentclassname: 0x3db7230>" instead of superClassName... It is expected to print superClassName right. Thanks in advance,

    Read the article

  • leiningen: missing super-pom

    - by Arthur Ulfeldt
    if I enable eith the clojure-couchdb or swank-clojure then lein deps fails because org.apache.maven:super-pom:jar:2.0 is missing :dependencies [[org.clojure/clojure "1.1.0-master-SNAPSHOT"] [org.clojure/clojure-contrib "1.0-SNAPSHOT"] [clojure-http-client "1.0.0-SNAPSHOT"] [org.apache.activemq/activemq-core "5.3.0"] ; [org.clojars.the-kenny/clojure-couchdb "0.1.3"] ; [org.clojure/swank-clojure "1.1.0"] ]) this error: Path to dependency: 1) org.apache.maven:super-pom:jar:2.0 2) org.clojure:swank-clojure:jar:1.1.0 ---------- 1 required artifact is missing. for artifact: org.apache.maven:super-pom:jar:2.0 from the specified remote repositories: clojars (http://clojars.org/repo/), clojure-snapshots (http://build.clojure.org/snapshots), central (http://repo1.maven.org/maven2) what is super-pom. why do these packages need it and where can I get it.

    Read the article

  • Accessing the "super of this" in Java

    - by gerdemb
    This is what I'm doing now. Is there a better way to access the super class? public class SearchWidget { private void addWishlistButton() { final SearchWidget thisWidget = this; button.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { // A better way to access the super class? // something like "this.super" ...? workWithWidget(thisWidget); } } } } I'm programming with Google Web Toolkit, but I think this is really a generic Java question.

    Read the article

  • Call super on private method

    - by opsb
    class A private def greet puts "hello!" end end class B < A def greet super end end B.new.greet # => Attempt to call private method because super isn't a method you can't use the usual send(:super). So how's it done?

    Read the article

  • super(type,subclass) in simple singleton implementation

    - by Tianchen Wu
    when I was implementing naive singleton in python, I came up with a problem with super key word. As usual the behavior of super is always tricky and buggy, hope someone can shed light on it. Thanks :) The problem is that: class Singleton(object): def __new__(cls,*args,**kw): if not hasattr(cls,'_instance'): #create a instance of type cls, origin=super(Singleton,Singleton).__new__(cls,*args,**kw) cls._instance=origin return cls._instance class B(Singleton): def __init__(self,b): self.b=b It actually works, but I am wondering Will it be better if I change line 5 to the below, like in most of the books? origin=super(Singleton,cls).__new__(cls,*args,**ks) what's the difference to make?

    Read the article

  • Excel 2007: "Format as Table" Increments Column Names

    - by Mark
    I love using the formatting styles for tables in Excel 2007, but in my data I'm using the same column name for multiple columns. When I format my table using the pre-defined styles, it automatically adds an incremental number to each subsequent column name which I don't want. Is there any way to stop this from happening? If I attempt to manually rename the column back to the original name, it automatically appends the incremented number.

    Read the article

  • Column break in word - continously

    - by Holian
    Masters, I need to PASTE my content in two different column in word. (I have 300 page of old content and 300 page of new content, i want to share my partners this information side by side to compare) I made two column and instert a column break, but i have to insert column break every page? How can i do this easier? Any way to insert column break continously, so i just need to copy&paste the contents into the columns? thank you

    Read the article

  • conditional formatting for subsequent rows or columns

    - by Trailokya Saikia
    I have data in a range of cells (say six columns and one hundred rows). The first four column contains data and the sixth column has a limiting value. For data in every row the limiting value is different. I have one hundred such rows. I am successfully using Conditional formatting (e.g. cells containing data less than limiting value in first five columns are made red) for 1st row. But how to copy this conditional formatting so that it is applicable for entire hundred rows with respective limiting values. I tried with format painter. But it retains the same source cell (here limiting value) for the purpose of conditional formatting in second and subsequent rows. So, now I am required to use conditional formatting for each row separately s

    Read the article

  • CSS Gridlines For Alternating Columns

    - by Michael
    I have created a table with 20 rows and 10 columns. I would like to create a gridline separating every two columns. So, between column 2 and 3 there would be a line separating them. There should also be lines separating columns 4 and 5, coulumns 6 and 7, and columns 8 and 9. But I do not want to have a line separating columns 1 and 2, or columns 3 and 4, etc. Is there any way to do this with CSS? I have tried creating a left border on each individual cell of the column, but it does not give me a solid line going down the column. Any help would be greatly appreciated.

    Read the article

  • dynamic Grid columns

    - by stck777
    Hi, I need help with dynamic columns in a DataGrid. I use GenericFrame front-end with PHP backend. If I use static columns like this: <? ... ?> <DataGrid id="DataGrid1" width="100%"> <columns> <DataGridColumn headerText="name" dataField="@username" width="150"/> <DataGridColumn headerText="Nahcname" dataField="@secondname" width="150"/> <DataGridColumn headerText="alter" dataField="@age" width="40"/> </columns> </DataGrid> <? ... ?> It is working fine. But I try to create the columns dynamic with PHP. <generic> <template target="gridbox"> <VBox id="dynamic" height="100%"> <!-- DataGrid --> <DataGrid id="DataGrid1" width="100%" > <columns> <?php $columns = array( //Spalte => (Breite, Datenfeld) "name" => array(150,"@username"), "Nahcname" => array(150,"@secondname"), "alter"=> array(40,"@age") ); foreach ($columns as $key => $value) { ?> <DataGridColumn headerText="<? echo $key; ?>" dataField="<? echo $value[0]; ?>" width="<? echo $value[0];?>"/> <?php } ?> </columns> </DataGrid> <Binding source="templatedata.data1.item" destination="DataGrid1.dataProvider" /> </VBox> </template> <templatedata> <data1> <!-- Daten --> <item username="User1" secondname="Nachname1" age="22"/> <item username="User2" secondname="Nachname2" age="25"/> <item username="User3" secondname="Nachname3" age="27"/> <item username="User4" secondname="Nachname4" age="32"/> </data1> </templatedata> The DataGrid is displayed correctly, but without data? any idea why?

    Read the article

  • nested columns in compass/sass

    - by corroded
    I've been studying compass and while it is a fun thing to play with and use, one thing bothers me(besides being unable to add padding as it wrecks the grid), how do I nest columns? I want to be able to do what blueprint does: nest containers like say, I have a 24-column page divided in two(17 and 7 columns). In the right part of that page(the one with 7 columns), I want to divided some elements into two(2 and 5 columns). I tried this: #main +container #main-content +column(17) +box-padding(17, 10px) :margin :right 0 #sidebar +column(7, true) +box-padding(7, 10px) That's the code for the main page. The sidebar contains a list with some labels and input fields li +container :margin :bottom 5px label +column(2) :margin :right 0 input +column(5, true) It kinda works, but inspecting the li in firebug shows that it's width is actually 950px as opposed to be just 270px since it is just 7 columns. I tried googling about nested columns but I can't seem to find any example in compass. I've also tried the wiki and the documentation to no avail.

    Read the article

  • Style Data in a gridview which dynamically generates the columns

    - by Coesy
    I have built a dynamic gridview using the following code grdVariants.Columns.Clear(); int i = 0; foreach (DataColumn column in options.Columns) { grdVariants.Columns.Add(new GridViewColumn { Header = column.ColumnName, DisplayMemberBinding = new Binding(string.Format("[{0}]", i++)) }); } This will dynamically generate my columns at runtime, I then bind the data using lstVariantsGrid.DataContext = options; lstVariantsGrid.Items.Refresh(); This all works great and shows the data in the correct columns etc, the only issue i have is that I can't style the rows like I would in xaml as it is all an unknown quantity until runtime. Can anyone offer some advice on how I might go about doing this? One of the biggest problems I have is that one of the columns needs to display the image rather than just the path which it currently shows, as well as fiddling with fonts and colors etc. Thanks for your time.

    Read the article

  • Side effects of reordering columns in PostgreSQL

    - by Summer
    I sometimes re-order the columns in my Postgres DB. Since Postgres can only add columns at the end of tables, I end up re-ordering by adding new columns at the end of the table, setting them equal to existing columns, and then dropping the original columns. My question is: what does PostgreSQL do with the memory that's freed by dropped columns? Does it automatically re-use the memory, so a single record consumes the same amount of space as it did beforehand? But that would require a re-write of the whole table, so to avoid that, does it just keep a bunch of blank space around in each record? Thanks! ~S

    Read the article

  • TDBGrid columns design time or run time?

    - by Mawg
    I am using TDBGrid for the first time. I didn't even notice the Columns property in the object inspector and everything went just fine: the grid was filled. Then I saw the Columns property and tried it. When I use the object insector to add items to the Columns property of the grid, they do not all of them show up at run time. To me, it looks like the FieldName property is important. It looks like it is correct, but there are no values in some columns. If I leave this property blank (no columns at all) it seems that the control populates it itself at run time and I do see all the columns. I could live with that. When I set column titles at run time it works, but setting column width does not.

    Read the article

  • Mac Excel 2011: find Items in one column that are not in another column

    - by robert-jakobson
    Hi this is a repeat of the question: Excel: Find Items in one column that are not in another column I have two columns in excel, and I want to find (preferably highlight) the items that are in column B, but not in column A. What's the quickest way to do this? However, the answer given below to in the above-menitoned thread no longer applies to Mac Excel 2011. E.g. there is no "name-a-range" option available on right click etc.. Therefore I am asking this again. Select the list in column A Right-Click and select Name a Range... Enter "ColumnToSearch" Click cell C1 Enter this formula: =MATCH(B1,ColumnToSearch,0) Drag the formula down for all items in B If the formula fails to find a match, it will be marked #N/A, otherwise it will be a number. If you'd like it to be TRUE for match and FALSE for no match, use this formula instead: =IF(ISNA(MATCH(B1,ColumnToSearch,0)),FALSE,TRUE) How should this answer be restated to apply to Mac Excel 2011?

    Read the article

  • Dynamic Grouping and Columns

    - by Tim Dexter
    Some good collaboration between myself and Kan Nishida (Oracle BIP Consulting) over at bipconsulting on a question that came in yesterday to an internal mailing list. Is there a way to allow columns to be place into a template dynamically? This would be similar to the Answers Column selector. A customer has said Crystal can do this and I am trying to see how BI Pub can do the same. Example: Report has Regions as a dimension in a table, they want the user to select a parameter that will insert either Units or Dollars without having to create multiple templates. Now whether Crystal can actually do it or not is another question, can Publisher? Yes we can! Kan took the first stab. His approach, was to allow to swap out columns in a table in the report. Some quick steps: 1. Create a parameter from BIP server UI 2. Declare the parameter in RTF template You can check this post to see how you can declare the parameter from the server. http://bipconsulting.blogspot.com/2010/02/how-to-pass-user-input-values-to-report.html 3. Use the parameter value to condition if a particular column needs to be displayed or not. You can use <?if@column:.....?> syntax for Column level IF condition. The if@column is covered in user documentation. This would allow a developer to create a report with the parameter or multiple parameters to allow the user to pick a column to be included in the report. I took a slightly different tack, with the mention of the column selector in the Answers report I took that to mean that the user wanted to select more of a dimensional column and then have the report recalculate all its totals and subtotals based on that selected column. This is a little bit more involved and involves some smart XSL and XPATH expressions, but still very doable. The user can select a column as a parameter, that is passed to the template rather than the query. The parameter value that is actually passed is the element name that you want to regroup the data by. Inside the template we then reference that parameter value in our for-each-group loop. That's where we need the trixy XSL/XPATH code to get the regrouping to happen. At this juncture, I need to hat tip to Klaus, for his article on dynamic sorting that he wrote back in 2006. I basically took his sorting code and applied it to the for-each loop. You can follow both of Kan's first two steps above i.e. Create a parameter from BIP server UI - this just needs to be based on a 'list' type list of value with name/value pairs e.g. Department/DEPARTMENT_NAME, Job/JOB_TITLE, etc. The user picks the 'friendly' value and the server passes the element name to the template. Declare the parameter in RTF template - been here before lots of times right? <?param@begin:group1;'"DEPARTMENT_NAME"'?> I have used a default value so that I can test the funtionality inside the template builder (notice the single and double quotes.) Next step is to use the template builder to build a re-grouped report layout. It does not matter if its hard coded right now; we will add in the dynamic piece next. Once you have a functioning template that is re-grouping correctly. Open up the for-each-group field and modify it to use the parameter: <?for-each-group:ROW;./*[name(.) = $group1]?> 'group1' is my grouping parameter, declared above. We need the XPATH expression to find the column in the XML structure we want to group that matches the one passed by the parameter. Its essentially looking through the data tree for a match. We can show the actual grouping value in the report output with a similar XPATH expression <?./*[name(.) = $group1]?> In my example, I took things a little further so that I could have a dynamic label for the parameter value. For instance if I am using MANAGER as the parameter I want to show: Manager: Tim Dexter My XML elements are readable e.g. DEPARTMENT_NAME. Its a simple case of replacing the underscore with a space and then 'initcapping' the result: <?xdoxslt:init_cap(translate($group1,'_',' '))?> With this in place, the user can now select a grouping column in the BIP report viewer and the layout will re-group the data and any calculations based on that column. I built a group above report but you could equally build the group left version to truly mimic the Answers column selector. If you are interested you can get an example report, sample data and layout template here. Of course, you can combine Klaus' dynamic sorting, Kan's conditional column approach and this dynamic grouping to build a real kick ass report for users that will keep them happy for hours..

    Read the article

  • Nautilus tags/labels/marks/columns for folders/files

    - by madox2
    Is there any way how to mark folders or files with tags(or labels, new columns or whatever) in Nautilus? It would be nice to sort marked folders or files through this tags. Especially my first idea was to mark folders in my Movie directory with tags seen, not seen, must see, and so on. Then I realized it would be useful in any other workspaces with any custom tags... Is there any nautilus extension for this? Or any other file manager which can do this? It might look like this:

    Read the article

  • How to Total Rows and Columns in a Word 2013 Table

    - by Lori Kaufman
    If you’re working in Word and you need to total values in a table, you can do so without having to enter the data into Excel and then copy and paste it into Word. Word can do simple calculations such as summing, multiplying, and averaging. NOTE: When you add new rows or columns of values to a table in Word, the formulas will not automatically update. To update a formula, right-click on the formula and choose Update Field from the popup menu. To enter a formula into a cell in a table, put the cursor in the cell and click the Layout tab under Table Tools.     

    Read the article

  • joomla 2.5 : list links to articles in 2 columns

    - by semyon
    I have a Joomla! 2.5 website, and I have to add a lightbox popup that will contain links to all articles from a specific category(+subs). If anyone can suggest all-in-one solution, that will be great! But generally I'm asking, how to list links to all articles from a specific category and its sub-categories in two/three columns? I know I can set Category blog View to output only article links, without full/introtext, but in this case links will all be in one column. I need at least two. A possibility of grouping article links by subcategory would be great as well (but this is the thing I can live without). How can this be done? I'm looking for: a standard way of configuring this Template override (I'm using T3 framework) Custom extension any other method ...

    Read the article

  • A Better Way To Extract Date From DateTime Columns [SQL Server]

    - by Gopinath
    Quite a long ago I wrote about a SQL Server programming tip on how to extract date part from a DATETIME column. The post discusses about using of T SQL function convert() to get date part. One of the readers of the post, tipped me about a better way of extracting date part and here is the SQL query he sent to us SELECT DateAdd(day, DateDiff(day, 0, getdate()), 0); In clean way this query trims off time part from the DATETIME value. I rate this solution better than the one I wrote long ago as this one does not depend on any string operations. According the commenter, this method is faster compared to the other. What do you say? Thanks Yamo This article titled,A Better Way To Extract Date From DateTime Columns [SQL Server], was originally published at Tech Dreams. Grab our rss feed or fan us on Facebook to get updates from us.

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >