Search Results

Search found 12215 results on 489 pages for 'identity column'.

Page 46/489 | < Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >

  • select row from table and substitute a field with one from another column if not null

    - by EarthMind
    I'm trying construct a PostgreSQL query that does the following but so far my efforts have been in vain. Problem: There are two tables: A and B. I'd like to select all columns from table A (having columns: id, name, description) and substitute the "A.name" column with the value of the column "B.title" from table B (having columns: id, table_A_id title, langcode) where B.table_A_id is 5 and B.langcode is "nl" (if there are any rows). I've tried using a CASE and COALESCE() but failed due to my inexperience with both concepts. Thanks in advance.

    Read the article

  • Deserialization of a DataSet... deal with column name changes? how to migrate data from one column to another?

    - by Brian Kennedy
    So, we wanted to slightly generalize a couple columns in our typed dataset... basically dropped a foreign key constraint and then wanted to change a couple column names to better reflect their new state. All that is easy. The problem is that our users may have serialized out the old version of the DataSet as XML. We want to be able to read those old XML files and deserialize them into the revised DataSet. It seems that would be a fairly common desire... but I haven't yet figured out the right thing to search the internet for. One possible solution would seem to be some way to give a DataColumn an alias or alternate name such that when it reads the old column name, it knows that data can be read into the column with the new column name. I can find no support for any such thing. Another approach would seem to be an "after deserialization" method of some sort... so, I would let it read in the old column values into a normal DataColumn with that name, and then in the "after deserialization" method I would just move the data from the obsolete column into the new column, and then delete the old columns. That would seem to generalize to many other situations... and having such events or hooks is pretty common in ADO.NET. But I have looked for such a hook and haven't yet found it. If no "after deserialization" hook, it would seem I ought to be able to override ReadXml or ReadXmlSerializable methods to call the base and then do my "after" stuff to fix up old data into new. But it does not appear that is possible. Soooo, I have to think backward compatibility with old serialized DataSets and simple data migration would be a well-solved problem... so, trying to reinvent that wheel seems silly. But so far, I haven't seemed to find any documentation on doing those things. Suggestions? What is best practice for this?

    Read the article

  • Rename INDEX Column

    - by Lee
    Hey All I have a database with around 40 tables and need to rename every index column. IE USER a table has a bunch of fields like user_id | user_username | user_password | etc... I want to rename the ID columns just to id ie id | user_username | user_password | etc... But I keep getting mysql errors on the alter table command ie. ALTER TABLE database RENAME COLUMN user_id to id; Plus many different variations. Whats the best way to do this ? Hope you can advise

    Read the article

  • multiline column in data grid view. using c#

    - by syedsaleemss
    Im using c# .net windows form application. i have a datagrid view. It has two columns.I need to make all the cells on the second column as to have multiple line. i.e a multiline column. I will edit something in a cell and press enter key. the cursor should reach the next line in the same cell. It should not go to the next cell. What should i do?

    Read the article

  • living column in instruments

    - by dubbeat
    In the context of allocations what exactly does the living column mean? Does it mean the number of times an object was created or does it mean how many instances of an object there is? I ask because I'm testing going in and out of a view. When I enter the view I create a class "myClass". When I exit the view I nil "myClass" and release it. If I go in and out of the view 6 times for example the living column in instruments for "myClass" says 6. Is this normal or is it not being released properly?

    Read the article

  • SSIS - user variable used in derived column transform is not available - in some cases

    - by soo
    Unfortunately I don't have a repro for my issue, but I thought I would try to describe it in case it sounds familiar to someone... I am using SSIS 2005, SP2. My package has a package-scope user variable - let's call it user_var first step in the control flow is an Execute SQL task which runs a stored procedure. All that SP does is insert a record in a SQL table (with an identity column) and then go back and get the max ID value. The Execute SQL task saves this output into user_var the control flow then has a Data Flow Task - it goes and gets some source data, has a derived column which sets a column called run_id to user_var - and saves the data to a SQL destination In most cases (this template is used for many packages, running every day) this all works great. All of the destination records created get set with a correct run_id. However, in some cases, there is a set of the destination data that does not get run_id equal to user_var, but instead gets a value of 0 (0 is the default value for user_var). I have 2 instances where this has happened, but I can't make it happen. In both cases, it was just less that 10,000 records that have run_id = 0. Since SSIS writes data out in 10,000 record blocks, this really makes me think that, for the first set of data written out, user_var was not yet set. Then, after that first block, for the rest of the data, run_id is set to a correct value. But control passed on to my data flow from the Execute SQL task - it would have seemed reasonable to me that it wouldn't go on until the SP has completed and user_var is set. Maybe it just runs the SP, but doesn't wait for it to complete? In both cases where this has happened there seemed to be a few packages hitting the table to get a new user_var at about the same time. And in both cases lots of data was written (40 million rows, 60 million rows) - my thinking is that that means the writes were happening for a while. Sorry to be both long-winded AND vague. A winning combination! Does this sound familiar to anyone? Thanks.

    Read the article

  • Search for string within text column in MySQL

    - by user94154
    I have mysql table that has a column that stores xml as a string. I need to find all tuples where the xml column contains a given string of 6 characters. Nothing else matters--all I need to know is if this 6 character string is there or not. So it probably doesn't matter that the text is formatted as xml. Question: how can I search within mysql? ie SELECT * FROM items WHERE items.xml [contains the text '123456'] Is there a way I can use the LIKE operator to do this? Thanks

    Read the article

  • SQL: How to use a column that was just added

    - by sbenderli
    I am trying to add 2 columns and then I would like to set some values to them but I get a compile-error saying the column does not exist. I am using the following script: IF NOT EXISTS (select column_name from INFORMATION_SCHEMA.columns where table_name = 'SYSTM_FRM' and column_name = 'SF_Ip_TXT') ALTER TABLE SYSTM_FRM add SF_Ip_TXT NVARCHAR(20) IF NOT EXISTS (select column_name from INFORMATION_SCHEMA.columns where table_name = 'SYSTM_FRM' and column_name = 'SF_Port_NUM') ALTER TABLE SYSTM_FRM add SF_Port_NUM int Update dbo.SYSTM_FRM SET dbo.SYSTM_FRM.SF_Ip_TXT = dbo.FRM.FRM_Ip_TXT, dbo.SYSTM_FRM.SF_Port_NUM = dbo.FRM.FRM_Port_NUM FROM dbo.FRM INNER JOIN dbo.SYSTM_FRM ON dbo.FRM.FRM_RCRD_NUM = dbo.SYSTM_FRM.SF_FrameRecord_NUM Is there any way to use a column that I am adding in the same script?

    Read the article

  • adding count( ) column on each row

    - by Arsenal
    I'm not sure if this is even a good question or not. I have a complex query with lot's of unions that searches multiple tables for a certain keyword (user input). All tables in which there is searched are related to the table book. There is paging on the resultset using LIMIT, so there's always a maximum of 10 results that get withdrawn. I want an extra column in the resultset displaying the total amount of results found however. I do not want to do this using a seperate query. Is it possible to add a count() column to the resultset that counts every result found? the output would look like this: ID Title Author Count(...) 1 book_1 auth_1 23 2 book_2 auth_2 23 4 book_4 auth_.. 23 ... Thanks!

    Read the article

  • 2 Column Layout - Main Link Display

    - by Allyson Aguilar
    I have a basic HTML page with a 2 column layout. I created a menu page on the sidebar column and when a link is chosen from the menu I want to display it in the main section of the index.html page. I tried doing this with iframes but its basically creating a duplicate of the index page. Help! I guess I can't post a picture because I'm new to this but I basically have an index page and then a farm with a duplicate of my index page.

    Read the article

  • MySQL column names and aliases

    - by user329820
    hi, I have read that after select we use column-names but I have found a statement that was like this: SELECT 'A' FROM T WHERE A = NULL; would you lease help me? thanks (A is a column- name here?) my DBMS is MySQL EDITED : the exact question is this that: Will the above statement produce a row (select all that apply)? Notice that ANSI_NULLS is OFF. I want to know that the above statement will work? because some of you said that we should write IS NULL instead of =null

    Read the article

  • SQL Check Constraint cannot reference other column

    - by user1777711
    I trying to add this sql check in ALTER TABLE School add Role check_role CHECK (check_role IN ('Teaching Assistant', 'Lecturer', 'Professor')); I get the error below ERROR at line 3: ORA-02438: Column check constraint cannot reference other columns SQL> desc School; Name Null? Type ----------------------------------------- -------- ---------------------------- STAFFNUM NOT NULL VARCHAR2(12) NAME NOT NULL VARCHAR2(50) ADDRESS NOT NULL VARCHAR2(300) DOB DATE I am trying add a column call Role, with the check constraint check_role I am using Oracle SQL. Thanks for all help!

    Read the article

  • Changing populated DataTable column data types

    - by TonE
    Hi, I have a System.Data.DataTable which is populated by reading a CSV file which sets the datatype of each column to string. I want to append the contents of the DataTable to an existing database table - currently this is done using SqlBulkCopy with the DataTable as the source. However, the column data types of the DataTable need to be changed to match the schema of the target database table, handling null values. I am not very familiar with ADO.NET so have been search for a clean way of doing this? Thanks.

    Read the article

  • Outer select column value in joined subquery?

    - by Michael DePetrillo
    Is it possible to use a column value from an outer select within a joined subquery? SELECT table1.id, table2.cnt FROM table1 LEFT JOIN (SELECT COUNT(*) as `cnt` FROM table2 where table2.lt > table1.lt and table2.rt < table1.rt) as table2 ON 1; This results in "Unknown column 'table1.lt' in 'where clause'". Here is the db dump. CREATE TABLE IF NOT EXISTS `table1` ( `id` int(1) NOT NULL, `lt` int(1) NOT NULL, `rt` int(4) NOT NULL) ENGINE=MyISAM DEFAULT CHARSET=latin1; CREATE TABLE IF NOT EXISTS `table2` ( `id` int(1) NOT NULL, `lt` int(1) NOT NULL, `rt` int(4) NOT NULL) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO `table1` (`id`, `lt`, `rt`) VALUES (1, 1, 4); INSERT INTO `table2` (`id`, `lt`, `rt`) VALUES (2, 2, 3);

    Read the article

  • FIM 2010 GAL MA - It appears this forest is not exchange enabled.

    - by WooYek
    I am trying to configure a Management Agent (MA) for Global Address List (GAL) sync in FIM 2010. I cannot move to the next step from "Configure GAL" because of an error message saying "It appears this forest is not exchange enabled". Nothing I change on "Configure GAL" step is changing this behavior. I'am configuring a standalone test lab. I have a Windows 2008 R2 x64 Server, promoted to a DC and SQL 2008 SP1 installed, DNS is also running locally. I have tried to install Exchange 2010 and 2007, but there is no difference. AD MA works fine. Any ideas what did I screw up?

    Read the article

  • ADFS 2.1 proxy trust establishment error

    - by Tommy Jakobsen
    I'm trying to install an ADFS proxy. In our intranet we have a ADFS 2.1 server running on Windows 2012 which is working fine. Now we're trying to deploy a proxy to this one for internet access, using Windows 2012 R2's Web Application Proxy. I'm getting the following error on the proxy server, event ID 393: Message : An error occurred while attempting to establish a trust relationship with the Federation Server. An error occurred when attempting to establish a trust relationship with the federation service. Error: Forbidden Context : DeploymentTask Status : Error I'm not getting any errors on the ADFS server. I've tried with different credentials. The ADFS service account, a domain administrator who is a member of the local administrators group on the ADFs server, and the local administrator account on the ADFS server. Same error message. Both port 80 and 443 is accessible from the proxy server to the internal ADFS server, and I can access the ADFS metadata endpoint from the proxy server. I'm using the same trusted SSL certificate (wildcard) on both machines. Do you have any ideas that can help me troubleshoot this problem?

    Read the article

  • What are industry standards and professional best practices in network hosts naming? [closed]

    - by Ivan
    Possible Duplicate: Naming convention for computers It seems an important and difficult dilemma for me how to name network hosts (routers, servers (while a server can be a router and host diverse services at the same time), virtual machines (while they host important services and can migrate), workstations and notebooks (using pc-username is not the best idea as users may change), printers & MFUs, surveillance IP cameras, etc). Are there known and accepted best practices for this task? Excuse me if there already was a similar question here (I think it probably was), I haven't found it.

    Read the article

  • MAC and IP adress text-identicon as avatar

    - by rubo77
    I would like to create something like identicons but not with images but with a unique word for each IP-Adresses and MAC-Adresses. create an easy to remember alias for a mac address, that is unique and reverse lookupable, for example: IP 123.456.789.132 will result in an alias for that IP, that is connected to an existing word from a wordlist, that is unique. Background of this idea: this way we could identify our Routers in our Opennet in Hamburg easily in a graphical NodeGraph. Is there some site already, where I can convert MAC-Adresses to unique human readeable words?

    Read the article

  • Facing error: "Could not open a connection to your authentication agent."; trying to add ssh-key.

    - by Kaustubh P
    I use ubuntu server 10.04. ssh-add /foo/cert.pem gave the following output Could not open a connection to your authentication agent. These are my running processes: ps -aux | grep ssh Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html root 1523 0.0 0.0 49260 632 ? Ss Dec25 0:00 /usr/sbin/sshd root 10023 0.0 0.3 141304 6012 ? Ss 12:58 0:00 sshd: padmin [priv] padmin 10117 0.0 0.1 141304 2400 ? S 12:58 0:00 sshd: padmin@pts/1 padmin 11867 0.0 0.0 7628 964 pts/1 S+ 13:06 0:00 grep --color=auto ssh root 31041 0.0 0.3 141264 5884 ? Ss 11:24 0:00 sshd: padmin [priv] padmin 31138 0.0 0.1 141264 2312 ? S 11:25 0:00 sshd: padmin@pts/0 root 31382 0.0 0.3 139240 5844 ? Ss 11:26 0:00 sshd: padmin [priv] padmin 31475 0.0 0.1 139372 2488 ? S 11:27 0:00 sshd: padmin@notty padmin 31476 0.0 0.0 12468 964 ? Ss 11:27 0:00 /usr/lib/openssh/sftp-server These are my environment variables: $ env | grep SSH SSH_CLIENT=192.168.1.13 42626 22 SSH_TTY=/dev/pts/1 SSH_CONNECTION=192.168.1.13 42626 192.168.1.2 22 What is wrong? Why cant I add any identities? Thanks.

    Read the article

  • How do I tell if there are unwanted remote guests on my computer? [closed]

    - by WckdMsftsGrl
    Possible Duplicate: What to do if my computer is infected by a virus or a malware? Why do I always find the strangest programs and the strangest text files all the time? All kinds of weird things happen, like my screen changes and the address line doesn't change in IE, just weird stuff. Is it me or could there really be something going on? I've never had so much trouble with any computer before and I am on a public access point where I live. Any advice will be greatly appreciated. I either need peace of mind, or a good defence, because this is getting out of hand.

    Read the article

  • July, the 31 Days of SQL Server DMO’s – Day 28 (sys.dm_db_stats_properties)

    - by Tamarick Hill
    The sys.dm_db_stats_properties Dynamic Management Function returns information about the statistics that are currently on your database objects. This function takes two parameters, an object_id and a stats_id. Let’s have a look at the result set from this function against the AdventureWorks2012.Sales.SalesOrderHeader table. To obtain the object_id and stats_id I will use a CROSS APPLY with the sys.stats system table. SELECT sp.* FROM sys.stats s CROSS APPLY sys.dm_db_stats_properties(s.object_id, s.Stats_id) sp WHERE sp.object_id = object_id('Sales.SalesOrderHeader') The first two columns returned by this function are the object_id and the stats_id columns. The next column, ‘last_updated’, gives you the date and the time that a particular statistic was last updated. The next column, ‘rows’, gives you the total number of rows in the table as of the last statistic update date. The ‘rows_sampled’ column gives you the number of rows that were sampled to create the statistic. The ‘steps’ column represents the number of specific value ranges from the statistic histogram. The ‘unfiltered_rows’ column represents the number of rows before any filters are applied. If a particular statistic is not filtered, the ‘unfiltered_rows’ column will always equal the ‘rows’ column. Lastly we have the ‘modification_counter’ column which represents the number of modification to the leading column in a given statistic since the last time the statistic was updated. Probably the most important column from this Dynamic Management Function is the ‘last_updated’ column. You want to always ensure that you have accurate and updated statistics on your database objects. Accurate statistics are vital for the query optimizer to generate efficient and reliable query execution plans. Without accurate and updated statistics, the performance of your SQL Server would likely suffer. For more information about this Dynamic Management Function, please see the below Books Online link: http://msdn.microsoft.com/en-us/library/jj553546.aspx Folllow me on Twitter @PrimeTimeDBA

    Read the article

  • SQL SERVER – Validating Unique Columnname Across Whole Database

    - by pinaldave
    I sometimes come across very strange requirements and often I do not receive a proper explanation of the same. Here is the one of those examples. Asker: “Our business requirement is when we add new column we want it unique across current database.” Pinal: “Why do you have such requirement?” Asker: “Do you know the solution?” Pinal: “Sure I can come up with the answer but it will help me to come up with an optimal answer if I know the business need.” Asker: “Thanks – what will be the answer in that case.” Pinal: “Honestly I am just curious about the reason why you need your column name to be unique across database.” (Silence) Pinal: “Alright – here is the answer – I guess you do not want to tell me reason.” Option 1: Check if Column Exists in Current Database IF EXISTS (  SELECT * FROM sys.columns WHERE Name = N'NameofColumn') BEGIN SELECT 'Column Exists' -- add other logic END ELSE BEGIN SELECT 'Column Does NOT Exists' -- add other logic END Option 2: Check if Column Exists in Current Database in Specific Table IF EXISTS (  SELECT * FROM sys.columns WHERE Name = N'NameofColumn' AND OBJECT_ID = OBJECT_ID(N'tableName')) BEGIN SELECT 'Column Exists' -- add other logic END ELSE BEGIN SELECT 'Column Does NOT Exists' -- add other logic END I guess user did not want to share the reason why he had a unique requirement of having column name unique across databases. Here is my question back to you – have you faced a similar situation ever where you needed unique column name across a database. If not, can you guess what could be the reason for this kind of requirement?  Additional Reference: SQL SERVER – Query to Find Column From All Tables of Database Reference: Pinal Dave (http://blog.SQLAuthority.com) Filed under: PostADay, SQL, SQL Authority, SQL Query, SQL Server, SQL System Table, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • finding numbers of days between two date to make a dynamic columns

    - by Chandradyani
    Dear all, I have a select query that currently produces the following results: DoctorName Team 1 2 3 4 5 6 7 ... 31 Visited dr. As   A                             x    x ...      2 times dr. Sc   A                          x          ...      1 times dr. Gh   B                                  x ...      1 times dr. Nd   C                                     ... x    1 times Using the following query: DECLARE @startDate = '1/1/2010', @enddate = '1/31/2010' SELECT d.doctorname, t.teamname, MAX(CASE WHEN ca.visitdate = 1 THEN 'x' ELSE NULL END) AS 1, MAX(CASE WHEN ca.visitdate = 2 THEN 'x' ELSE NULL END) AS 2, MAX(CASE WHEN ca.visitdate = 3 THEN 'x' ELSE NULL END) AS 3, ... MAX(CASE WHEN ca.visitdate = 31 THEN 'x' ELSE NULL END) AS 31, COUNT(*) AS visited FROM CACTIVITY ca JOIN DOCTOR d ON d.id = ca.doctorid JOIN TEAM t ON t.id = ca.teamid WHERE ca.visitdate BETWEEN @startdate AND @enddate GROUP BY d.doctorname, t.teamname the problem is I want to make the column of date are dynamic for example if ca.visitdate BETWEEN '2/1/2012' AND '2/29/2012' so the result will be : DoctorName Team 1 2 3 4 5 6 7 ... 29 Visited dr. As   A                             x    x ...      2 times dr. Sc   A                          x          ...      1 times dr. Gh   B                                  x ...      1 times dr. Nd   C                                     ... x    1 times Can somebody help me how to get numbers of days between two date and help me revised the query so it can looping MAX(CASE WHEN ca.visitdate = 1 THEN 'x' ELSE NULL END) AS 1 as many as numbers of days? Please please

    Read the article

< Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >