Questions tagged [inner-query]

79 questions
0
votes
1 answer

How would I create this T-SQL subquery?

I am losing my touch here. In the old days I would come up with a super T-SQL query, Select t1.Number, t1.TransactionType, t1.Description, t1.Vendor, (Select max(t2.BatchId) From table2 t2 Where t1.Number=t2.Number and…
Paul Hilt
  • 3
  • 1
-1
votes
1 answer

4D SQL (v15.6): mix of JOINS + WITH clause + INNER queries on FROM, SELECT

Has anyone here worked with 4D SQL anytime? Our corporate application it's based on this, and through ODBC conector (I've tried multiple versions of ODBC driver, and now I'm currently using v17 on x64) and I can use a DB manager like DBeaver, to…
Lightworker
  • 593
  • 1
  • 5
  • 18
-1
votes
2 answers

select statement to truncate and append column values

i have a table which contains columns [id],[StartsWith],[Length] ,[MinExt] ,[MaxExt],[isDID] ,[DeleteDigits] ,[AppendDigits] 208 , 61 , 5 , 61000 , 61999 , 0 , 2 , 22058 209 , 63 , 5 , 63000 , …
waqar ahmed somra
  • 141
  • 1
  • 5
  • 16
-1
votes
1 answer

Want a count but it repeats 1 with every record

I want a count but it repeats 1 with every record. Can you please suggest what to do? SELECT Count(*), innerTable.* FROM (SELECT (SELECT NAME FROM tours WHERE tours.id = tourbooking.tourid) AS…
Mike
  • 751
  • 2
  • 10
  • 25
1 2 3 4 5
6