Forum Replies Created

Viewing 15 posts - 1 through 15 (of 16 total)

  • RE: COUNT_BIG

    Hi,

    I. SELECT COUNT_BIG(*)

    II. SELECT COUNT_BIG(column_2)

    III. SELECT COUNT_BIG(ALL column_2)

    IV. SELECT COUNT_BIG(DISTINCT column_2)

    I Answered this question selecting II,III and IV (which actually is a correct answer) guess what i was indicated as...

  • RE: Error in Single Record, Msg 3624 m_offBeginVar < m_SizeRec

    Hi,

    I am executing a stored procedure and i encountered the following error :

    Server: Msg 3624, Level 20, State 1, Line 1

    Location: recbase.cpp:1375

    Expression: m_offBeginVar < m_SizeRec

    SPID: 63

    Process ID: 688

    Connection...

  • RE: Finding count in a resultset

    Hi I went on to add one more record to the table 'TableTest' as under:

    TestID UserID

    1 26

    and wrote...

  • RE: To get next working date for the given date...

    Hi,

    to get the next working day after the immediate sat,sun you can use the following query:

    Declare @dDate as datetime

    set @dDate = '30 may 2008'

    select case datepart(dw,cast(@dDate as datetime)+1)

    when 1...

  • RE: syntax error while converting varchar value to int

    HI RAHUL FOLLOWING FUNCTION SHOULD SOLVE YOUR PROBLEM

    ---------------FUNCTION START

    CREATE FUNCTION dbo.fn_aviSplit(@vNumber varchar(50))

    RETURNS @MyTable TABLE

    (

    Number int

    )

    AS

    BEGIN

    DECLARE @vNumberDump varchar(50),

    @vChar varchar(50),

    @iCommaPos int,

    @iPos int,

    @iEndPos INT

    SET @iPos = 1

    WHILE (len(@vNumber)>0)

    BEGIN

    SET @iCommaPos...

  • RE: syntax error while converting varchar value to int

    Hi Rahul,

    I think the solution of your problem lies in the following function :

    ----------- STARTING OF FUNCTION

    CREATE FUNCTION dbo.fn_aviSplit(@vNumber varchar(50))

    RETURNS @MyTable TABLE

    (

    Number int

    )

    AS

    BEGIN

    DECLARE @vNumberDump varchar(50),

    @vChar...

  • RE: Record Insertion Problem

    Hi Anup,

    I would suggest you try increasing the size of the parameter from 15 to any greater value having sufficient difference say 50 or 100.

    Hope this would help,

    Regards

    Avaneesh Bajoria

  • RE: update stmt in Function?

    Hi,

    None of the DML statements can be used in a User Defined Function(UDF)

    Hence the update being one of them fails.

    Regards

    Avaneesh Bajoria.

  • RE: Temp Table Comparison SQL

    Hi,

    you can try out the following queries:

    select * from A where A.col1 not in

    (select A.Col1, from Table A, Table B where A.col1=B.col1)-- This will fetch common results in both the...

  • RE: write the query in different way / plz help

    Hi,

    One solution to the problem can be :

    select teachid,stds from(

    select t.teacherid as teachID,count(s.teacherid) as Stds from teacher t

    left outer join student s on t.teacherid = s.teacherid

    group by t.teacherid) as...

  • RE: Save the Result Of a sql server express query to a text file from sql server express not from command prompt

    Hi,

    to save the result to a text file, you can simple right click on the results pane in query analyser and save dialog box pops up then save it as...

  • RE: How to run tsql query every 15 minutes

    Hi,

    The best and most flawless solutions is to make a job. 🙂

    Regards

    Take Care

    Avaneesh.

  • RE: doubts on procedures

    Hi,

    I think you need to insert the following lines as well

    Dim tables As New DataTable("inuse")

    dim adap as new sqldataadapter

    *comm is sqlcommand

    comm.Connection = con

    ...

  • RE: create table as select

    Hi,

    you can make use of temporary table as follows:

    select * into #TempTable from SourceTable

    Regards,

    Avaneesh.

  • RE: How to determine if the database is a master, model, msdb using DMO or programatically

    Hi,

    You can use the following query :

    USE Master

    select * from sysdatabases

    to identify the current set of databases exiting on your sql server..

    Rgds

    Avaneesh.

    "The severity of itch is inversely proportional to...

Viewing 15 posts - 1 through 15 (of 16 total)