Forum Replies Created

Viewing 15 posts - 1,411 through 1,425 (of 1,923 total)

  • RE: Two Temp Tables within a Proc

    Dan, as John mentioned, if you are using a WHILE Loop or CURSOR to iterate through your tables, and assuming your table is a heavy-set, then it is absoultely unavoidable...

  • RE: Help to understand CROSS JOIN

    Assume all your 3 tables has only one column.

    Values in Table RequestForServices:

    A1

    A2

    A3

    A4

    Values in Table ReferralSourceTypes:

    B1

    B2

    B3

    Values in Table SourceOfReferral

    A1

    A2

    So your following query :

    SELECT ClientNumber,CaseNumber,ReferralSourceTypes.ReferralSourceType,ReferralSourceTypes.ReferralSourceDesc FROM

    RequestForServices,ReferralSourceTypes

    will produce a Cartesian Product ...

  • RE: Add 2 columns in one sql statement

    You're welcome buddy 🙂

  • RE: list of indexes

    ~Edit: Wrong code at wrong place :sick:

  • RE: Add 2 columns in one sql statement

    Sachin, remove the "( )" from your code ;

    Sample code:

    create table #temp1

    (

    a int

    )

    select * From #temp1

    alter table #temp1 add b int , c int ;

    select * from #temp1

  • RE: Tricky substring

    Tim, will your string have only two facility IDs and 2 patient IDs always? Will the format of the string change from row to row..

    Please post us sample data...

  • RE: Tricky substring

    I sense the OP needs 4 columns out of the string, as in, FirstFacilityID ,FirstPatieintID, SecondFacilityID, SecondPatieintID ; these 4 columns will hold only intergers, stripped from the real string..

  • RE: substring value into variable

    My pleasureh helping you, welcome! 🙂

  • RE: auto number data tye

    To illustrate what Gail had said , here is a small sample code that will auto-increment a column using IDENTITY column; execute the code in your SQL Express ; follow...

  • RE: substring value into variable

    Ok, i get it.. Here is what you wanted (from what i understoood from your above post)

    First lets build a temp table to hold some data that looks similar to...

  • RE: substring value into variable

    Kavali, the request is quite unclear for me.. can you please put some visual samples of your request and its desired results?

    for starters, this might help you!

    DECLARE @SUB VARCHAR(2)

    SELECT @SUB...

  • RE: Auto Increment Alphabet

    Goodness me, i lost track of this thread and now i saw that this alpha-numbering is a huge swear-word dump-yard.. hmmm,as u said Jeff, it will invite lawsuits.. lets wait...

  • RE: select statement to display year

    sachinrshetty (6/1/2010)


    Thank u coldcoffee. I will try with your first logic as it seems to be simple and smaller.

    With Regards

    sachin

    More than simple and small, that code is highly-efficient for large...

  • RE: TSQL Return start/end price and start/end datetime by product name.

    hi there, here is one piece that might interest you! This is **NOT** the optimal solution for the problem, but for now, you can have this. The desired output can...

  • RE: Problem - Stored Pocedure

    You're welcome Subhro! 🙂

Viewing 15 posts - 1,411 through 1,425 (of 1,923 total)