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
  • Return value from a stored procedure

    sharepoint database sales question
    4
    0 Votes
    4 Posts
    1 Views
    M
    Thanks
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • query needed to swap column values for duplicate

    database help
    6
    0 Votes
    6 Posts
    0 Views
    _
    True... :sigh: :laugh: I don't have ADHD, I have ADOS... Attention Deficit oooh SHINY!! Booger Mobile (n) - A bright green 1964 Ford Falcon - our entry into the Camp Quality esCarpade!! Do something wonderful - make a donation to Camp Quality today!!
  • Transposing rows and Columns in SQL

    database question
    2
    0 Votes
    2 Posts
    0 Views
    N
    Hi, This kind of problems are called Cross Tab Queries and can be solved easily using PIVOTING (a feature from SQL SERVER 2005+). Here is an example Pivots with Dynamic Columns in SQL Server 2005[^] You can even look into a) Cross-Tab reports in SQL Server 2005[^] b)Using PIVOT and UNPIVOT[^] In Sql Server 2000, Pivoting was achieved using Case along with an aggregate function. Look here Pivot Table Data in SQL Server 2000 and 2005[^] However, a few days back I gave a similar kind of answer in Bytes. U can have a look Month to month yearly results[^] Hope this helps :) Niladri Biswas
  • String search problem in SQL Server

    database sql-server sysadmin algorithms help
    5
    0 Votes
    5 Posts
    0 Views
    H
    i am searchin with CONTAINS keyword.
  • 0 Votes
    3 Posts
    0 Views
    G
    Hi Niladri Thanks for the article, it gives me a better understanding of Grouping and Rollup. I applied it by inserting Case Grouping on Payee and ClientName but still didn't yield the desired results. May be i don't grasp it quite clearly, but you see in the example in the article they had two columns (CustomerName and ItemName), so when grouping they just group by the two columns. In my case i have 10 columns and only have to summarise 3 columns (Payment, Accrual, CountMem) and group by Payee and ClientName only. Please help me out here.
  • 0 Votes
    2 Posts
    0 Views
    A
    Sounds like a homework question, but..... Take a look at SP_WHO and KILL, but be warned, you need admin (sa) rights to do a kill. Ashish Kumar Vyas wrote: run a process in a job. not sure what you mean here. Run some sql? run a stored proc? what? anyway, hopefully this will point you in the right direction. Bob Ashfield Consultants Ltd Proud to be a 2009 Code Project MVP
  • inserting multiple rows

    database tutorial
    14
    0 Votes
    14 Posts
    0 Views
    A
    pls explain i m sorry i didnt get wat u said .. pls
  • 0 Votes
    3 Posts
    0 Views
    J
    Thank you Ted, though I'm still confused about why in SQL Server Management Studio, it shows that it's pointing to the database under the VWD folder rather than the C:\ folder, and when I delete the files in the C:\ folder, I don't see them anymore in SQL Server Management Studio? :zzz:
  • How do I bulk insert a datastream online?

    question
    2
    0 Votes
    2 Posts
    0 Views
    T
    You may find examples already built using google, especially for yahoo stock data
  • Relational databases, XML, or OLAP?

    database performance xml question sql-server
    11
    0 Votes
    11 Posts
    0 Views
    J
    Thank you Ted, I'll give it a try and see how it goes. :)
  • comparing tables in SQL 2008

    database question regex
    2
    0 Votes
    2 Posts
    0 Views
    D
    Try something like this: select emailID,'Missing from B' from db_A.dbo.table1 where emailID not in (select emailID from db_B.dbo.table2) UNION select emailID,'Missing from A' from db_B.dbo.table2 where emailID not in (select emailID from db_A.dbo.table1) That should show you the differences.
  • Arrange database Column entries by ascending order. Pin

    database help question
    4
    0 Votes
    4 Posts
    0 Views
    J
    I have already inserted "EmpID" as 1,2,3,4,5,6,7,8,9,10,11,12. But when i see the column data of table, i found that the data is arranged like this: 1 10 11 12 3 4 5 6 7 8 9 Since, the data is already inserted in the above order, i found that in crystal report the same format is coming...but i want the order in exactly ascending order in report finally, if not possible in database. Can someone help me on this?
  • Display Message while using Stored procedure

    database
    7
    0 Votes
    7 Posts
    0 Views
    A
    Only through your client application. Bob Ashfield Consultants Ltd Proud to be a 2009 Code Project MVP
  • 0 Votes
    3 Posts
    0 Views
    D
    1. Aren't your 4 PC's on a single network? If they are, all you need is to set up your server to allow remote connections. Then all your PCs should be able to connect to your database. If they are not on same network, but all are connected to internet, still you can connect to your database. Here[^] is a link to help you. 2. I don't think the code would change. 50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
  • validate name with no space?

    database question
    2
    0 Votes
    2 Posts
    0 Views
    L
    I already answered your question in the other forum. Don't cross post. Please follow the post from there.
  • 0 Votes
    3 Posts
    0 Views
    F
    Hi Thanks för your answer. What do I have to do, to become in the dbo_role. And what is the msdb database, is that the master database. The database I'm using is in a remote server, so what can I than do to define full-text index or can't I. Fia
  • table normalization

    help learning
    8
    0 Votes
    8 Posts
    1 Views
    M
    Jörgen Andersson wrote: Composite indices can on the other hand under certain circumstances considerably speed up a query Ah but I was being derogetry about composite KEYS not indexes. Composite indexes are a basic tool for tuning a database, composite keys annoy me. Never underestimate the power of human stupidity RAH
  • Start records from Specific Number

    database question
    7
    0 Votes
    7 Posts
    0 Views
    L
    There is no known problem with using IDENTITY columns. It works well. If you want to really have 'big' numbers, use bigint datatype instead of int. The syntax remains the same.
  • SQL server not starting

    help database sysadmin sql-server com
    3
    0 Votes
    3 Posts
    0 Views
    P
    I had the same problem today. Found out that the error 0x2 = The specified service does not exist as an installed service. sc query 2 Only thing that I was able to do was to uninstall the database service then reinstall it.