Skip to content
Code Project
CODE PROJECT For Those Who Code

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
  • Case Sensitive User Name

    database sql-server sysadmin tutorial
    2
    0 Votes
    2 Posts
    1 Views
    L
    You're not the first to ask such question[^] ... :) Luc Pattyn [Forum Guidelines] [My Articles] The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
  • How to Concate more than one rows in one row ?.

    tutorial question
    2
    0 Votes
    2 Posts
    1 Views
    I
    Create Function to return the all names(seperated by comma) for a given code. Create FUNCTION [dbo].[GetNamesById] ( @code int ) RETURNS varchar(max) AS BEGIN declare @result varchar(max) select @result = COALESCE(@result + ',', '') + [name] from tblCode where code = @code return @result END GO now use following query: select code,dbo.GetNamesById(code) from tblCode group by code above query will give output as: Code name 50141 abc,pqr
  • DTS to Import .SQL file

    help database question
    5
    0 Votes
    5 Posts
    1 Views
    P
    Sorry, was just happy to have a solution didn't think of posting.... sqlcmd -U USERNAME -P PASSWORD -S SERVER -d DATABASE_NAME -i yourfile.sql Pop that into a bat file and execute from the DTS package as a win32 process, all I need to do now is return a true or false from the bat file and pass back to the DTS package to confirm failure or success. Probably sounds easier than it will be.... Paul.
  • Outer Join issues

    question
    8
    0 Votes
    8 Posts
    1 Views
    M
    I was sorta pressed for time so I physically merged the two tables on the database but I'll be certain to try it again next time! Thanks for the explanation though. But I thought Outer joins will return nulls because there was no corresponding columns that had a value (of course, now that I type this I remember that all this is row based). If the post was helpful, please vote, eh! Current activities: Book: Devils by Fyodor Dostoyevsky Project: Hospital Automation, final stage Learning: Image analysis, LINQ Now and forever, defiant to the end. What is Multiple Sclerosis[^]?
  • custom query

    database xml help
    3
    0 Votes
    3 Posts
    1 Views
    L
    don't understand. plz send codez ASAP to lazy@yahoo.in :) Luc Pattyn [Forum Guidelines] [My Articles] The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
  • LARGE database query

    database sql-server sysadmin sales help
    4
    0 Votes
    4 Posts
    1 Views
    M
    2 million records is not large in SQL server (although it may be in Access) so it has got to be your query. As suggested by others add some indexes and try optimising your query. Never underestimate the power of human stupidity RAH
  • FULL JOIN in Access 2003

    database help tutorial question
    7
    0 Votes
    7 Posts
    1 Views
    R
    Branislav Vidovic wrote: and inner join Of course - stupid of me to forget it. :) Regards David R --------------------------------------------------------------- "Every program eventually becomes rococo, and then rubble." - Alan Perlis
  • 0 Votes
    3 Posts
    2 Views
    A
    I will try to explain, in one db I have 3 tables, because I want to return data as quick as possible to web services, I design 1 table with all necessary columns. First design is without xml column, but number of rows will be at least 5x larger from design with xml column. One of the solution is that I return data, and in web services to deal with xml column. Second solution is that I return data filtered by xml attributes, or elements. One more quick response is goal. ___________________________ A.Petkovic B.Sc.Eng., MCSD, MCT
  • lost data base

    csharp database mcp question
    2
    0 Votes
    2 Posts
    1 Views
    S
    Hi, Do you have any backup files of your database? Don't know if your recycle bin contains a copy of the old file (does this work when replacing files?). Regards Sebastian It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.
  • Connection String

    database sql-server sysadmin
    2
    0 Votes
    2 Posts
    1 Views
    S
    Hi, System.Data.SqlClient can only be used for SQL server. System.Data.OleDb is built to access a wide variety of databases as it is build on top of ODBC (for details look here: http://en.wikipedia.org/wiki/OLE_DB[^]). I would suggest using the more common approach (ODBC or OleDB) as it gives you the opportunity to change your database provider without too much effects on your code. Regards Sebastian It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.
  • error:characters found after end of sql statement

    help database question
    2
    0 Votes
    2 Posts
    1 Views
    V
    Please Give us more info. Where are you using this query ? from your code or this is in the Storeprocedure. Give us more info so that we can help. Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.somee.com vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/
  • UDF, SPROC in SQL Server Express 2008

    database question csharp asp-net sql-server
    3
    0 Votes
    3 Posts
    1 Views
    D
    I didn't know that... I thought I had to execute. Thank you very much! I just tried and it worked great! Thanks, Dirso
  • Some sql server 2008 question

    question database sql-server sysadmin tools
    6
    0 Votes
    6 Posts
    1 Views
    L
    net start [Service] and net stop [Service] :)
  • foreign key

    database sql-server sysadmin tutorial
    2
    0 Votes
    2 Posts
    1 Views
    L
    I'm assuming that you're using "Microsoft SQL Server Management Studio"; * Rightclick on the table, choose "design" * Rightclick on any column in the newly opened window, choose "Relationships" * Click "Add" :) I are Troll :)
  • 0 Votes
    1 Posts
    1 Views
    No one has replied
  • Sql Joines

    database help
    2
    0 Votes
    2 Posts
    1 Views
    A
    Here is one of the Best Join article link from Code Project, This is totally visual representation of Join in SQL. Visual Representation of SQL Joins[^] This will clear your doubts on joins :-D Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article
  • To fetch the data from different tables

    3
    0 Votes
    3 Posts
    1 Views
    K
    What are the column names, and how does the data in the two tables link to each other? It looks like you are grabbing the first column of the first table and the second column of the second table, so if these are in a database and you are trying to pull the data it will look something like this: SELECT Table1Column1, Table2Column2 FROM Table 1 JOIN Table 2 ON Table1KeyColumn=Table2KeyColumn Is this what you were looking for?
  • Hiring home based workers (3171)

    csharp php question
    2
    0 Votes
    2 Posts
    0 Views
    A
    If you want to advertise pay for it, don't spam forums - and the jobs are a con anyway Bob Ashfield Consultants Ltd Proud to be a 2009 Code Project MVP
  • 0 Votes
    2 Posts
    1 Views
    V
    You want to tell me that you habe tried all the Google Solution http://www.google.co.za/search?q=ora-12528+tns+listener+all+appropriate+instances+are+blocking+new+connections&hl=en&start=10&sa=N[^] ? Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.somee.com vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/
  • 0 Votes
    9 Posts
    2 Views
    S
    I added an index to the record_id indicator with an alter table and now my original query returns in 0.58 seconds (db time) instead of ~400 seconds (db time) Guess this just goes shows me even more how crappy the self proclaimed coder/dba that designed this was, not that I didn't already know he was full of himself by looking at his code ;) -Spacix All your skynet questions[^] belong to solved