Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

Swap9

@Swap9
About
Posts
38
Topics
7
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • SQL server query
    S Swap9

    id_no first_name last_name 1 X ABC 2 Y ABC 3 M pqr 4 N PQR Here is the query I am running : SELECT STUFF((select stuff1 from(SELECT distinct T1.id_no 'sequenceno', ('/' + Col2) + ',' + STUFF((SELECT STUFF2 FROM(SELECT distinct T2.id_no 'sequenceno' ,'-' + substring(first_name, 1, 1)'STUFF2' FROM Table2 AS T2 WHERE T2.last_name = T1.last_name AND T2.id_no = 1234 AND T2.id_no = T1.id_no) dt2 order BY dt2.sequenceno FOR XML PATH(''),TYPE ).value('.', 'varchar(MAX)'), 1, 1, '') 'stuff1' FROM Table1 AS T1) dt order BY dt.sequenceno FOR XML PATH(''),TYPE).value('.', 'VARCHAR(MAX)'), 1, 1, '') AS Result OUTPUT - ABc,X-Y/ABc,X-Y/pqr,M-N/PQR,M-N Desired OUTPUT - ABc,X-Y/pqr,M-N Can you pls help me on this ?

    Database database sql-server sysadmin xml help

  • SQL server 12: Displaying column cell values in single cell
    S Swap9

    I had to add few extra condition suitable to my table, but it DID WORK !! :) I have learnt about STUFF and FOR XML PATH. Thanks a ton for all your time Richard.

    Database database question sql-server sysadmin

  • SQL server 12: Displaying column cell values in single cell
    S Swap9

    ID Column1 Column2 -- -------- ---------- 7 Vaugh William 7 Vaugh Smith 6 Woods Jane 6 Woods Joseph 6 Wright Adam 6 Wright John Thanks, I exactly put the condition at the place you suggeted, but still the output I get is as below WRONG OP : Vaugh,William-Smith/Woods,Jane-Joseph/Wright, Adam-John Expected OP : Woods,Jane-Joseph/Wright, Adam-John

    Database database question sql-server sysadmin

  • SQL server 12: Displaying column cell values in single cell
    S Swap9

    ID Column1 Column2 -- -------- ---------- 7 Vaugh William 7 Vaugh Smith 6 Woods Jane 6 Woods Joseph 6 Wright Adam 6 Wright John Suppose I have to find the combined name only for id=6 , then where should I put the condition in the code? The expected output : Woods,Jane-Joseph/Wright,Adam-John

    Database database question sql-server sysadmin

  • SQL server 12: Displaying column cell values in single cell
    S Swap9

    I am getting the combined names for the whole table. How to restrict it for a single id? Can you please tell where should I put the condition in the code you have shown above ?

    Database database question sql-server sysadmin

  • SQL server 12: Displaying column cell values in single cell
    S Swap9

    I want to display the unique last names followed by their respective first names separated by a '-' and, then '/' , then again the next last name(If it is not distinct , then add their first names separated by '-')followed by its respective firstname and so on..

    Database database question sql-server sysadmin

  • SQL server 12: Displaying column cell values in single cell
    S Swap9

    yes there is just single cell output. but conditions are that cell can not have more than 30 characters. Even there are 10 or 15 rows in a table, the SQL query should give single cell output.

    Database database question sql-server sysadmin

  • SQL server 12: Displaying column cell values in single cell
    S Swap9

    What extra information will make it clear ?

    Database database question sql-server sysadmin

  • SQL server 12: Displaying column cell values in single cell
    S Swap9

    Column1 Column2 -------- ---------- Vaugh William Vaugh Smith Woods Jane Expected Output : Vaugh, William-Smith/Woods,Jane Condition : There could be n number of rows in the sample table, there could be n number of woods too. display all the common surname having different names meaning repeated Last names will be once then all the first names associated with it. truncated at 30 characters max. How can I get this output in SQL query ?

    Database database question sql-server sysadmin

  • 'sprintf': cannot convert parameter 1 from 'TCHAR *[1024]' to 'char *'
    S Swap9

    Hello superman...just trying my luck by asking this to you... problem piece of code - if(Function(parm1, parm2, parm3)==0){ error - cannot convert parameter 3 from 'char [1024]' to 'wchar_t *' Function is expecting wchar_t but its getting char[1024] from some where. I changed the function signature to accept wchar_t type in header file. objective is to make the whole code UNICODE enabled. I have added all the tchar.h, wchar.h fiels param 3 has been defined (modified) as wchar_t in all the connected files too. I cant debug yet. Pls help how can i get rid of this error. I am working in vs2010.I counter checked it about five times and gave the search in solution to find if parm3 is still 'char' somewhere else. I am seriously doubting typecasting the wchar_t parm3[] before passing it function i think. I went to function declaration and changed it to char* to wchar_t* too. I doubt that might not be straight forward. there should be some changes.

    C / C++ / MFC c++ data-structures help question

  • error - cannot convert parameter 3 from 'char [1024]' to 'wchar_t *'
    S Swap9

    problem piece of code - if(Function(parm1, parm2, parm3)==0){ error - cannot convert parameter 3 from 'char [1024]' to 'wchar_t *' parm3 is an array - //char parm3[Buffsize1024]; //was before wchar_t parm3[Buffsize1024]; // I changed to make the application unicode enabled Function is expecting wchar_t but its getting char[1024] from some where. I also changed the function signature to accept wchar_t type in header file. objective is to make the whole code UNICODE enabled. I have added all the tchar.h, wchar.h fiels param 3 has been defined (modified) as wchar_t in all the connected files too. I also tried to cast the string and pass the casted string. CString s(parm3) LPCTSTR p = s; no change in the error. I cant debug yet. Pls help how can I get rid of this error.

    ATL / WTL / STL help data-structures debugging question

  • 'sprintf': cannot convert parameter 1 from 'TCHAR *[1024]' to 'char *'
    S Swap9

    However, the swprintf function, which is a VC++ library function is the correct one to use.
    The wsprintf function is part of some windows API, and does not support all the formatting options. For example wsprintf does not support the "*" width specification.

    Thanks !

    C / C++ / MFC c++ data-structures help question

  • 'sprintf': cannot convert parameter 1 from 'TCHAR *[1024]' to 'char *'
    S Swap9

    Worked ! great... thanks :)

    C / C++ / MFC c++ data-structures help question

  • 'sprintf': cannot convert parameter 1 from 'TCHAR *[1024]' to 'char *'
    S Swap9

    I am trying to enable an application for unicode. //char c_buffer[ARRAY]; TCHAR c_buffer[ARRAY]; above are the changes I made into code. Which breaks at this code in the .cpp file sprintf(c_buffer, "%d", pb->i_id); abc.cpp: error C2664: 'sprintf': cannot convert parameter 1 from 'TCHAR *[1024]' to 'char *' Why so ? I have added TCHAR.h and strsafe.h

    C / C++ / MFC c++ data-structures help question

  • 'sprintf': cannot convert parameter 1 from 'TCHAR *[1024]' to 'char *'
    S Swap9

    I am trying to enable an application for unicode. //char c_buffer[ARRAY]; TCHAR c_buffer[ARRAY]; above are the changes I made into code. At this code sprintf(c_buffer, "%d", pb->i_id); abc.cpp: error C2664: 'sprintf': cannot convert parameter 1 from 'TCHAR *[1024]' to 'char *' Why so ? I have added TCHAR.h and strsafe.h If I hover the mouse over the code it tells "argument of type 'TCHAR *' is incompatible with parameter of type'char *'" pls help

    ATL / WTL / STL help c++ data-structures question

  • migration from Visual studio 6
    S Swap9

    Sure, Thanks a lot for responding. I will find out.

    C / C++ / MFC help c++ csharp visual-studio com

  • migration from Visual studio 6
    S Swap9

    Ok thats another approach - but if its easy I can do it. Will you be able to show me a simple example of it ? can I compile and execute it in Japanese just by adding _T() on the Japanese windows ? I had another expert suggesting me this option, but that looked like another proj on its own http://social.msdn.microsoft.com/Forums/vstudio/en-US/d3b75db1-3646-4591-84c5-924cd5ec3065/how-to-change-the-application-to-display-gui-screens-captions-etc-in-both-the-languages-japanese?forum=vcgeneral#a4ff216a-fd6c-419f-a8a5-81b40b08e4b8[^]

    C / C++ / MFC help c++ csharp visual-studio com

  • migration from Visual studio 6
    S Swap9

    I also have another issue - posted at http://www.codeproject.com/Messages/4873177/How-can-I-display-Japanese-characters-in-an-applic.aspx[^] Will be able to help please ?

    C / C++ / MFC help c++ csharp visual-studio com

  • migration from Visual studio 6
    S Swap9

    Thank you so much !

    C / C++ / MFC help c++ csharp visual-studio com

  • migration from Visual studio 6
    S Swap9

    right no warnings when removing __STDC__ stuff. I am trying to resolve where is that disagreement happening - but I am confused looking what is the meaning of these four statement ?

    typedef int (*p)(void *, void *);

    typedef void *P;

    typedef void* P;

    typedef void* (*p)();

    C / C++ / MFC help c++ csharp visual-studio com
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups