Omgili - forum search, search forums  
  

Discussions about union select

Displaying 1 - 10 out of 26,174 discussions.  
RSS Feed Options
Time Frame: (Any time)   Minimum number of replies: (2)   Minimum number of discussing users: (0)
  |  

Page: 1   2   3   4   5   6   7   8   9   10  
Keep this page open to be updated with the newest discussions automatically.
The query: SELECT ct_cid as level1 FROM cat_tree WHERE ct_sid=$sid_int AND ct_parent =$cid_int) UNION (SELECT ct_cid as level2 FROM cat_tree WHERE ct_sid=$sid_int AND ct_parent IN level1) The query is supposed to find the child nodes up to 2 levels of...
Started by on , 4 posts by 4 people.  
UNION select 2 from cat_tree where ct_sid = $sid_int and ct_parent = $cid_int union select 2 as LevelID, CT_CID from cat and ct_parent....
You may want is something like select 1 as LevelID, CT_CID from cat_tree where...
Hi There, I'm rather experienced with SQL server "select for XML path" queries but now i run into a strange problem. The following query works fine: select ( select 'Keyfield1' as "@Name", t1.Keyfield1 as "Value" from MyTable t1 where t1.KeyField1= t2...
Started by on , 3 posts by 3 people.  
T2.KeyField1 union all select 'Keyfield2' as "@Name", t3.Keyfield2 as "Value" from @MyTable t3 where nvarchar(20), keyfield2 nvarchar(20) ) insert into @mytable values ('Dummyvalue1', 'Dummyvalue2') select * from @mytable select....
In SQL Server this inserts 100 records, from the Customers table into tmpFerdeen :- SELECT top(100)* INTO tmpFerdeen FROM Customers Is it possible to do a SELECT INTO across a UNION ALL SELECT :- SELECT top(100)* FROM Customers UNION All SELECT top(10...
Started by on , 6 posts by 6 people.  
Then INSERT INTO tmpFerdeen ( SELECT top(100)* FROM Customers UNION All SELECT top(100)* FROM CustomerEurope UNION All SELECT top(100)* FROM CustomerAsia....
Object table, tmpFerdeen with the structure of the union.
Ask your Facebook Friends
SELECT * FROM (SELECT BAR.DIAGNOSES FROM FOO INNER JOIN BAR ON FOO.AN = BAR.AN WHERE FOO.ADMWARD IN (16,17) AND (BAR.DIAGNOSES IS NOT NULL) UNION ALL SELECT BAR.UNDERLYINGCAUSE FROM FOO INNER JOIN BAR ON FOO.AN = BAR.AN WHERE FOO.ADMWARD IN (16,17) AND...
Started by on , 4 posts by 4 people.  
unions go here ...) a You don't need to wrap this in a select....
You dont need the outer select * from - basically just put all the selects with union allAdd an alias after the last paren: select * from (....
I'm pretty sure this is not possible in Zend Framework (I have searched the Web, the documentation and issue tracker) but I just want to make sure so I'm asking here. $select = $this->select(); $select->union($select1, $select2); That doesn't work...
Started by on , 3 posts by 3 people.  
I haven't used Zend_Db_Select (or the table subclass) with union but I'd imagine you can do something....
Zend_Db_Select has a union method so I'd have thought it is possible, if you can build your query using a select object.
I have two procedures - two huge sets of selects with several sub-select and unions. I need to union results from these procedures and I still need them to exists separately. Something like that: if @Param = 1 Then PROCEDURE1 if @Param = 2 THEN PROCEDURE...
Started by on , 5 posts by 5 people.  
Insert #sometable exec PROCEDURE2 end select * from #sometable You could either: 1) Insert the data into a temp table then SELECT from that: --Define #t here, with correct schema to match results returned by each sproc INSERT #t EXECUTE....
Hi gurus, This question explained about a way of getting distinct combination of multiple columns. But I want to know the difference between the methods of DISTINCT, UNION, GROUP BY keyword method for this purpose. I am getting different results when ...
Started by on , 5 posts by 5 people.  
COL1 from Table1 UNION select COLX from Table2 UNION select WHATEVER_COLUMN_NAME from Table3; Result ALL order activity for a given customer in one query, you would want to do a union select customerid, orderdate....
I have a parent and child table and want to create a select statement that, given a parent id, returns a row for that parent and additional rows for every child. Doing a left join is not giving me a row for the parent by itself when one or more children...
Started by on , 4 posts by 4 people.  
The parent row, but it is hard without using a UNION! Have a dirty DIRTY hack: SELECT P2.Name Parent solution below): SELECT TOP 10000 IDENTITY(int,1,1) AS Number INTO Numbers FROM sys.columns s1') SELECT DISTINCT dt.Name....
I had a working FREETEXTTABLE query that searched for a @searchString. I now need to UNION that with another simple query that tries to parse the @searchString into an INT, and if it succeeds, filtering the table by looking for the row with PK equal to...
Started by on , 3 posts by 3 people.  
AS int) ELSE SET @id = 0 WITH MyFreetextCte as (SELECT [Rank], [Key] FROM FREETEXTTABLE(...) UNION, [KEY] FROM FREETEXTTABLE(sourceTable, *, @searchPhrase) UNION SELECT 1001, (SELECT sourceTableIDHave you tried just....
I have 2 tables with duplicate record including 'Id' field, and I need union them. But I think [union all] is much more efficient than [union] for the reason that it need not sorting. Following is my sql: SELECT * FROM [dbo].[RealTime] UNION ALL SELECT...
Started by on , 3 posts by 3 people.  
Option 2 (UNION): query.
Dbo.Query, then for each row from dbo.Query, do a lookup on dbo.Realtime .
Page: 1   2   3   4   5   6   7   8   9   10  
Related Searches
deletion of union of data from select   
More Information


Forum Search About Omgili Help Plugins Forum/Board Owners Privacy

i
In Title
In Topic
In Reply
Exclude
Boost