Skip to content
Advertisement

NULL fields using PIVOT

I request your collaboration because pivot on a table and separating the records by null, but still leave the fields at 0 with NVL Table product | value ———-+——- Shirts | 1200 Caps …

Loop through SQL query using variable from another table

I have two tables file & users, I want to see the file info for each user for C:Users%USERNAME%Documents So e.g. this would get the info from ‘example’ documents: But the username is coming from the users returns Alternatively, there’s: Which provides the first part of the path, but still can’t get to join ‘Documents’ to end of query and

Two joins change case size

My question is why double joins in SQLite change case size in result. Please look in fiddle: http://sqlfiddle.com/#!7/88671/3 As you can see when I query “select * from user” I have upper size name …

sql, insert random data from selected data

sql, insert random data from selected data, I get data from another table in the insertion process, but I only need to select one of these data randomly, now I can only add the first one of those …

Max parameter that can pass IN clause in Netezza

In Netezza, One can specify an IN clause, like this: (just like sql) SELECT * FROM user WHERE id IN (1000, 1001, 1002) Does anyone know what’s the maximum number of parameters you can pass into IN? …

Advertisement