Skip to content

Database

Discussions on database access, SQL, and ADO

This category can be followed from the open social web via the handle database@forum.codeproject.com

17.1k Topics 61.8k Posts
  • Creating column of type enum

    database sql-server sysadmin tutorial
    8
    0 Votes
    8 Posts
    0 Views
    J
    Quite right. I'm usually pushing normalization myself. "The ones who care enough to do it right care too much to compromise." Matthew Faithfull
  • Getting My Answers are Down voted many time …

    database help sql-server com sysadmin
    3
    0 Votes
    3 Posts
    1 Views
    L
    Looks like you got this one downvoted for posting in the wrong forum! Use the best guess
  • certain rows to column

    database sql-server sysadmin tutorial
    3
    0 Votes
    3 Posts
    0 Views
    R
    Thanks Mycroft - will give it a try tonight
  • 0 Votes
    2 Posts
    0 Views
    M
    Backup/restore on a new server, I'm pretty sure you can restore an older version into a current database. Not sure if the version range is too wide though. Unless you have a pressing need to update the code in your database. Never underestimate the power of human stupidity RAH
  • display booked dates in red color in calender

    graphics help learning
    6
    0 Votes
    6 Posts
    0 Views
    P
    is it possible to check e.Cell.ForeColor in if then ur problem may solve.. try it for example and u have store this booked dates in database ..use this link for help http://msdn.microsoft.com/en-us/library/ms228044(v=vs.90).aspx[^] protected void Calendar1_DayRender(object sender, DayRenderEventArgs e) { //do databse connectivity //run while loop store this fromdate and todate in two variable //do same thing as u have done to display in red fore if (e.Day.Date < DateTime.Today) { e.Day.IsSelectable = false; e.Cell.ForeColor = System.Drawing.Color.Gray; } else { if(e.Cell.ForeColor != System.Drawing.Color.Red) e.Cell.ForeColor = System.Drawing.Color.Green; } if (e.Day.Date >= FromDate && e.Day.Date <= ToDate) { e.Cell.ForeColor = System.Drawing.Color.Red; } }
  • Search in all tables for a given where condition

    tutorial database question
    2
    0 Votes
    2 Posts
    0 Views
    C
    Have a look at this article - it seems to do what you are looking for Search for a Value Throughout Your Database[^] It's well known that if all the cat videos and porn disappeared from the internet there would be only one site left and it would be called whereareallthecatvideosandporn.com
  • my sql code to sql

    database mysql csharp php sysadmin
    3
    0 Votes
    3 Posts
    0 Views
    B
    Aren't there any tools for migrating the data from MySQL to Microsoft SQL Server? That would be the easiest thing. You cannot just load the backup from MySQL into SQL Server: all table/column names are escaped with ` - SQL Server uses []. E.g. `user_details` => [user_details]. If the name does not contain spaces or is a reserved word, you could remove the quotes. And before loading the data into the table, you must do a SET IDENTITY_INSERT [user_details] ON (and switch it off afterwards). I'd also suggest to change the varchar into nvarchar: that safely allows for national characters.
  • SQL SERVER R2 set mode

    database sql-server sysadmin question
    3
    0 Votes
    3 Posts
    0 Views
    S
    There are two possible modes: Windows Authentication mode and mixed mode in SQLServer 2008 R2. Here, have a look at details here: MSDN: Choosing an Authentication Mode[^] MSDN: How to: Change Server Authentication Mode[^] Sandeep Mewara Microsoft ASP.NET MVP 2012 & 2013 [My Blog]: Sandeep Mewara's Tech Journal! [My Latest Article]: HTML5 Quick Start Web Application
  • what is the database connectivity

    database question
    3
    0 Votes
    3 Posts
    0 Views
    M
    I'm not sure what you mean, but... It's not "connectivity", it's JOIN[^] specification. Join hints specify that the query optimizer enforce a join strategy between two (or more) tables, based on a relationship between certain columns in these tables. In your example you have joined 3 tables on stateid and districtid fields. More: http://www.w3schools.com/sql/sql_join.asp[^]
  • DB Desing Check

    question database
    4
    0 Votes
    4 Posts
    0 Views
    L
    Yes, very true. Use the best guess
  • two phase commit in sql

    question database sql-server oracle sysadmin
    2
    0 Votes
    2 Posts
    0 Views
    M
    You need some google foo[^]. I will be interested to see if you get anyone experienced with this solution responding! Never underestimate the power of human stupidity RAH
  • SSRS

    career sql-server question
    2
    0 Votes
    2 Posts
    0 Views
    L
    See here[^]; although you will be lucky to pass an interview without some practical experience. Use the best guess
  • MS Sql normalization

    database question
    19
    0 Votes
    19 Posts
    0 Views
    P
    Yeah i guess so. Thanks for your time and input.
  • linked server

    database sysadmin question
    3
    0 Votes
    3 Posts
    0 Views
    R
    Very easy to do. Like this: USE[master] EXEC sp_addlinkedserver N'{computer}\{database}, N'SQL Server' Literally ...
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • 0 Votes
    4 Posts
    0 Views
    M
    Great design - what happens when you want to add a new check! You need to add the values of the 32 checks (presumably booleans where 1= positive) if it = 32 then the program passes andything els the program fails. Select * From (Select C1 + C2+C3+... as checktotal, Program from table) as SubQuery where checktotal = 32 Never underestimate the power of human stupidity RAH
  • Skeptical about Trigger!

    database help question
    12
    0 Votes
    12 Posts
    0 Views
    J
    One could get the impression that you don't like Mycroft. :laugh: "The ones who care enough to do it right care too much to compromise." Matthew Faithfull
  • Threading and insert/update issues.

    question database announcement
    7
    0 Votes
    7 Posts
    0 Views
    G
    Sounds good - I always revert to the old carving code in stone method when all else fails so I hope the mutex works:thumbsup: “That which can be asserted without evidence, can be dismissed without evidence.” ― Christopher Hitchens
  • Want to get data on weekly basis

    data-structures help
    6
    0 Votes
    6 Posts
    0 Views
    V
    SELECT DATEPART(YEAR,trans_date) AS 'Year',DATEPART(wk,trans_date) AS 'Week #',MIN(DATEADD(wk, DATEDIFF(wk,0,trans_date), 0)) AS 'Week date', SUM(COALESCE(debit,0)) AS 'Debits', SUM(COALESCE(credit,0)) AS 'Credits' FROM trans GROUP BY DATEPART(YEAR,trans_date),DATEPART(wk,trans_date)ORDER BY 1,2;
  • how did i add calender to my site

    3
    0 Votes
    3 Posts
    0 Views
    M
    ZZzaaaappp take a look on your desk you will find a brand new calendar in the burnt bit on the corner - just take it out to your site and nail it to the entrance. Your question makes as much sense as my response. Read the guide lines [^] and ask a sensible question in the correct forum (probably the ASP forum) Never underestimate the power of human stupidity RAH