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
  • 0 Votes
    3 Posts
    0 Views
    L
    Xiangyang Liu 刘向阳 wrote: Thanks to myself +5 for talking to yourself and for posting the solution - might help someone who is working on the same :) I are Troll :suss:
  • Records with default values

    mysql help
    13
    0 Votes
    13 Posts
    0 Views
    S
    This my help http://weblogs.sqlteam.com/jeffs/archive/2007/09/10/group-by-month-sql.aspx[^]
  • call function from stored procedure

    database tutorial
    5
    0 Votes
    5 Posts
    0 Views
    S
    SET @my_variable =SELECT dbo.my_function(@my_function_parameter)
  • Performance question

    question sharepoint performance
    5
    0 Votes
    5 Posts
    0 Views
    S
    I don't know what the performance would be like but your code seems a bit weired. Does table1 and table2 have any relationship(column[s]) in common? it seems to be you're going to end up with a cartesian product of some sort.
  • 0 Votes
    4 Posts
    0 Views
    C
    Okay I see what you mean... I have not had a big problem with this as I usually have no trailing characters. There might be a setting about trailing characters, but I cannot remember. Sorry I cannot help. djj
  • mysql metadata locks

    question java database mysql xml
    3
    0 Votes
    3 Posts
    0 Views
    P
    i am commiting the changes. i have also tried to unlock tables before alter but to no success. think i have to re-think the whole process.
  • Fulltext index in sqlserver 2008

    help database
    2
    0 Votes
    2 Posts
    0 Views
    L
    awadhendra tiwari wrote: I have problem where I have get list of all tables on which full text index can be applied with their key names. SELECT TC.[TABLE_SCHEMA] , TC.[TABLE_NAME] , CCU.[COLUMN_NAME] , TC.[CONSTRAINT_NAME] FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS TC JOIN INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE CCU ON TC.[CONSTRAINT_NAME] = CCU.[CONSTRAINT_NAME] WHERE TC.[CONSTRAINT_TYPE] = 'PRIMARY KEY' AND EXISTS ( SELECT * FROM INFORMATION_SCHEMA.COLUMNS C WHERE C.[TABLE_NAME] = TC.[TABLE_NAME] AND C.[DATA_TYPE] IN ( 'char', 'varchar', 'nchar', 'nvarchar', 'text', 'ntext', 'image', 'xml', 'varbinary', 'varbinary(max)' ) ) ORDER BY TC.[TABLE_NAME] awadhendra tiwari wrote: its urgent The people that visit this site do so in their spare time. Rushing would be inappropriate. I are Troll :suss:
  • 0 Votes
    4 Posts
    0 Views
    R
    But, why would you destroy SQL server 2000? ♫ 99 little bugs in the code, 99 bugs in the code We fix a bug, compile it again 101 little bugs in the code ♫
  • 0 Votes
    6 Posts
    0 Views
    R
    Big Joke ♫ 99 little bugs in the code, 99 bugs in the code We fix a bug, compile it again 101 little bugs in the code ♫
  • LINQTOSQL at runtime

    csharp question help database sql-server
    4
    0 Votes
    4 Posts
    0 Views
    D
    You cannot add new classes to your project at run-time. You need to write a program that creates classes dynamically, for example using CodeDom[^] or Emit[^] APIs of .NET. CodeProject has examples of using both these sets of APIs[^].
  • Read Lock a Table in SQL Server?

    database sql-server sysadmin question announcement
    7
    0 Votes
    7 Posts
    0 Views
    R
    hi, i want to use TABLOCKX lock on my table. i have used same query given in above post. but problem is lock does not get released after completion of transaction holding lock on table. hence another transaction keeps waiting. following are my 2 query i tried in query analyzer of sql server. Please help me... Query 1: BEGIN TRAN A SELECT * FROM alerts with (TABLOCKX, HOLDLOCK) declare @cnt bigint set @cnt = 1000000 print 'start time = '+cast(getdate() as varchar) while @cnt > 0 begin print 'Cnt = ' + cast(@cnt as varchar) set @cnt = @cnt - 1 end print 'end time = '+cast(getdate() as varchar) COMMIT TRAN A ----------------------------------------------------------------------------------- Query 2: BEGIN TRAN B print 'start time = '+cast(getdate() as varchar) SELECT * FROM alerts --with (TABLOCKX) print 'end time = '+cast(getdate() as varchar) COMMIT TRAN B Please let me know if i'm doing anything wrong. Thank in advance... Rajesh.
  • 0 Votes
    2 Posts
    0 Views
    I
    You are misunderstanding what Query Cost is. If you run any single query, the cost will always be 100%. If you run multiple queries, the total cost of all of the queries in the batch added together will equal 100%. The value is used to compare the relative cost of each query in the batch as the message says.
  • 0 Votes
    12 Posts
    0 Views
    J
    Perhaps you could use a different database.
  • Dealing with apostrophe in stored procedure

    database help
    8
    0 Votes
    8 Posts
    0 Views
    S
    Little Debugging.. CREATE PROCEDURE sp_GetEZQueryList ( @sUser AS nchar(500) , @sSupervisor AS char(1) , @sAllowed AS varchar(8000) ) AS IF @sSupervisor <> 'Y' SELECT EzqDateMod , EzqFlxID , EzqUserName , EzqName , EzqData , EzqDescrip FROM EZQuery WHERE ( EzqUserName = @sUser ) OR ( EzqUserName = 'SYSTEM' /*AND CAST(EzqFlxID AS varchar(10)) IN ( SELECT * FROM intlist_to_tbl WHERE(@sAllowed) ) */) ELSE SELECT EzqDateMod , EzqFlxID , EzqUserName , EzqName , EzqData , EzqDescrip FROM EZQuery GO exec sp_getezquerylist 'DO''SULLIVAN', 'N', '100' Executes fine, without the IN clase to look up The source of your issues appear to be in this function (I assume its a function based on the nomenclature) intlist_to_tbl. If intlist_to_tbl is really a function why are you sending that data to the db, and converting it instead of storing it in the db? Common sense is admitting there is cause and effect and that you can exert some control over what you understand.
  • 0 Votes
    4 Posts
    0 Views
    S
    T2102 wrote: I have gotten some pivots to work with arbitrary # of columns, but I've had to use dynamic sql. Yea if the columns before execution time are not known then you will need to resort to dynamic SQL. Common sense is admitting there is cause and effect and that you can exert some control over what you understand.
  • 0 Votes
    3 Posts
    0 Views
    S
    Do all MDX queries cause SSAS to crash? Or just the one you are trying to run? Common sense is admitting there is cause and effect and that you can exert some control over what you understand.
  • what is er of codeproject.com

    com question
    17
    0 Votes
    17 Posts
    0 Views
    S
    r.kh wrote: please send me the er of codeproject.com I assume by 'er' you really mean Entity-relationship model? Correct? There used to be a site similar in setup to Code Project (not written by Chris), not sure what ever happened with it though. You might go looking around the web development articles and find something interesting to learn from. Common sense is admitting there is cause and effect and that you can exert some control over what you understand.
  • The Network Adapter could not establish the connection

    java database com sysadmin help
    7
    0 Votes
    7 Posts
    0 Views
    L
    Maybe you should first check if the listener for the oracle database has started yet. Then the connection string.
  • .Net Reporting

    csharp question
    8
    0 Votes
    8 Posts
    0 Views
    T
    Here you go List of reporting software[^] BTW I'm worked/working in both SSRS(RDLC) & Crystal reports .... fine for me. thatraja **My Tip/Tricks My Dad had a Heart Attack on this day so don't... **
  • 0 Votes
    1 Posts
    1 Views
    No one has replied