Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by kingstonr

  1. kingstonr

    select query with rows into columns.

    Hi, I am having my query result like below. ID PID Pname Class ---------------------------- 1 P1 Pname Class1 1 P1 Pname Class2 1 P1 Pname Class3 Now I want that three rows into one row like below ID PID Pname Class1 Class2 Class3...
  2. kingstonr

    Sql combining two tables.

    Thanks George. Borissov in my case Name is unique.
  3. kingstonr

    Sql combining two tables.

    HI, I Have two tables table1 and table2 Table1 -------- id Name 1 Test1 Table 2 -------- id Name 1 Test2 I need the result like below Table1id Table2id Table1name Table2name 1 2 Test1 Test2 Can anybody help me in this. Thanks Kingston
  4. kingstonr

    Help with sql string execution.

    HI, In my application I am sending string to sqlserver for the columns to update.but the proceduare will substitute the value for the column. for ex like below. I am sending string with column name and the varibale to refer in sqlserver for value(@columnstoupdate) And I want the values to be...
  5. kingstonr

    T-SQL Help

    I want to query a table like below. The parameter @classval will have any class value I want to do a T-sql for that. Can anyb ody help me out what will be efficient way to do that. Thought of doing some function with split but it performance is slow. declare @classval='Test1=2;Test3=1' class...
  6. kingstonr

    SImple query help

    HI, if I pass fname then query should return only that condition,If null it should return all records. declare @fname as nvarchar(10) set @fname=null select * from emp where fname=@fname or @fname=null(Expected It will return all records but it returns 0 records) I tried another approach...
  7. kingstonr

    optimize query

    folks, In my following query I am using Table called vwrampositions which has millions of rows. In my query after doing the join conditions and finally I am giving the where condition with date.so its doing all the join condition with millions of row and finally comes into where condition and...
  8. kingstonr

    simple rounding help.

    hi, i am gettung value as 14493.48000000000 I want to round to 2 decimals and take upto only 3 decimals.i need 14493.480 when i use round select round(14493.48000000000,3) i am getting 14493.48000000000.Can anybody help me how to remove values other than 3 decimals. I want 14493.480 Thanks...
  9. kingstonr

    XML update in c#

    HI, I am loading the below xml in dom documnet <x:PivotTable> <x:OWCVersion>11.0.0.6555</x:OWCVersion> <x:DisplayScreenTips /> <x:NoAutoFit /> <x:Height>376</x:Height> <x:Width>1278</x:Width> <x:CubeProvider>msolap.2</x:CubeProvider> <x:CacheDetails />...
  10. kingstonr

    ADODB in c#

    Folks, In one of my requirement I have to use ADODB(since I need old method recordset)in c#.I am trying to execute stored proc I don't know how to pass parameters from c# to adodb can anyone help me. rs=cmd.execute(out object recordsaffected,ref object parameters,int options) can somebody...
  11. kingstonr

    VB class in C#

    Folks, I am working ion c# proj.In that I am using Microsoft office pivot table.For databing to pivot table I am planing to use older ADODB.(which makes easier).ANy body know the way where I can have a vb class in the same C# project which will return a string to my c#class.I am using .net 2.0
  12. kingstonr

    Update result set

    They are in temporay Table. Both resultset are created separately. Now I have Two resultset.one in commontable expression. other in #temp table. Now I want to merge two results. CTE resultset has id pdate 1 2/30/2006 #temp table has id pdate 1 null. Now I want update #temp table null...
  13. kingstonr

    Update result set

    HI, I have two resultset one result set is below id pdate 1 2006-12-30 another temptable resultset id pdate 1 null I want to update the temptable pdate from the previous resultsset where the result is holded in CTE. i.e update the temptable pdate with value 2006-12-30. can somebody...
  14. kingstonr

    Taking max value

    HI, select ROW_NUMBER() OVER (PARTITION BY Secid ORDER BY secid, PriceDate desc, price) AS 'RowNumber',* from ( select secid, PriceSource, RefPriceSource, PriceDate, Price, Dense_Rank() over (Partition by...
  15. kingstonr

    Pivot qry Help.

    Phil, I tried using a function which gives comma separated into table valued fun. set @SelPorts=N'[EMBIDIV],[AMEX],[AMR]' Select * from (select Por.ShortName, IsNull(IsNull(SM.SecDesc, rtrim(SM.SecName)), SM.PrimarySecID) as SecName, SM.SecID,IsNull(SM.BBSectorName, 'zOthers') AssetClass...

Part and Inventory Search

Back
Top